accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris McCubbin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-482) Add a thrift proxy server
Date Tue, 13 Nov 2012 21:44:11 GMT

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

Chris McCubbin commented on ACCUMULO-482:
-----------------------------------------

bq. In a few of the popular languages, is the generated code for dealing with an optional
field easy to write? 

Not exactly sure about all languages. In Java optional fields aren't in the constructor and
need to be set via a method call. 

bq. Does this complicate reading data in anyway? When reading data, we would always expect
the timestamp to be set, so it would be odd to have to constantly check if its set when reading.

Well, I copy whatever is in the key coming out of accumulo into the response value. That value
cannot be null since it is a primitive. So on a scan the timestamp will always be set. (This
happens in Util.toThrift(Key) ). In Java the timestamp is still a primitive so it won't throw
an execption if you try to get an unset timestamp value, i suspect it will be 0 since it is
appears to be an uninitialized long primitive. I think if you try to access an unset optional
non-primitive, it will return null. There are also isSet* methods generated for optional values
that tell you if the value is unset (as opposed to set to null).
                
> Add a thrift proxy server
> -------------------------
>
>                 Key: ACCUMULO-482
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-482
>             Project: Accumulo
>          Issue Type: New Feature
>            Reporter: Sapan Shah
>            Assignee: Chris McCubbin
>         Attachments: accumulo482patch-A.diff, accumulo482patch.diff
>
>
> Add a thrift proxy server to make integration with other languages besides Java a bit
easier.  This should work like http://wiki.apache.org/hadoop/Hbase/ThriftApi.

--
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

Mime
View raw message