@@ -98,18 +98,26 @@ public void open(Configuration parameters) throws Exception {
9898 super .open (parameters );
9999 AbstractSideTableInfo sideTableInfo = sideInfo .getSideTableInfo ();
100100 HbaseSideTableInfo hbaseSideTableInfo = (HbaseSideTableInfo ) sideTableInfo ;
101+ Map <String , Object > hbaseConfig = hbaseSideTableInfo .getHbaseConfig ();
101102
102103 ExecutorService executorService =new ThreadPoolExecutor (DEFAULT_POOL_SIZE , DEFAULT_POOL_SIZE ,
103104 0L , TimeUnit .MILLISECONDS ,
104105 new LinkedBlockingQueue <>(), new DTThreadFactory ("hbase-aysnc" ));
105106
106107 Config config = new Config ();
107108 config .overrideConfig (HbaseConfigUtils .KEY_HBASE_ZOOKEEPER_QUORUM , hbaseSideTableInfo .getHost ());
108- config .overrideConfig (HbaseConfigUtils .KEY_HBASE_ZOOKEEPER_ZNODE_QUORUM_ASYNC , hbaseSideTableInfo .getParent ());
109-
110- if (hbaseSideTableInfo .isKerberosAuthEnable ()) {
111- fillAsyncKerberosConfig (config , hbaseSideTableInfo );
109+ config .overrideConfig (HbaseConfigUtils .KEY_HBASE_ZOOKEEPER_ZNODE_QUORUM , hbaseSideTableInfo .getParent ());
110+ HbaseConfigUtils .loadKrb5Conf (hbaseConfig );
111+ hbaseConfig .entrySet ().forEach (entity -> {
112+ config .overrideConfig (entity .getKey (), (String ) entity .getValue ());
113+ });
114+
115+ if (HbaseConfigUtils .asyncOpenKerberos (hbaseConfig )) {
116+ String jaasStr = HbaseConfigUtils .buildJaasStr (hbaseConfig );
117+ String jaasFilePath = HbaseConfigUtils .creatJassFile (jaasStr );
118+ config .overrideConfig (HbaseConfigUtils .KEY_JAVA_SECURITY_AUTH_LOGIN_CONF , jaasFilePath );
112119 }
120+
113121 hBaseClient = new HBaseClient (config , executorService );
114122
115123 try {
0 commit comments