Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> KeyValue.getLength() question


+
Kim Chew 2013-09-25, 07:06
+
Robert Dyer 2013-09-25, 07:13
+
Kim Chew 2013-09-25, 17:12
+
lars hofhansl 2013-09-26, 04:23
Copy link to this message
-
Re: KeyValue.getLength() question
myKV.getLength() is alway <= myKV.getBuffer().length.

The buffer here is typically an HFile block. We use that buffer and pass it up the chain without making any further copy of the KV.
-- Lars

----- Original Message -----
From: Kim Chew <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc:
Sent: Wednesday, September 25, 2013 12:06 AM
Subject: KeyValue.getLength() question

Hello,

I have a "strange" situation that I can't wrap my head around it. Say, for
example, I have an KeyValue instance, shouldn't

    myKV.getLength() == myKV.getBuffer().length ?

Given that, "getLength()" returns "Length of bytes this KeyValue occupies
in getBuffer()<http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/KeyValue.html#getBuffer%28%29>
."
In my case the value returned by "myKV.getBuffer().length" is greater than
"myKV.getLength()". What possibly went wrong?

TIA

Kim.
+
Kim Chew 2013-09-26, 00:40
+
lars hofhansl 2013-09-26, 04:30
+
Kim Chew 2013-09-28, 00:20
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB