accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo issue #145: ACCUMULO-4376 add KeyBuilder
Date Thu, 01 Sep 2016 15:59:09 GMT
Github user keith-turner commented on the issue:

    https://github.com/apache/accumulo/pull/145
  
    I agree w/ @dhutchis and would really like the ability to mix types.  For example a binary
row and string column is a common usage pattern.   The builder pattern supports this usage
pattern really well.   
    
    I would suggest using `family` instead of `columnFamily`, `qualifier` instead `columnQualifier`,
and `visibility` instead of `columnVisibility` for the methods names.  IMO using these names
will make the code users write shorter and less redundant w/o any loss in readability.  
    
    I would suggest making the builder class package private and adding a `newBuilder()` method
to Key that returns the first interface.
    
    Below is an example of code using all of these suggestions.
    
    ```java
        byte r[];
        String f;
        Text q;
        
        Key k = Key.newBuilder().row(r).family(f).qualifier(q).build();
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message