hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10728) get_counter value is never used.
Date Sat, 28 Mar 2015 09:21:53 GMT

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

Lars George commented on HBASE-10728:
-------------------------------------

I added

{code}
      result = @table.increment(incr)
      return nil if result.isEmpty

      # Fetch cell value
      cell = result.listCells[0]
      org.apache.hadoop.hbase.util.Bytes::toLong(cell.getValue)
{code}

to table.rb#_incr_internal and

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

into incr.rb, and now I get the value printed again. If there are no objections I recommend
adding this again. 

The other thing [~jmspaggi] pointed out is the standard use of a required {{value}} parameter
for some commands. We should clean this up too, I call copy&paste error. At least for
{{get_counter}} it is never used as JM pointed out a year ago. :(


> get_counter value is never used.
> --------------------------------
>
>                 Key: HBASE-10728
>                 URL: https://issues.apache.org/jira/browse/HBASE-10728
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.2, 0.98.1, 0.99.0
>            Reporter: Jean-Marc Spaggiari
>            Assignee: Jean-Marc Spaggiari
>         Attachments: HBASE-10728-v0-0.96.patch, HBASE-10728-v0-0.98.patch, HBASE-10728-v0-trunk.patch,
HBASE-10728-v1-0.96.patch, HBASE-10728-v1-0.98.patch, HBASE-10728-v1-trunk.patch, HBASE-10728-v2-trunk.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message