[ https://issues.apache.org/jira/browse/HBASE-880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635664#action_12635664 ]
Jim Kellerman commented on HBASE-880: ------------------------------------- Constructor overloads or setter's? For something like RowGet, the number of overloads expands exponentially. The required parameter is the row name. The other parameters are: - one or more column names - timestamp - number of versions - lockid combine that with overloads for String or String[] over byte[] or byte[][] and the total amounts to about 30 overloads. Compare that with just overloads for String row, String column byte[] row, byte[] column String row, String column[] byte[] row, byte[][] column and setter's for timestamp, number of versions, and lockid and you reduce ~30 overloads to 4 constructors and 3 setters. This seems like the better route to take. The common options are covered, defaults are provided, and if you want the optional parameters, use the setters. Comments? > Improve the current client API by creating new container classes > ---------------------------------------------------------------- > > Key: HBASE-880 > URL: https://issues.apache.org/jira/browse/HBASE-880 > Project: Hadoop HBase > Issue Type: Improvement > Components: client > Reporter: Jean-Daniel Cryans > Assignee: Jean-Daniel Cryans > Fix For: 0.19.0 > > Attachments: hbase-880-patch.jpg, hbase-880-v1.patch, > hbase-880-v2.patch, hbase_client_classes.png > > > The current API does not scale very well. For each new feature, we have to > add many methods to take care of all the overloads. Also, the need to batch > row operations (gets, inserts, deletes) implies that we have to manage some > "entities" like we are able to do with BatchUpdate but not with the other > operations. The RowLock should be an attribute of such an entity. > The scope of this jira is only to replace current API with another > feature-compatible one, other methods will be added in other issues. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.