Accumulo
  1. Accumulo
  2. ACCUMULO-2493

BinaryFormatter needs to be refactored

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.7.1, 1.8.0
    • Component/s: client
    • Labels:

      Description

      BinaryFormatter is currently used in a couple places in the shell, but the code is hard to read and understand. There is a static getlength, which is actually a setter, and all the instance calls end up going through unnecessary static methods.

      This combination makes it hard to reuse BinaryFormatter objects, or even use multiple, since the static state is likely to conflict.

        Activity

        Hide
        Eric Newton added a comment -

        Ideally, formatters would be stateless, except for some constant configuration.

        I don't know what's up with that funky getlength method.

        Show
        Eric Newton added a comment - Ideally, formatters would be stateless, except for some constant configuration. I don't know what's up with that funky getlength method.
        Hide
        Steve Blackmore added a comment -

        How important is it to maintain the static state, from what I can see the only time this value will make a difference is in ScanCommand.java the other use in GetSplitsCommand.java will always result in the showLength being the same as the Text.getLenght() it is appending.

        Show
        Steve Blackmore added a comment - How important is it to maintain the static state, from what I can see the only time this value will make a difference is in ScanCommand.java the other use in GetSplitsCommand.java will always result in the showLength being the same as the Text.getLenght() it is appending.

          People

          • Assignee:
            Steve Blackmore
            Reporter:
            Mike Drob
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development