Re: Endpoint vs. Observer Coprocessors

2013-05-03 Thread Gary Helmling
A single class can act as both a RegionObserver and an endpoint. The Base... classes are just there for convenience. To implement both, for example, you could: 1) have your class extend BaseRegionObserver, override postPut(), etc 2) define an interface that extends CoprocessorProtocol. the metho

Re: Eternal RIT problem when RS tries to access wrong region-folder on HDFS

2013-05-03 Thread Kevin O'dell
Dimitri, This was the correct approach, if the directory /hbase/documents/ 5b9c16898a371de58f31f0bdf86b1f**8b did not exist, then it was a smart move to get rid of the pointers to it. I don't think we have a JIRA for this yet...BUT we really need one. Can you please file one? I think there has

Re: Eternal RIT problem when RS tries to access wrong region-folder on HDFS

2013-05-03 Thread Dimitri Goldin
Hi Kevin, On 05/03/2013 02:57 PM, Kevin O'dell wrote: > That is interesting. I have seen this before, can you please send a > hadoop fs -lsr /hbase/documents? This is going to be caused by a bad > split. I will let you know what files you need to delete to safely > recover from this error. Th

RE: HBase thrift API - Mutation store a float in a column

2013-05-03 Thread Nicolas Seyvet
Cool. Thanks a lot. -Original Message- From: Ted Yu [mailto:yuzhih...@gmail.com] Sent: Friday, May 03, 2013 4:13 PM To: user@hbase.apache.org Subject: Re: HBase thrift API - Mutation store a float in a column Nicolas: I think Java client should be able to read this float - after convers

Re: HBase thrift API - Mutation store a float in a column

2013-05-03 Thread Ted Yu
Nicolas: I think Java client should be able to read this float - after conversion. Cheers On Fri, May 3, 2013 at 6:58 AM, Nicolas Seyvet wrote: > Hi, > > Thanks Ted. > > I think you mean to use flip() in order to pre-dispose the buffer for read > (ie a get). if I use flip() after generating the

RE: HBase thrift API - Mutation store a float in a column

2013-05-03 Thread Nicolas Seyvet
Hi, Thanks Ted. I think you mean to use flip() in order to pre-dispose the buffer for read (ie a get). if I use flip() after generating the ByteBuffer then my data gets to be stored in the row. ByteBuffer buf = ByteBuffer.allocate(8); buf.putFloat(12f) buf.flip(); mutation.setValue(buf); w

Re: HBase thrift API - Mutation store a float in a column

2013-05-03 Thread Ted Yu
Looking at http://docs.oracle.com/javase/6/docs/api/java/nio/ByteBuffer.html#putFloat(float): ... into this buffer at the current position, and then increments the position by four. In TBaseHelper: public static int byteBufferToByteArray(ByteBuffer byteBuffer, byte[] target, int offset) {

RE: HBase thrift API - Mutation store a float in a column

2013-05-03 Thread Nicolas Seyvet
The initial value is 12.0, the resulting is always =\x00\x00\x00\x00 Even if I put something bigger or smaller. -Original Message- From: manoj p [mailto:eors...@gmail.com] Sent: Friday, May 03, 2013 3:31 PM To: user@hbase.apache.org Subject: Re: HBase thrift API - Mutation store a float

Re: HBase thrift API - Mutation store a float in a column

2013-05-03 Thread manoj p
HBase stores values as byte arrays. When a float value is converted to byte, there is a possibility of data truncation. I guess the precision loss that happens due to data truncation might be the reason for getting the same value 0 repeatedly. BR/Manoj

HBase thrift API - Mutation store a float in a column

2013-05-03 Thread Nicolas Seyvet
Hi, Using the HBase thrift API, and Java as a programming language, it seems that when setting a value in a Mutation : Mutation mutation = new Mutation(); mutation.setIsDelete(false); mutation.setColumn(StringUtils.bytes("data latitude")); ByteBuffer buf = ByteBuffer.allocate(8); mutation.setV

Re: HBase is not running.

2013-05-03 Thread Yves S. Garret
Awesome, thanks. I'll look into it. On Fri, May 3, 2013 at 6:52 AM, Mohammad Tariq wrote: > Yes..You can do that. I would suggest you to start fresh and setup a single > node setup first. Once it is working fine, extending it to multiple > machines is just a matter of copying the config files.

Re: Eternal RIT problem when RS tries to access wrong region-folder on HDFS

2013-05-03 Thread Kevin O'dell
Hi Dimitry, That is interesting. I have seen this before, can you please send a hadoop fs -lsr /hbase/documents? This is going to be caused by a bad split. I will let you know what files you need to delete to safely recover from this error. On Thu, May 2, 2013 at 10:17 AM, Dimitri Goldin wr

Re: Endpoint vs. Observer Coprocessors

2013-05-03 Thread Pavel Hančar
Hello, I'd like to have an object (index of vectors of pictures) in RAM of every regionserver. To have a variable of some Coprocessor class seems to be good way. I need to add a new vector to the index, when I add a picture to HBase (it's the postPut() method) and then I need to search trough the

Re: Endpoint vs. Observer Coprocessors

2013-05-03 Thread Anoop John
>data in one common variable Didn't follow u completely. Can u tell us little more on your usage. How exactly the endpoint to be related with the CP hook (u said postPut) -Anoop- On Fri, May 3, 2013 at 4:04 PM, Pavel Hančar wrote: > Hello, > I've just started to discover coprocessors. Namely t

Re: HBase is not running.

2013-05-03 Thread Mohammad Tariq
Yes..You can do that. I would suggest you to start fresh and setup a single node setup first. Once it is working fine, extending it to multiple machines is just a matter of copying the config files. I have explained the procedure here

Re: Poor HBase map-reduce scan performance

2013-05-03 Thread Bryan Keller
Actually I'm not too confident in my results re block size, they may have been related to major compaction. I'm going to rerun before drawing any conclusions. On May 3, 2013, at 12:17 AM, Bryan Keller wrote: > I finally made some progress. I tried a very large HBase block size (16mb), > and it

Endpoint vs. Observer Coprocessors

2013-05-03 Thread Pavel Hančar
Hello, I've just started to discover coprocessors. Namely the classes BaseEndpointCoprocessor and BaseRegionObserver. I need the postPut() method and than some special user calls. So I need both, but I want to have my data in one common variable. What's the easiest way to manage? Do I have to Imple

Re: Poor HBase map-reduce scan performance

2013-05-03 Thread Bryan Keller
I finally made some progress. I tried a very large HBase block size (16mb), and it significantly improved scan performance. I went from 45-50 min to 24 min. Not great but much better. Before I had it set to 128k. Scanning an equivalent sequence file takes 10 min. My random read performance will