accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-4138) CompactCommand description is incorrect
Date Thu, 18 Feb 2016 18:24:18 GMT

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

Michael Wall commented on ACCUMULO-4138:
----------------------------------------

FlushCommand is wrong also.  The description says the -b argument is inclusive when it is
in fact exclusive.

Here are more details.  The ScanCommand, CompactCommand, MergeCommand and FlushCommand all
use OptUtil.startRowOpt.  ScanCommand is inclusive, so the description is correct.  MergeCommand
is exclusive and the description is corrected when the option is added to the command.  CompactCommand
and FlushCommand are both exclusive and the description says inclusive.  They are both wrong.
 The DeleteRowCommand also uses the OptUtil.START_ROW_OPT but sets up the option without using
OptUtil.startRowOpt and overrides the description to say it is exclusive.  

So why does ScanCommand work differently.  The ScanCommand creates a Range with the start
opt.  The other commands pass start opt to methods on TableOperations implementations.  The
DeleteManyCommand extends the ScanCommand, so the start row opt works the same as with the
ScanCommand.

Looking through the docs that are generated, I did not see anywhere the ' -b ' is referenced
except when it related to the scan command.

I propose the following:
- Change the description in the OptUtil.startRowOpt to be (NOT) inclusive
- Use OptUtil.startRowOpt in CompactCommand, MergeCommand and FlushCommand.
- Refactor the DeleteRowCommand to use the OptUtil.startRowOpt method.
- Refactor ScanCommand to override the description to say it is inclusive.

I'll work on a pull request with this implementation.

> CompactCommand description is incorrect
> ---------------------------------------
>
>                 Key: ACCUMULO-4138
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4138
>             Project: Accumulo
>          Issue Type: Bug
>          Components: shell
>    Affects Versions: 1.6.4, 1.7.0
>            Reporter: Michael Wall
>            Assignee: Michael Wall
>              Labels: newbie
>             Fix For: 1.6.6, 1.7.2, 1.8.0
>
>
> The compact command has the following description 
> {code}
> root@accumulo> compact -?
> usage: compact [<table>{ <table>}] [-?] [-b <begin-row>] [--cancel]
[-e <end-row>] [-nf] [-ns <namespace> | -p <pattern> | -t <tableName>]
 [-pn <profile>]  [-w]
> description: sets all tablets for a table to major compact as soon as possible (based
on current time)
>   -?,--help                       display this help
>   -b,--begin-row <begin-row>      begin row (inclusive)
>      --cancel                     cancel user initiated compactions
>   -e,--end-row <end-row>          end row (inclusive)
>   -nf,--noFlush                   do not flush table data in memory before compacting.
>   -ns,--namespace <namespace>     name of a namespace to operate on
>   -p,--pattern <pattern>          regex pattern of table names to operate on
>   -pn,--profile <profile>         iterator profile name
>   -t,--table <tableName>          name of a table to operate on
>   -w,--wait                       wait for compact to finish
> {code}
> However, the --begin-row is not inclusive.  Here is a simple demonstration.
> {code}
> createtable compacttest
> addsplits a b c
> insert "a" "1" "" ""
> insert "a" "2" "" ""
> insert "b" "3" "" ""
> insert "b" "4" "" ""
> insert "c" "5" "" ""
> insert "c" "6" "" ""
> flush -w
> scan -t accumulo.metadata -np
> compact -b a -e c -t compacttest -w
> scan -t accumulo.metadata -np
> deletetable compacttest -f
> {code}
> You will see that file associated with the 'a' split is still a F flush file, which the
files in the 'b' and 'c' split are A files.
> Not sure if the fix is to update the commands description, which would be easy, or to
make the begin row actually inclusive.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message