<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HBASE Incr clarification in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152210#M44653</link>
    <description>&lt;P&gt;Thanks Rajesh for your valuable time&lt;/P&gt;</description>
    <pubDate>Thu, 27 Oct 2016 15:44:20 GMT</pubDate>
    <dc:creator>vamsi123</dc:creator>
    <dc:date>2016-10-27T15:44:20Z</dc:date>
    <item>
      <title>HBASE Incr clarification</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152208#M44651</link>
      <description>&lt;P&gt;Hi I have below clarification on incr command. &lt;/P&gt;&lt;P&gt;1)what is the meaning of COUNTER VALUE = 23 i can see cf1:no3 is incremented to 3 but i did not what is meant by COUNTER VALUE = 23? &lt;/P&gt;&lt;P&gt;2)How to identify no of rows&lt;STRONG&gt;[3 row(s)]&lt;/STRONG&gt;?Is it no of distinct keys present in HBASE table? &lt;/P&gt;&lt;P&gt;3)The below command is showing following error.can not we use incr on existing column in HBASE? &lt;/P&gt;&lt;P&gt;incr 'emp_vamsi','123','cf1:no',3&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error:- ERROR:&lt;/STRONG&gt; org.apache.hadoop.hbase.DoNotRetryIOException: org.apache.hadoop.hbase.DoNotRetryIOException: Attempted to increment field that isn't 64 bits wide incr 'emp_vamsi','123','cf1:no3',3&lt;/P&gt;&lt;PRE&gt;Below is my source:
hbase(main):028:0&amp;gt; scan 'emp_vamsi'
ROW                                COLUMN+CELL                                                                                       
 123                               column=cf1:name, timestamp=1477459091210, value=vamsi1                                            
 123                               column=cf1:no, timestamp=1477546999021, value=1                                                   
 123                               column=cf1:no1, timestamp=1477547356118, value=\x00\x00\x00\x00\x00\x00\x00\x19                   
 123                               column=cf1:no3, timestamp=1477547272487, value=\x00\x00\x00\x00\x00\x00\x00\x14                   
 123                               column=cf1:no34, timestamp=1477547405178, value=\x00\x00\x00\x00\x00\x00\x00\x15                  
 123                               column=cf1:role, timestamp=1477459091210, value=TL                                                
 345                               column=cf1:name, timestamp=1477459091210, value=vishnu                                            
 345                               column=cf1:role, timestamp=1477459091210, value=HR                                                
 567                               column=cf1:name, timestamp=1477459091210, value=ramya                                             
 567                               column=cf1:role, timestamp=1477459091210, value=wife                                              
3 row(s) in 0.0350 seconds


Incr command:
hbase(main):029:0&amp;gt; incr 'emp_vamsi','123','cf1:no3',3
COUNTER VALUE = 23


hbase(main):030:0&amp;gt; scan 'emp_vamsi'
ROW                                COLUMN+CELL                                                                                       
 123                               column=cf1:name, timestamp=1477459091210, value=vamsi1                                            
 123                               column=cf1:no, timestamp=1477546999021, value=1                                                   
 123                               column=cf1:no1, timestamp=1477547356118, value=\x00\x00\x00\x00\x00\x00\x00\x19                   
 123                               column=cf1:no3, timestamp=1477547447862, value=\x00\x00\x00\x00\x00\x00\x00\x17                   
 123                               column=cf1:no34, timestamp=1477547405178, value=\x00\x00\x00\x00\x00\x00\x00\x15                  
 123                               column=cf1:role, timestamp=1477459091210, value=TL                                                
 345                               column=cf1:name, timestamp=1477459091210, value=vishnu                                            
 345                               column=cf1:role, timestamp=1477459091210, value=HR                                                
 567                               column=cf1:name, timestamp=1477459091210, value=ramya                                             
 567                               column=cf1:role, timestamp=1477459091210, value=wife                                              
3 row(s) in 0.0440 seconds


&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Oct 2016 15:21:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152208#M44651</guid>
      <dc:creator>vamsi123</dc:creator>
      <dc:date>2016-10-27T15:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: HBASE Incr clarification</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152209#M44652</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/9789/vamsivalivetiedu.html" nodeid="9789"&gt;@vamsi valiveti&lt;/A&gt;&lt;P&gt;bq. 1)what is the meaning of COUNTER VALUE = 23 i can see cf1:no3 is incremented to 3 but i did not what is meant by COUNTER VALUE = 23?&lt;/P&gt;&lt;P&gt;COUNTER VALUE printed is latest value after incrementing the value to specified number. In your case the column value before incrementing might be 20.&lt;/P&gt;&lt;PRE&gt;=&amp;gt; Hbase::Table - test
hbase(main):013:0&amp;gt; incr 'test', 'spam', 'foo:bar', 1
COUNTER VALUE = 1
0 row(s) in 0.0080 seconds

hbase(main):014:0&amp;gt; incr 'test', 'spam', 'foo:bar', 1
COUNTER VALUE = 2
0 row(s) in 0.0060 seconds

hbase(main):015:0&amp;gt; incr 'test', 'spam', 'foo:bar', 1
COUNTER VALUE = 3
0 row(s) in 0.0040 seconds&lt;/PRE&gt;&lt;P&gt;bq. 2)How to identify no of rows&lt;STRONG&gt;[3 row(s)]&lt;/STRONG&gt;?Is it no of distinct keys present in HBASE table?&lt;/P&gt;&lt;P&gt;Yes. It's distinct row keys in the table.&lt;/P&gt;&lt;P&gt;bq. 3)The below command is showing following error.can not we use incr on existing column in HBASE?&lt;/P&gt;&lt;P&gt;Yes we cannot use incr on existing column. The column value should be initialized with incr only.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 15:36:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152209#M44652</guid>
      <dc:creator>rchintaguntla</dc:creator>
      <dc:date>2016-10-27T15:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: HBASE Incr clarification</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152210#M44653</link>
      <description>&lt;P&gt;Thanks Rajesh for your valuable time&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2016 15:44:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HBASE-Incr-clarification/m-p/152210#M44653</guid>
      <dc:creator>vamsi123</dc:creator>
      <dc:date>2016-10-27T15:44:20Z</dc:date>
    </item>
  </channel>
</rss>

