accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Ridley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1581) Limit length of values printed in listscans by default
Date Mon, 28 Apr 2014 02:55:16 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-1581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13982725#comment-13982725
] 

Michael Ridley commented on ACCUMULO-1581:
------------------------------------------

[~elserj] I'm pretty sure I understand the intent but maybe I'm misunderstanding the implementation
of {{ScanCommand}}.  If I look at the options the command takes, the only one that appears
to limit the output is:

{code}
  showFewOpt = new Option("f", "show few", true, "show only a specified number of characters");
{code}

which does indeed seem to truncate the output as in {{BinaryFormatter}}.  I don't see where
this limits the number of rows returned.

{code}
  static StringBuilder appendBytes(StringBuilder sb, byte ba[], int offset, int len) {
    int length = Math.min(len, showLength);
    return DefaultFormatter.appendBytes(sb, ba, offset, length);
  }
{code}

I don't see anything in {{o.a.a.core.data.Key}} {{toString()}} that truncates data.  Obviously
you are a lot more familiar with the codebase than I am - let me know where I'm going wrong
here.  I have written the functionality but I'd like to make sure that the patch I submit
is syntactically consistent with the rest of the CLI.

> Limit length of values printed in listscans by default
> ------------------------------------------------------
>
>                 Key: ACCUMULO-1581
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1581
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: shell
>            Reporter: Josh Elser
>              Labels: newbie
>             Fix For: 1.7.0
>
>
> Listscans currently print out the entire options map provided to a ScanSession. If these
large option values are printed, it makes the output rather difficult to read/parse.
> We should add an upper limit to the length of the key-values printed out from said option
map, including a "<TRUNCATED>" to match what is done for large Keys when scanning a
table. We could also add an option to override the truncation for when people really want
to see the complete option map.



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

Mime
View raw message