diff --git hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java index 0d4f793..adad647 100644 --- hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ hbase-client/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -71,13 +71,13 @@ import org.apache.hadoop.hbase.security.User; * subsequently used by another will cause breakage so be careful running * cleanup. *
To create a {@link HConnection} that is not shared by others, you can - * create a new {@link Configuration} instance, pass this new instance to - * {@link #getConnection(Configuration)}, and then when done, close it up by - * doing something like the following: + * set property "hbase.client.instance.id" to a unique value for your {@link Configuration} + * instance, pass the instance to {@link #getConnection(Configuration)}, and then + * when done, close it up by doing something like the following: *
* {@code
- * Configuration newConfig = new Configuration(originalConf);
- * HConnection connection = HConnectionManager.getConnection(newConfig);
+ * conf.set("hbase.client.instance.id", "12345");
+ * HConnection connection = HConnectionManager.getConnection(conf);
* // Use the connection to your hearts' delight and then when done...
* HConnectionManager.deleteConnection(newConfig, true);
* }