accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Dailey (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2493) BinaryFormatter needs to be refactored
Date Sun, 29 Nov 2015 05:00:13 GMT


Matt Dailey commented on ACCUMULO-2493:

I started digging into this, and it looks more complicated than I hoped.  It seems the purpose
of {{getlength}} (which probably was meant to be named setlength) is really to support the
{{-f}} option in ScanCommand.  If that shell option is present, the code path [starting here|]
will set that static {{showLength}} value, and always use the BinaryFormatter rather than
the set formatter (which could be considered a separate issue, too).

It seems {{getlength}} changes the static state to get around the fact that the static {{FormatterFactory.getFormatter}}
does not have the ability to set the show length (used [here|]).

I don't see a quick and easy fix here; maybe a change needs to happen in FormatterFactory
to support additional parameters to send to the Formatter?

> BinaryFormatter needs to be refactored
> --------------------------------------
>                 Key: ACCUMULO-2493
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>            Reporter: Mike Drob
>            Assignee: Steve Blackmore
>              Labels: newbie
>             Fix For: 1.7.1, 1.8.0
> 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.

This message was sent by Atlassian JIRA

View raw message