You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Enis Soztutar (JIRA)" <ji...@apache.org> on 2015/04/08 22:36:12 UTC
[jira] [Commented] (HBASE-13433) Backward compatibility in 1.0.z
for shell broken for get_counter
[ https://issues.apache.org/jira/browse/HBASE-13433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14485957#comment-14485957 ]
Enis Soztutar commented on HBASE-13433:
---------------------------------------
So the problem is previously only 4 args version had to be used. 3 arg version was throwing an exception. That is why we expect users to be using the 4 arg version?
If that is the case, it seems that we should allow both 3 arg and 4 arg in 1.0 and 0.98.
Something like this:
{code}
diff --git hbase-shell/src/main/ruby/shell/commands/get_counter.rb hbase-shell/src/main/ruby/shell/commands/get_counter.rb
index 6708c6a..a058329 100644
--- hbase-shell/src/main/ruby/shell/commands/get_counter.rb
+++ hbase-shell/src/main/ruby/shell/commands/get_counter.rb
@@ -36,11 +36,11 @@ t to table 't1', the corresponding command would be:
EOF
end
- def command(table, row, column)
+ def command(table, row, column, value = nil)
get_counter(table(table), row, column)
end
- def get_counter(table, row, column)
+ def get_counter(table, row, column, value = nil)
if cnt = table._get_counter_internal(row, column)
puts "COUNTER VALUE = #{cnt}"
else
{code}
> Backward compatibility in 1.0.z for shell broken for get_counter
> ----------------------------------------------------------------
>
> Key: HBASE-13433
> URL: https://issues.apache.org/jira/browse/HBASE-13433
> Project: HBase
> Issue Type: Bug
> Components: shell
> Affects Versions: 1.0.1
> Reporter: Sean Busbey
> Assignee: Sean Busbey
> Priority: Blocker
>
> In 1.0.0, to use counters I need my hbase-shell commands to looks like this:
> {code}
> get_counter 'counter_example', 'r1', 'cf1:foo', :DUMMY
> incr 'counter_example', 'r1', 'cf1:foo', 10
> get_counter 'counter_example', 'r1', 'cf1:foo', :DUMMY
> incr 'counter_example', 'r1', 'cf1:foo'
> get_counter 'counter_example', 'r1', 'cf1:foo', :DUMMY
> incr 'counter_example', 'r1', 'cf1:foo', 10
> get_counter 'counter_example', 'r1', 'cf1:foo', :DUMMY
> {code}
> the same {{get_counter}} commands will fail in current branch-1.0 due to the changes in HBASE-10728.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)