mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
HBase etl锁定同步等待
This commit is contained in:
@@ -162,4 +162,13 @@ public class HbaseAdapter implements OuterAdapter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDestination(String task) {
|
||||
MappingConfig config = hbaseMapping.get(task);
|
||||
if (config != null && config.getHbaseOrm() != null) {
|
||||
return config.getHbaseOrm().getDestination();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ public class MappingConfig {
|
||||
public static class HbaseOrm {
|
||||
|
||||
private Mode mode = Mode.STRING;
|
||||
private String destination;
|
||||
private String database;
|
||||
private String table;
|
||||
private String hbaseTable;
|
||||
@@ -170,6 +171,14 @@ public class MappingConfig {
|
||||
this.mode = mode;
|
||||
}
|
||||
|
||||
public String getDestination() {
|
||||
return destination;
|
||||
}
|
||||
|
||||
public void setDestination(String destination) {
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
public String getDatabase() {
|
||||
return database;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
dataSourceKey: defaultDS
|
||||
hbaseOrm:
|
||||
mode: PHOENIX #NATIVE #STRING
|
||||
destination: example
|
||||
database: mytest # 数据库名
|
||||
table: person2 # 数据库表名
|
||||
hbaseTable: MYTEST.PERSON2 # HBase表名
|
||||
|
||||
Reference in New Issue
Block a user