Uploaded image for project: 'Accumulo'
  1. Accumulo
  2. ACCUMULO-2437

Cannot create splits with MSBit set in MSByte via API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.1
    • 1.5.2, 1.6.0
    • client, docs
    • None

    Description

      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:

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

      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.

      Attachments

        1. ACCUMULO-2437.1.patch.txt
          2 kB
          Sean Busbey

        Issue Links

          Activity

            People

              busbey Sean Busbey
              kimballa Aaron Kimball
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: