hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heng Chen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-16111) Truncate preserve shell command is broken
Date Mon, 27 Jun 2016 07:09:52 GMT

     [ https://issues.apache.org/jira/browse/HBASE-16111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Heng Chen updated HBASE-16111:
    Attachment: HBASE-16111.patch

It was introduced by 
commit 15c03fd1c97c271aca6dc30feab35ec0c9f8edbe
Author: Apekshit Sharma <appy@apache.org>
Date:   Mon Jun 6 13:35:06 2016 -0700

    - Testing by executing a command will cover the exact path users will trigger, so its
better then directly calling library functions in tests. Changing the tests to use @shell.command(:

    Norm change:
    Commands should print the output user would like to see, but in the end, should also return
the relevant value. This way:
    - Tests can use returned value to check that functionality works
    - Tests can capture stdout to assert particular kind of output user should see.
    - We do not print the return value in interactive mode and keep the output clean. See
Shell.command() function.

    Bugs found due to this change:
    - Uncovered bug in major_compact.rb with this approach. It was calling admin.majorCompact()
which doesn't exist but our tests didn't catch it since they directly tested admin.major_comp
    - Enabled TestReplicationShell. If it's bad, flaky infra will take care of it.

    Change-Id: I5d8af16bf477a79a2f526a5bf11c245b02b7d276

Fix it now. 

> Truncate preserve shell command is broken
> -----------------------------------------
>                 Key: HBASE-16111
>                 URL: https://issues.apache.org/jira/browse/HBASE-16111
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Elliott Clark
>         Attachments: HBASE-16111.patch
> On a recent version of master I get this:
> {code}
> hbase(main):001:0> truncate_preserve 'TestTable'
> ERROR: undefined local variable or method `table' for #<Hbase::Admin:0x2fdf17dc>
> Here is some help for this command:
>   Disables, drops and recreates the specified table while still maintaing the previous
region boundaries.
> Took 0.0290 seconds
> hbase(main):002:0> truncate 'TestTable'
> Truncating 'TestTable' table (it may take a while):
> Disabling table...
> Truncating table...
> Took 10.0040 seconds
> {code}

This message was sent by Atlassian JIRA

View raw message