busbey commented on a change in pull request #923: HBASE-23554 Encoded 
regionname to regionname utility
URL: https://github.com/apache/hbase/pull/923#discussion_r356361454
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
 ##########
 @@ -346,15 +346,23 @@ static TableName getTable(final byte [] regionName) {
     return parseRegionName(regionName)[1];
   }
 
-  @InterfaceAudience.Private
-  static boolean isEncodedRegionName(byte[] regionName) throws IOException {
+  /**
+   * Figure if the passed bytes represent an encoded region name or not.
+   * @param regionName A Region name either encoded or not.
+   * @return True if <code>regionName</code> represents an encoded name.
+   */
+  @InterfaceAudience.Private // For use by internals only.
+  public static boolean isEncodedRegionName(byte[] regionName) throws 
IOException {
     try {
+      // TODO: This is extreme... a full parse and an exception if encoded -- 
and
+      // even then, we say it encoded just because it NOT encoded. Can we
+      // do something less expensive figuring if encoded?
 
 Review comment:
   How expensive is checking all the encoded region names we know about?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to