You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2014/03/07 19:57:46 UTC

[jira] [Reopened] (ACCUMULO-2437) Cannot create splits with MSBit set in MSByte via API

     [ https://issues.apache.org/jira/browse/ACCUMULO-2437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Busbey reopened ACCUMULO-2437:
-----------------------------------

      Assignee: Sean Busbey

While we may treat Text as a byte container, I don't think that lines up with how Hadoop documents it (even if historically the implementation allows it).

I'd like to see all of our APIs offer a better byte interface so we can deprecate and eventually phase out use of Text.

> Cannot create splits with MSBit set in MSByte via API 
> ------------------------------------------------------
>
>                 Key: ACCUMULO-2437
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2437
>             Project: Accumulo
>          Issue Type: Bug
>    Affects Versions: 1.5.1, 1.6.0
>            Reporter: Aaron Kimball
>            Assignee: Sean Busbey
>             Fix For: 1.7.0
>
>
> I cannot create a table with 256 evenly-sliced splits using the API. I believe due to the fact that Text can only hold valid Unicode characters, the following only generates 129 splits:
> {code}
>     TableOperations tableOps = connector.tableOperations();
>     TreeSet<Text> splits = new TreeSet<Text>();
>     for (int i = 0; i < 256; i++) { 
>       byte[] bytes = { (byte) i };
>       String theStr = new String(bytes);
>       splits.add(new Text(theStr));
>     } 
>     tableOps.addSplits(TABLE_NAME, splits);
> {code}
> Using {{getsplits}} in the shell, I see the highest split be 0x7F; while we can use byte values 0x80 through 0xFF as leading bytes in row keys, the use of {{Text}} in the {{addSplits()}} method makes these invalid strings to split on.



--
This message was sent by Atlassian JIRA
(v6.2#6252)