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

Add offset and limit arguments to byte array Encoder.decode method

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: client
    • Labels:

      Description

      Similar to ACCUMULO-2445, but presently the encoder only works on complete byte arrays. This forces an extra copy of the data when it is located in an array that contains other information (e.g. a composite key).

      It would be nice to be able to provide offset and length arguments to Encoder.decode so that users can avoid the additional arraycopy.

      Changing to a ByteBuffer instead of byte array argument would also be acceptable, but more churn on the API that, unless it's happening globally, I would rather avoid. It would also incur the penalty for that extra Object, which while minimal alone, could be significant if decoding every value in a table, for example.

        Attachments

        1. ACCUMULO-2817.patch
          73 kB
          Matt Dailey

          Issue Links

            Activity

              People

              • Assignee:
                matthew-dailey Matt Dailey
                Reporter:
                elserj Josh Elser
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m