hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Dimiduk (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7941) Provide client API with support for primitive types
Date Wed, 27 Feb 2013 18:23:13 GMT

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

Nick Dimiduk commented on HBASE-7941:

bq. Looks good. Poke around in JIRA for other attempts at this IIRC (search 'hbase builder').

I'll see what I find.

bq. We have String for some overrides. Should we have that too?

Such as {{HTable(Configuration, byte[])}} and {{HTable(Configuration, String)}}? Precisely.
It lets the user provide a more natural type and explicitly handles serialization to the system-specified
byte[] representation. Correct me if I'm wrong, but anywhere we expect a table or CF name,
byte[] and String are sufficient. It's column qualifiers and values are where I see getting
the most miles out of the serialization implementation.

bq. We could work so that much of the above is done once up in the superclass Mutation.

Keeping as much of this noise as possible confined to a base class would be ideal. I tend
to prefer APIs with minimum necessary surface area because there's no room for confusion on
the user's part. On the other hand, {{put.add("c1", "foo", 12)}} is a lot nicer than {{put.add(new
StringRowKey().serialize("c1"), new StringRowKey().serialize("foo"), new IntegerRowKey().serialize(12))}}
or {{put.add(Bytes.toBytes("c1"), Bytes.toBytes("foo"), Bytes.toBytes(12))}}.
> Provide client API with support for primitive types
> ---------------------------------------------------
>                 Key: HBASE-7941
>                 URL: https://issues.apache.org/jira/browse/HBASE-7941
>             Project: HBase
>          Issue Type: Improvement
>          Components: Client
>            Reporter: Nick Dimiduk
> Work is underway to provide a widely acceptable serialization format for primitive and
complex types (HBASE-7221, HBASE-7692). With this completed, those serialization conveniences
should be pushed up to users of the Client API by way of additional method signatures on Operation
implementations (Get, Put, Delete, Scan, &c.).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message