This is an automated email from the ASF dual-hosted git repository.

psomogyi pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new 085ea6f  HBASE-22633 remove redundant substring call with append for 
ZKReplicationQueueStorage
085ea6f is described below

commit 085ea6f219ab25552f393e9b3dadc9cec9d69bb3
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

Reply via email to