Skip to content

Commit a44c2be

Browse files
author
dapeng
committed
调整顺序
1 parent 9d80379 commit a44c2be

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hbase/hbase-sink/src/main/java/com/dtstack/flink/sql/sink/hbase/HbaseOutputFormat.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ public void configure(Configuration parameters) {
9292
@Override
9393
public void open(int taskNumber, int numTasks) throws IOException {
9494
LOG.warn("---open---");
95-
conn = ConnectionFactory.createConnection(conf);
96-
table = conn.getTable(TableName.valueOf(tableName));
9795
if (kerberosAuthEnable) {
9896
conf.set(HbaseConfigUtils.KEY_HBASE_ZOOKEEPER_QUORUM, host);
9997
conf.set(HbaseConfigUtils.KEY_HBASE_ZOOKEEPER_ZNODE_QUORUM, zkParent);
@@ -117,6 +115,7 @@ public Connection run() {
117115
conf.set(HbaseConfigUtils.KEY_HBASE_ZOOKEEPER_ZNODE_QUORUM, zkParent);
118116
conn = ConnectionFactory.createConnection(conf);
119117
}
118+
table = conn.getTable(TableName.valueOf(tableName));
120119
LOG.warn("---open end(get table from hbase) ---");
121120
initMetric();
122121
}

0 commit comments

Comments
 (0)