use of com.pamirs.attach.plugin.dynamic.template.HbaseTemplate in project LinkAgent by shulieTech.
the class ConnectionShadowInterceptor method attachment.
void attachment(Advice advice) {
try {
Object[] args = advice.getParameterArray();
Configuration configuration = (Configuration) args[0];
String quorum = configuration.get(HConstants.ZOOKEEPER_QUORUM);
String port = configuration.get(HConstants.ZOOKEEPER_CLIENT_PORT);
String znode = configuration.get(HConstants.ZOOKEEPER_ZNODE_PARENT);
ResourceManager.set(new Attachment(null, "apache-hbase", new String[] { "hbase" }, new HbaseTemplate().setZookeeper_quorum(quorum).setZookeeper_client_port(port).setZookeeper_znode_parent(znode)));
} catch (Throwable t) {
}
}
Aggregations