[ 
https://issues.apache.org/jira/browse/HBASE-4616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13175067#comment-13175067
 ] 

Alex Newman commented on HBASE-4616:
------------------------------------

I really think these functions should be removed. It locks us into either 
having a metadata hit, or Having regionNames in which the tablename is 
embedded(reversible). After all there already is a getTableName, this static 
one just doesn't seem useful. 


===============
+ public static byte [] getTableName(byte[] regionName, Configuration conf)$

This is ugly, but maybe its ok? You've deprecated it (but you need to point 
user elsewhere when you deprecate something). What you thinking? That it should
just not be possible to get tablename from an HRI going forward? This is kinda 
ugly method anyways... no longer used I'd say so fine if its going away (I seem 
to remember it was written for some strange context where needed to find 
tablename walking filesystem but no cluster up).

Ditto for the version that don't take a Configuration... but man, thats ugly 
creating a Configuration inside in the method. Needs WARNINGS in javadoc: 
"DON"T DO IT!!!!!"

Follow formatting of method opening as is done elsewhere in this file; the 
below is different:

+ private static boolean isLHSSplit(final byte[] regionName,$
+ final int offset) throws IOException {$

The above method needs a bit of doc on what its about. And there should be a 
blank line after each method ... there is none here.

The below method does not look right and should be deprecated anyways (Its 
returning region name? At least warn it don't work any more)?

/**$

* Get current table name of the region$
+ * Get the tablename of the region from the regionKey$
@return byte array of table name$
*/$
public byte[] getTableName() {$
if (tableName == null || tableName.length == 0) {$
tableName = getTableName(getRegionName());$
+ tableName = getRegionName();$
}$
return tableName;$
}$
                
> Update hregion encoded name to reduce logic and prevent region collisions in 
> META
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-4616
>                 URL: https://issues.apache.org/jira/browse/HBASE-4616
>             Project: HBase
>          Issue Type: Umbrella
>            Reporter: Alex Newman
>            Assignee: Alex Newman
>         Attachments: HBASE-4616-v2.patch, HBASE-4616-v3.patch, 
> HBASE-4616.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to