[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-02 Thread Hudson (JIRA)

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

Hudson commented on HBASE-8798:
---

Integrated in HBase-TRUNK #4209 (See 
[https://builds.apache.org/job/HBase-TRUNK/4209/])
HBASE-8798 Fix a minor bug in shell command with clone_snapshot table error 
(Revision 1499138)

 Result = FAILURE
tedyu : 
Files : 
* 
/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
* /hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb


> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Ted Yu
>Priority: Minor
> Fix For: 0.98.0
>
> Attachments: 8798-trunk-v2.txt, 8798-v3.txt, HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-02 Thread Hudson (JIRA)

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

Hudson commented on HBASE-8798:
---

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #593 (See 
[https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/593/])
HBASE-8798 Fix a minor bug in shell command with clone_snapshot table error 
(Revision 1499138)

 Result = FAILURE
tedyu : 
Files : 
* 
/hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
* /hbase/trunk/hbase-server/src/main/ruby/shell/commands.rb


> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Ted Yu
>Priority: Minor
> Fix For: 0.98.0
>
> Attachments: 8798-trunk-v2.txt, 8798-v3.txt, HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-02 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-8798:
--

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12590503/8798-v3.txt
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 hadoop1.0{color}.  The patch compiles against the hadoop 
1.0 profile.

{color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 
2.0 profile.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6195//console

This message is automatically generated.

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Ted Yu
>Priority: Minor
> Attachments: 8798-trunk-v2.txt, 8798-v3.txt, HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.Tabl

[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-02 Thread Matteo Bertozzi (JIRA)

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

Matteo Bertozzi commented on HBASE-8798:


+1 on v3

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: 8798-trunk-v2.txt, 8798-v3.txt, HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-02 Thread Matteo Bertozzi (JIRA)

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

Matteo Bertozzi commented on HBASE-8798:


removing the rescue/raise results in a different behaviour. (It shows the full 
stack trace of the exception)

When I mentioned that only the TableExists exception from the snapshot code is 
"the good one" I was referring to changing the shell code to print the 
exception message, but to do that you've to change the other couple of throws 
new TableException() to have a better message to show... at the moment is only 
the table name.. or alternative rely on the message to be just the table name.. 
and change the exception message raised by clone snapshot

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: 8798-trunk-v2.txt, HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-8798:
--

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12590329/8798-trunk-v2.txt
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 hadoop1.0{color}.  The patch compiles against the hadoop 
1.0 profile.

{color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 
2.0 profile.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

{color:red}-1 site{color}.  The patch appears to cause mvn site goal to 
fail.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6182//console

This message is automatically generated.

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: 8798-trunk-v2.txt, HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.Ta

[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-8798:
---

Search under trunk for TableExistsException showed me:
{code}
$ find . -name '*.java' -exec grep 'new TableExistsException(' {} \; -print
  throw new TableExistsException("Table '" + tableName + " already exists");
./hbase-client/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java
throw new TableExistsException(tableName);
  throw new TableExistsException(tableName);
./hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/CreateTableHandler.java
{code}
Looks like table name is already in the exception.

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Jerry He (JIRA)

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

Jerry He commented on HBASE-8798:
-

Hi, Ted, Matteo

Thanks for the review. 
The commands.rb has some existing logic that tries to 'rescue' some exceptions. 
It will get more and more difficult to keep it generic artificially as we 
evolve and add more ...
The approach to expand (instead of shrink) this logic is not a bad or ugly one 
...

But your suggested solution is fine.

 

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-8798:
---

bq. update the other TableExistsException raised in the code to add the table 
name?
+1

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Matteo Bertozzi (JIRA)

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

Matteo Bertozzi commented on HBASE-8798:


{code}
TableExistsException contains the table name.
Maybe let TableExistsException bubble up ?
{code}
I've done a quick grep, and the TableExistsException from the clone snapshot 
seems to have the table name but the other don't... 
Anyway, I prefer this idea... that seems easy and keeps the module generic... 
update the other TableExistsException raised in the code to add the table name?

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-8798:
---

TableExistsException contains the table name.
Maybe let TableExistsException bubble up ?

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Matteo Bertozzi (JIRA)

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

Matteo Bertozzi commented on HBASE-8798:


aside from the fact that the patch works, and is a quick way to fix it.

I don't think that hardcoding the "clone snapshot" reference inside the generic 
commands module is the way to go.

(I don't have a more generic solution at the moment, but adding an if to fix 
the problem is not the solution)

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Ted Yu (JIRA)

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

Ted Yu commented on HBASE-8798:
---

+1

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-07-01 Thread Jerry He (JIRA)

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

Jerry He commented on HBASE-8798:
-

Here is the output after the fix.

hbase(main):001:0> list
TABLE
TestTable
1 row(s) in 1.1350 seconds

=> ["TestTable"]
hbase(main):002:0> list_snapshots
SNAPSHOTTABLE + CREATION TIME
 mysnapshot1TestTable (Mon Jun 24 13:29:00 -0700 2013)
1 row(s) in 0.2040 seconds

=> ["mysnapshot1"]
hbase(main):003:0> clone_snapshot 'mysnapshot1', 'TestTable'

ERROR: Table already exists: *TestTable!*

Here is some help for this command:
Create a new table by cloning the snapshot content.
There're no copies of data involved.
And writing on the newly created table will not influence the snapshot data.

Examples:
  hbase> clone_snapshot 'snapshotName', 'tableName'

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
> raise "Table already exists: #{args.first}!"
>   end
> {code}
> This is fine with commands like 'create tableName ...' but not 
> 'clone_snapshot snapshotName tableName'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-8798) Fix a minor bug in shell command with clone_snapshot table error

2013-06-24 Thread Hadoop QA (JIRA)

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

Hadoop QA commented on HBASE-8798:
--

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12589485/HBASE-8798-trunk.patch
  against trunk revision .

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 hadoop1.0{color}.  The patch compiles against the hadoop 
1.0 profile.

{color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 
2.0 profile.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 1.3.9) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//testReport/
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/6129//console

This message is automatically generated.

> Fix a minor bug in shell command with clone_snapshot table error
> 
>
> Key: HBASE-8798
> URL: https://issues.apache.org/jira/browse/HBASE-8798
> Project: HBase
>  Issue Type: Bug
>  Components: shell, snapshots
>Affects Versions: 0.94.8, 0.95.1
>Reporter: Jerry He
>Assignee: Jerry He
>Priority: Minor
> Attachments: HBASE-8798-trunk.patch
>
>
> In HBase shell, the syntax for clone_snapshot is:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> If the target table already exists, we'll get an error.
> For example:
> --
> hbase(main):011:0> clone_snapshot 'mysnapshot1', 'TestTable'
> ERROR: Table already exists: mysnapshot1!
> Here is some help for this command:
> Create a new table by cloning the snapshot content.
> There're no copies of data involved.
> And writing on the newly created table will not influence the snapshot data.
> Examples:
>   hbase> clone_snapshot 'snapshotName', 'tableName'
> --
> The bug is in the ERROR message:
> *ERROR: Table already exists: mysnapshot1!*
> We should output the table name, not the snapshot name.
> Currently, in command.rb, we have the output fixed as args.first for 
> TableExistsException:
> {code}
>   def translate_hbase_exceptions(*args)
> yield
>   rescue org.apache.hadoop.hbase.exceptions.TableNotFoundException
> raise "Unknown table #{args.first}!"
>   rescue org.apache.hadoop.hbase.exceptions.NoSuchColumnFamilyException
> valid_cols = table(args.first).get_all_columns.map { |c| c + '*' }
> raise "Unknown column family! Valid column names: 
> #{valid_cols.join(", ")}"
>   rescue org.apache.hadoop.hbase.exceptions.TableExistsException
>