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

Christopher Tubbs commented on ACCUMULO-4138:
---------------------------------------------

I'd actually be willing to consider this one more than a documentation bug... 
the overlap check (Tablet.java:1044-1049 in master branch) is done using 
KeyExtent, but that's problematic because KeyExtent is inherently 
exclusive-inclusive, because prevEndRow is exclusive. But, that's clearly not 
the semantics we intended in this API. I've found using Guava's Range object 
(with ArrayByteSequence) to be a bit more reliable when checking overlap than 
KeyExtent, which carries some baggage. We should probably switch to that for 
this impl, and check the other commands to see if they are affected.

> 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
>            Priority: Minor
>              Labels: newbie
>             Fix For: 1.6.6, 1.7.1, 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)

Reply via email to