hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13502) Deprecate/remove getRowComparator() in TableName
Date Tue, 21 Apr 2015 16:18:59 GMT

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

stack commented on HBASE-13502:
-------------------------------

Is this code duplicated anywhere else? Should it be a Static in CellComparator that takes
a TableName?

99	  private KVComparator getRowComparator(TableName tableName) {
100	    if (TableName.META_TABLE_NAME.equals(tableName)) {
101	      return KeyValue.META_COMPARATOR;
102	    }
103	    return KeyValue.COMPARATOR;
104	  }

I think it clearer if you write it as:

return TableName.META_TABLE_NAME.equals(tableName)? KeyValue.META_COMPARATOR: KeyValue.COMPARATOR;

{quote}This API will go away so that TableName will not have any comparator{quote}

nit: Suggest you say comparator is an internal concern mistakenly exposed here in TableName.


> Deprecate/remove getRowComparator() in TableName
> ------------------------------------------------
>
>                 Key: HBASE-13502
>                 URL: https://issues.apache.org/jira/browse/HBASE-13502
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-13502.patch, HBASE-13502_1.patch, HBASE-13502_2.patch, HBASE-13502_2.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message