Skip to content

Commit 35f8567

Browse files
committed
add init log info to hbase sink
1 parent b138bac commit 35f8567

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
import org.apache.hadoop.hbase.client.ConnectionFactory;
3333
import org.apache.hadoop.hbase.client.Put;
3434
import org.apache.hadoop.hbase.client.Table;
35+
import org.slf4j.Logger;
36+
import org.slf4j.LoggerFactory;
3537

3638
import java.io.IOException;
3739
import java.text.SimpleDateFormat;
@@ -44,6 +46,8 @@
4446
*/
4547
public class HbaseOutputFormat extends RichOutputFormat<Tuple2> {
4648

49+
private static final Logger LOG = LoggerFactory.getLogger(HbaseOutputFormat.class);
50+
4751
private String host;
4852
private String zkParent;
4953
private String[] rowkey;
@@ -63,17 +67,21 @@ public class HbaseOutputFormat extends RichOutputFormat<Tuple2> {
6367

6468
@Override
6569
public void configure(Configuration parameters) {
70+
LOG.warn("---configure---");
6671
conf = HBaseConfiguration.create();
6772
conf.set("hbase.zookeeper.quorum", host);
6873
if(zkParent != null && !"".equals(zkParent)){
6974
conf.set("zookeeper.znode.parent", zkParent);
7075
}
76+
LOG.warn("---configure end ---");
7177
}
7278

7379
@Override
7480
public void open(int taskNumber, int numTasks) throws IOException {
81+
LOG.warn("---open---");
7582
conn = ConnectionFactory.createConnection(conf);
7683
table = conn.getTable(TableName.valueOf(tableName));
84+
LOG.warn("---open end(get table from hbase) ---");
7785
}
7886

7987
@Override

0 commit comments

Comments
 (0)