Re: Is "synchronized" required?

2013-02-05 Thread Adrien Mogenet
I probably don't know your application enough to make an accurate answer, but you could have a look at asynchbase [ https://github.com/OpenTSDB/asynchbase] if you have thread-safety issues and feel the need to control your resources over your threads. On Wed, Feb 6, 2013 at 7:36 AM, Bing Li wrot

Re: Is "synchronized" required?

2013-02-05 Thread lars hofhansl
Don't use a pool at all. With HBASE-4805 (https://issues.apache.org/jira/browse/HBASE-4805) you can precreate an HConnection and ExecutorService and then make HTable cheaply on demand every time you need one. Checkout HConnectionManager.createConnection(...) and the HTable constructors. I need

Re: Is "synchronized" required?

2013-02-05 Thread Bing Li
Lars, I found that at least the exceptions have nothing to do with shared HTable. To save the resources, I designed a pool for the classes that write and read from HBase. The primary resources consumed in the classes are HTable. The pool has some bugs. My question is whether it is necessary to d

Re: Query on JSON Object

2013-02-05 Thread Bryan Beaudreault
HBase deals in byte arrays, so simply convert your json string to a byte array on save, and convert back on read. Use the Bytes.toBytes(String) and Bytes.toString(byte[]) accordingly. I'm not sure what your example is exactly, a representation of two json blobs? Sent from iPhone. On Feb 6,

Query on JSON Object

2013-02-05 Thread varaprasad . bheri
Hi, Need to create the data as given below in JSON Object and put the data into Hbase table using java ID Address Type Address1 Address2 Address3 1home xxx 2office y y y How to put Json object i

Re: Is "synchronized" required?

2013-02-05 Thread lars hofhansl
Are you sharing this.rankTable between threads? HTable is not thread safe. -- Lars From: Bing Li To: "hbase-u...@hadoop.apache.org" ; user Sent: Tuesday, February 5, 2013 8:54 AM Subject: Re: Is "synchronized" required? Dear all, After "synchronized" is

Re: HBase coprocessor callback for comet

2013-02-05 Thread Andrew Purtell
You are better off using your own RPC. Thrift would be a good choice. On Tuesday, February 5, 2013, Jan Althaus wrote: > Sorry for breaking the thread. It seems my subscription wasn't active at > the time the reply was posted. > > The client receiving the notifications would be a separate process

Re: HBase coprocessor callback for comet

2013-02-05 Thread Jan Althaus
Sorry for breaking the thread. It seems my subscription wasn't active at the time the reply was posted. The client receiving the notifications would be a separate process, potentially on a different machine. It could obviously connect to the HBase cluster though. I can certainly see how deliverin

Re: HBase coprocessor callback for comet

2013-02-05 Thread Ted Yu
Please be a little more specific about where the notifications should be received. Your custom RegionObserver lives on region server. I guess you want notifications to be delivered to your client, outside the cluster. Cheers On Tue, Feb 5, 2013 at 12:18 PM, Jan Althaus wrote: > Hi, > > I woul

Re: The Exceptions When Concurrently Writing and Reading

2013-02-05 Thread Bing Li
Dear all, Sorry, I just found that the same exceptions when "synchronized" is added. Some other problems may exist. I am now checking. Do you have any suggestions? Thanks so much! Best regards, Bing On Wed, Feb 6, 2013 at 3:00 AM, Bing Li wrote: > Ted, > > The version is 0.92.0. Is it what y

Re: The Exceptions When Concurrently Writing and Reading

2013-02-05 Thread Bing Li
Ted, The version is 0.92.0. Is it what you need? BTW, now I runs HBase in the pseudo-distributed mode. Thanks! Bing On Wed, Feb 6, 2013 at 2:49 AM, Ted Yu wrote: > There're several 0.92 releases, can you be more specific ? > > Thanks > > > On Tue, Feb 5, 2013 at 10:46 AM, Bing Li wrote: >> >

Re: The Exceptions When Concurrently Writing and Reading

2013-02-05 Thread Ted Yu
There're several 0.92 releases, can you be more specific ? Thanks On Tue, Feb 5, 2013 at 10:46 AM, Bing Li wrote: > Dear Ted, > > My HBase is 0.92. > > Thanks! > Bing > > On Wed, Feb 6, 2013 at 2:45 AM, Ted Yu wrote: > > To help us more easily correlate line numbers, can you tell us the > vers

Re: The Exceptions When Concurrently Writing and Reading

2013-02-05 Thread Bing Li
Dear Ted, My HBase is 0.92. Thanks! Bing On Wed, Feb 6, 2013 at 2:45 AM, Ted Yu wrote: > To help us more easily correlate line numbers, can you tell us the version > of HBase you're using ? > > Thanks > > On Tue, Feb 5, 2013 at 10:39 AM, Bing Li wrote: > >> Dear all, >> >> To raise the perform

Re: The Exceptions When Concurrently Writing and Reading

2013-02-05 Thread Ted Yu
To help us more easily correlate line numbers, can you tell us the version of HBase you're using ? Thanks On Tue, Feb 5, 2013 at 10:39 AM, Bing Li wrote: > Dear all, > > To raise the performance of writing data into HBase, the > "synchronized" is removed from the writing method. > > But after "

The Exceptions When Concurrently Writing and Reading

2013-02-05 Thread Bing Li
Dear all, To raise the performance of writing data into HBase, the "synchronized" is removed from the writing method. But after "synchronized" is removed from the method of writing, I get the following exceptions when reading. Before the removal, no such exceptions. Could you help me how to solv

Re: Empty a table

2013-02-05 Thread Andrew Purtell
If there is a time consideration here, perhaps you want to do this because the data isn't interesting after some time interval has elapsed but the keyspace for new entries will be similar -- then consider using TTLs. It's easy and they will do what you want, garbage collecting useless data while no

Re: Empty a table

2013-02-05 Thread Jean-Marc Spaggiari
Nive to see that it's already in progress ;) Tian-Ying, thanks for the idea. I will most probably give it a try! JM 2013/2/5, Ted Yu : > Looks like a little polishing would make the tool available in 0.96 :-) > > On Tue, Feb 5, 2013 at 9:38 AM, Kevin O'dell > wrote: > >> I am a bad person, but I

Re: Empty a table

2013-02-05 Thread Ted Yu
Looks like a little polishing would make the tool available in 0.96 :-) On Tue, Feb 5, 2013 at 9:38 AM, Kevin O'dell wrote: > I am a bad person, but I have that JIRA in my name. I need to make the > patch pretty. > > https://issues.apache.org/jira/browse/HBASE-5525 > > There is a patch there tha

Re: Empty a table

2013-02-05 Thread Kevin O'dell
I am a bad person, but I have that JIRA in my name. I need to make the patch pretty. https://issues.apache.org/jira/browse/HBASE-5525 There is a patch there that works, it is just not pretty. On Tue, Feb 5, 2013 at 12:28 PM, Ted Yu wrote: > To my knowledge there is no such tool. > > You can f

RE: Empty a table

2013-02-05 Thread Tianying Chang
You can achieve this goal by deleting all the HFiles of this table. Remember just Hfile, but not the region folders. We did it before with a simple script that loop through the Hfiles, very easy. Thanks Tian-Ying -Original Message- From: Ted Yu [mailto:yuzhih...@gmail.com] Sent: Tue

Re: Empty a table

2013-02-05 Thread Ted Yu
To my knowledge there is no such tool. You can file a JIRA in case someone has bandwidth to work on such tool. Thanks On Tue, Feb 5, 2013 at 8:13 AM, Jean-Marc Spaggiari wrote: > Hi, > > Is there an easy way to empty a table but keep the regions? Truncate > will remove everything even the spli

Re: Is "synchronized" required?

2013-02-05 Thread Bing Li
Dear all, After "synchronized" is removed from the method of writing, I get the following exceptions when reading. Before the removal, no such exceptions. Could you help me how to solve it? Thanks so much! Best wishes, Bing [java] Feb 6, 2013 12:21:31 AM org.apache.hadoop.hbase.ipc.HBaseC

Empty a table

2013-02-05 Thread Jean-Marc Spaggiari
Hi, Is there an easy way to empty a table but keep the regions? Truncate will remove everything even the splitting. But I want to keep the regions the way they are. I just want to clean them. Is there a simple way to do that with the shell or something like that? Thanks, JM

Re: remove dead regions server

2013-02-05 Thread Bryan Beaudreault
There really should be no issue or slowdown involved with restarting the masters. The operation only takes 1-2 seconds and is pretty much transparent to clients. We run hundreds of M/R jobs as well as a handful of online APIs hitting hbase and have not seen any issue restarting masters at will wh

Re: MemStoreFlusher: region has too many store files (client timeout)

2013-02-05 Thread kzurek
Thanks, but I've already read that article and I was trying to set up settings accordingly. But any type of help could be useful. Here are logs (compressed with tar gzip): hbase_logs.tar.gz Kevin O'dell wrote > kzurek,

Re: MemStoreFlusher: region has too many store files (client timeout)

2013-02-05 Thread Kevin O'dell
kzurek, Okay, that is a fair flush size(I have not seen larger than 256MB). Do you think you could send me a RS log from yesterday while you were seeing this issue? I would just like to thumb through it and make some tuning recommendations. I have a pretty good idea of what you need to do, if

Re: cluster monitoring

2013-02-05 Thread Michael Segel
Sounds like you're looking to see what rows are being selected within a region. In theory you could do this w coprocessors, but I wouldn't recommend it. You're going to take a huge performance hit and you'd have a hard time justifying it. (IMHO) The problem w a Debug mode is that once you load

Re: cluster monitoring

2013-02-05 Thread Mohammad Tariq
Hello Rita, Monitoring at what level?Do you want to print the roewkeys while you are processing or is it something else? Warm Regards, Tariq https://mtariq.jux.com/ cloudfront.blogspot.com On Tue, Feb 5, 2013 at 6:57 PM, Rita wrote: > hi, > > is it possible to see what keys are being h

Re: remove deadservers

2013-02-05 Thread samar kumar
@Bryan Thanks for replying. We are running multiple masters, but we have continuos jobs running and dint want any of the jobs go slow while the master shifts. Regards, Samar On 04/02/13 7:40 PM, "Bryan Beaudreault" wrote: >Assuming you are running with multiple masters it should be perfectly >

Re: remove dead regions server

2013-02-05 Thread Nicolas Liochon
Hi, Looking at the code, no. Nicolas On Tue, Feb 5, 2013 at 9:21 AM, samar kumar wrote: > Thanks Adrien. > Sure , but is there any other way without stoping the masters. Anything > like cleaning the zk. Is there a time-out which cleans the dead rs or max > count . > Regards, > Samar > > On 05/

Re: MemStoreFlusher: region has too many store files (client timeout)

2013-02-05 Thread kzurek
Thanks for the reply, although I should clear some misunderstandings. In general, I do know general behavior and difference between minor and major compaction, as well as when minor compaction might become (could be promoted) to major compaction. I just wanted to verify influence of compaction (mos

Re: remove dead regions server

2013-02-05 Thread samar kumar
Thanks Adrien. Sure , but is there any other way without stoping the masters. Anything like cleaning the zk. Is there a time-out which cleans the dead rs or max count . Regards, Samar On 05/02/13 12:38 AM, "Adrien Mogenet" wrote: >The easiest way is to restart your HBaseMaster. The next active m