This is an automated email from the ASF dual-hosted git repository.
psomogyi pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2 by this push:
new e153f58 HBASE-22633 remove redundant substring call with append for
ZKReplicationQueueStorage
e153f58 is described below
commit e153f58937e4c6ae37c8435b2d84d65ec8083767
Author: Viraj Jasani <[email protected]>
AuthorDate: Fri Jun 28 18:32:30 2019 +0530
HBASE-22633 remove redundant substring call with append for
ZKReplicationQueueStorage
Signed-off-by: Sakthi <[email protected]>
Signed-off-by: Duo Zhang <[email protected]>
---
.../apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java
b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java
index 3854753..6f1f5a3 100644
---
a/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java
+++
b/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java
@@ -165,9 +165,10 @@ class ZKReplicationQueueStorage extends
ZKReplicationStorageBase
"Invalid encoded region name: " + encodedRegionName + ", length
should be 32.");
}
return new
StringBuilder(regionsZNode).append(ZNodePaths.ZNODE_PATH_SEPARATOR)
- .append(encodedRegionName.substring(0,
2)).append(ZNodePaths.ZNODE_PATH_SEPARATOR)
- .append(encodedRegionName.substring(2,
4)).append(ZNodePaths.ZNODE_PATH_SEPARATOR)
-
.append(encodedRegionName.substring(4)).append("-").append(peerId).toString();
+ .append(encodedRegionName, 0,
2).append(ZNodePaths.ZNODE_PATH_SEPARATOR)
+ .append(encodedRegionName, 2,
4).append(ZNodePaths.ZNODE_PATH_SEPARATOR)
+ .append(encodedRegionName, 4,
encodedRegionName.length()).append("-").append(peerId)
+ .toString();
}
@Override