hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Marc Spaggiari (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-10728) get_counter value is never used.
Date Wed, 12 Mar 2014 21:26:46 GMT

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

Jean-Marc Spaggiari edited comment on HBASE-10728 at 3/12/14 9:25 PM:
----------------------------------------------------------------------

Here:

{code}
      def command(table, row, column, value)
        get_counter(table(table), row, column, value)
      end

      def get_counter(table, row, column, value = nil)
        if cnt = table._get_counter_internal(row, column)
          puts "COUNTER VALUE = #{cnt}"
        else
          puts "No counter found at specified coordinates"
        end
      end
{code}

In get_counter.rb.

As a result you need to always give a 4th parameter to the call from the shell, but this parameter
is never used. So you just need to give a dummy value. I tried with 0, 999, and even more,
and it doesn't change anything. It's confirmed in the code that it's not used.




was (Author: jmspaggi):
Here:

{code}
module Shell
  module Commands
    class GetCounter < Command
      def help
        return <<-EOF
Return a counter cell value at specified table/row/column coordinates.
A cell cell should be managed with atomic increment function oh HBase
and the data should be binary encoded. Example:

  hbase> get_counter 't1', 'r1', 'c1'
EOF
      end

      def command(table, row, column, value = nil)
        if cnt = table(table).get_counter(row, column)
          puts "COUNTER VALUE = #{cnt}"
        else
          puts "No counter found at specified coordinates"
        end
      end
    end
  end
end
{code}

In get_counter.rb.

As a result you need to always give a 4th parameter to the call from the shell, but this parameter
is never used. So you just need to give a dummy value. I tried with 0, 999, and even more,
and it doesn't change anything. It's confirmed in the code that it's not used.



> get_counter value is never used.
> --------------------------------
>
>                 Key: HBASE-10728
>                 URL: https://issues.apache.org/jira/browse/HBASE-10728
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Jean-Marc Spaggiari
>            Assignee: Jean-Marc Spaggiari
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message