accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Marion (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
Date Sun, 17 Jul 2016 13:04:20 GMT

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

Dave Marion commented on ACCUMULO-4375:
---------------------------------------

Suggest opening a separate issue.

> Add missing Key constructors taking array of bytes as argument
> --------------------------------------------------------------
>
>                 Key: ACCUMULO-4375
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4375
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: core
>            Reporter: Mario Pastorelli
>              Labels: newbie
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> In my company we use {{Key}} built directly from {{byte[]}} instead of {{Text}}. Currently
{{Key}} has many constructors working with {{Text}} and only few working with {{byte[]}}.
You can still use the {{Text}}-based constructor to create a {{Key}} from a {{byte[]}} by
wrapping it into a {{Text}}, but this requires to box a {{byte[]}} into {{Text}} without any
good reason.
> I propose to add the missing {{byte[]}}-based {{Key}} constructors, which are:
> {code:java}
> Key(byte[] row)
> Key(byte[] row, long ts)
> Key(byte[] row, byte[] cf)
> Key(byte[] row, byte[] cf, byte[] cq)
> Key(byte[] row, byte[] cf, byte[] cq, byte[] cv)
> Key(byte[] row, byte[] cf, byte[] cq, long ts)
> Key(byte[] row, byte[] cf, byte[] cq, ColumnVisibility cv, long ts)
> {code}
> The new constructor should behave like the {{Text}}-based counterpart, for instance:
> {code:java}
> byte[] row = new byte[] {0};
> assertEquals(new Key(row), new Key(new Text(row)));
> {code}



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

Mime
View raw message