File tree Expand file tree Collapse file tree
hbase/hbase-sink/src/main/java/com/dtstack/flink/sql/sink/hbase Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import org .apache .hadoop .hbase .client .ConnectionFactory ;
3333import org .apache .hadoop .hbase .client .Put ;
3434import org .apache .hadoop .hbase .client .Table ;
35+ import org .slf4j .Logger ;
36+ import org .slf4j .LoggerFactory ;
3537
3638import java .io .IOException ;
3739import java .text .SimpleDateFormat ;
4446 */
4547public 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
You can’t perform that action at this time.
0 commit comments