Github user pvillard31 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2237#discussion_r147658468
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-hbase_1_1_2-client-service-bundle/nifi-hbase_1_1_2-client-service/src/main/java/org/apache/nifi/hbase/HBase_1_1_2_ClientService.java
---
@@ -535,4 +539,16 @@ public Configuration getConfiguration() {
public byte[] toBytesBinary(String s) {
return Bytes.toBytesBinary(s);
}
+
+ @Override
+ public String toTransitUri(String tableName, String rowKey) {
+ if (connection == null) {
+ logger.warn("Connection has not been established, could not
create a transit URI. Returning null.");
+ return null;
+ }
+ final Configuration configuration = connection.getConfiguration();
+ // Remove white spaces.
+ final String zkQuorum =
configuration.get(HBASE_CONF_ZK_QUORUM).replaceAll("\\s", "");
+ return "hbase://" + zkQuorum + "/" + tableName + (rowKey != null
&& !rowKey.isEmpty() ? "/" + rowKey : "");
--- End diff --
does it make sense to add znode? Two HBase clusters could use the same ZK,
right?
(not sure what would be the best way to represent it though, using
``/znode/table`` could be confusing, no?)
---