[jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
[ https://issues.apache.org/jira/browse/ACCUMULO-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15382220#comment-15382220 ] Keith Turner commented on ACCUMULO-4375: Thanks for bringing this to my attention. I reviewed it and made some comments on the PR. > 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 >Assignee: Mario Pastorelli > Labels: newbie > Fix For: 1.8.0 > > Time Spent: 4h 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)
[jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
[ https://issues.apache.org/jira/browse/ACCUMULO-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15381537#comment-15381537 ] Mario Pastorelli commented on ACCUMULO-4375: Nice! Yes, sure, I'd like to be added to the contributor's page. My organization is Teralytics AG and the timezone is [CEST|http://www.timeanddate.com/time/zone/switzerland/zurich]. > 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 >Assignee: Mario Pastorelli > Labels: newbie > Fix For: 1.8.0 > > Time Spent: 4h 10m > 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)
[jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
[ https://issues.apache.org/jira/browse/ACCUMULO-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15381416#comment-15381416 ] Josh Elser commented on ACCUMULO-4375: -- [~kturner], I'm going to go ahead with committing this one today, but I'd be happy knowing you took a look when you next get a chance from an API perspective. I feel like you always find the concerns with API-level changes that I miss. > 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: 2h 40m > 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)
[jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
[ https://issues.apache.org/jira/browse/ACCUMULO-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
[ https://issues.apache.org/jira/browse/ACCUMULO-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15381271#comment-15381271 ] Mario Pastorelli commented on ACCUMULO-4375: I would also like to add {Range} methods working on bytes, do you want me to do it in this JIRA or should I open another one? > 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)
[jira] [Commented] (ACCUMULO-4375) Add missing Key constructors taking array of bytes as argument
[ https://issues.apache.org/jira/browse/ACCUMULO-4375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15380973#comment-15380973 ] Dave Marion commented on ACCUMULO-4375: --- What version are you using? I see some Key constructors in the 1.7 branch that take byte[]. > 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: 10m > 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)