Is "synchronized" required?

2013-02-04 Thread Bing Li
Dear all, When writing data into HBase, sometimes I got exceptions. I guess they might be caused by concurrent writings. But I am not sure. My question is whether it is necessary to put "synchronized" before the writing methods? The following lines are the sample code. I think the directive, syn

Re: Is "synchronized" required?

2013-02-04 Thread Bing Li
d them here? >> Knowing that is key to addressing your issue. >> >> On Tue, Feb 5, 2013 at 1:50 AM, Bing Li wrote: >> > Dear all, >> > >> > When writing data into HBase, sometimes I got exceptions. I guess they >> > might be caused by concurren

Re: Is "synchronized" required?

2013-02-04 Thread Bing Li
>> > >> > Not sure about your scenario but HTable class is not thread safe for >> > neither reads nor write. >> > If you consider writing/reading from a table in a multiple-threaded way, >> > you can consider using HTablePool. >> > >>

Re: Is "synchronized" required?

2013-02-05 Thread Bing Li
IOException e) { e.printStackTrace(); } return rowKeySet; } On Tue, Feb 5, 2013 at 4:20 AM, Bing Li wrote: > Dear all, > > When writing data into HBase, sometimes I got exceptions. I guess they > might be caused by concurre

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: 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: > >&

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 1

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

Re: Is "synchronized" required?

2013-02-05 Thread Bing Li
een 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? &g

Concurrently Reading Still Got Exceptions

2013-02-06 Thread Bing Li
Dear all, Some exceptions are raised when I concurrently read data from HBase. The version of HBase I used is 0.92.0. I cannot fix the problem. Could you please help me? Thanks so much! Best wishes, Bing Feb 6, 2013 12:21:31 AM org.apache.hadoop.hbase.ipc.HBaseClient$Connection run

Re: Is "synchronized" required?

2013-02-06 Thread Bing Li
pool? Is it > fine to create a instance of HTable for each thread? > > I noticed that HBase has a class, HTablePool. Maybe the pool I > designed is NOT required? > > Thanks so much! > > Best wishes! > Bing > > On Wed, Feb 6, 2013 at 1:05 PM, lars hofhansl wrote: >&g

Re: Is "synchronized" required?

2013-02-07 Thread Bing Li
le 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

Starting Abnormally After Shutting Down For Some Time

2012-03-27 Thread Bing Li
Dear all, I got a weird problem when programming on the pseudo-distributed mode of HBase/Hadoop. The HBase/Hadoop were installed correctly. It also ran well with my Java code. However, if after shutting down the server for some time, for example, four or five days, I noticed that HBase/Hadoop go

Re: Starting Abnormally After Shutting Down For Some Time

2012-03-27 Thread Bing Li
d the > system have you confirmed whether all hadoop daemons are running? > sudo jps > If you are using CDH package then you can automatically start the hadoop > daemons on boot using reconfig package. > > Sent from my BlackBerry, pls excuse typo > > -Original Message- >

Re: Starting Abnormally After Shutting Down For Some Time

2012-03-27 Thread Bing Li
g? > > - Did you change dfs.data.dir and dfs.name.dir in hdfs-site.xml? By > default it writes to /tmp which can get cleaned up. > > J-D > > On Tue, Mar 27, 2012 at 12:52 PM, Bing Li wrote: > > Dear all, > > > > I got a weird problem when programming on the pseudo-

Re: Starting Abnormally After Shutting Down For Some Time

2012-03-28 Thread Bing Li
moreover you need to have good amount of patience to understand > the problem :) I do understand how frustating when you set up everything > and next day you find the things are completely down. > > Sent from my BlackBerry, pls excuse typo > > -Original Message- > Fro

Re: Starting Abnormally After Shutting Down For Some Time

2012-03-28 Thread Bing Li
dfs.name.dir ${hadoop.tmp.dir}/dfs/name/ dfs.data.dir ${hadoop.tmp.dir}/dfs/data/ Thanks so much! Best, Bing On Wed, Mar 28, 2012 at 4:24 PM, Bing Li wrote: > Dear Manish, > > I appreciate so much for your replies! > > The system tmp direc

Re: Starting Abnormally After Shutting Down For Some Time

2012-03-28 Thread Bing Li
:27 PM, Bing Li wrote: > > Dear all, > > > > I found some configuration information was saved in /tmp in my system. So > > when some of the information is lost, the HBase cannot be started > normally. > > > > But in my system, I have tried to change the HDFS

Methods Missing in HTableInterface

2012-04-05 Thread Bing Li
Dear all, I found some methods existed in HTable were not in HTableInterface. setAutoFlush setWriteBufferSize ... In most cases, I manipulate HBase through HTableInterface from HTablePool. If I need to use the above methods, how to do that? I am considering writing my own table pool if

Re: Methods Missing in HTableInterface

2012-04-05 Thread Bing Li
Components: client Reporter: Bing Li On Thu, Apr 5, 2012 at 11:32 PM, Lars George wrote: > +1, there are quiet a few missing that should be in there. Please create a > JIRA issue so that we can discuss and agree on which to add. > > Lars > > On Apr 5, 2012, at 6:

Re: NotServingRegionException in Pseudo-Distributed Mode

2012-04-11 Thread Bing Li
Dear all, By the way, I didn't see any severe exceptions and no any exceptions related to NotServingRegionException. Thanks so much! Bing On Thu, Apr 12, 2012 at 12:27 AM, Bing Li wrote: > Dear all, > > I got an exception as follows when running HBase. My Hadoop is set up i

Re: NotServingRegionException in Pseudo-Distributed Mode

2012-04-11 Thread Bing Li
ill provide some help : > > > http://mail-archives.apache.org/mod_mbox/hbase-user/201201.mbox/%3CCAHau4ys9 > eTj_ek_jP=bnpovsprrayuyn4fhtd51dgpdgyvy...@mail.gmail.com%3E > and > http://www.mail-archive.com/hbase-user@hadoop.apache.org/msg01180.html > > > -Original Message---

Re: Is HBase Thread-Safety?

2012-04-12 Thread Bing Li
answers your question. > > Thanks. > > -- Lars > > > - Original Message - > From: Bing Li > To: hbase-u...@hadoop.apache.org; user > Cc: > Sent: Thursday, April 12, 2012 3:10 PM > Subject: Is HBase Thread-Safety? > > Dear all, > > Is HBase thr

Re: Is HBase Thread-Safety?

2012-04-13 Thread Bing Li
rmance. Locking must affect the performance. If caching is not fast enough in HBase, the design might not be good? Thanks again! Best, Bing > > Best regards, > nn > > 2012/4/13 Bing Li > >> Dear Iars, >> >> Thanks so much for your reply! >> >> I

Fwd: Is HBase Thread-Safety?

2012-04-13 Thread Bing Li
rmance. Locking must affect the performance. If caching is not fast enough in HBase, the design might not be good? Thanks again! Best, Bing > > Best regards, > nn > > 2012/4/13 Bing Li > >> Dear Iars, >> >> Thanks so much for your reply! >> >> I

Min/Max Column Value and Row Count

2012-04-18 Thread Bing Li
Dear all, I noticed that there were no ways to get the min/max of a specific column value using the current available filters. Right? Any more convenient approaches to get the row count of a family? I plan to use FamilyFilter to do that. Thanks so much! Best regards, Bing

HBase Is So Slow To Save Data?

2012-08-29 Thread Bing Li
Dear all, According to my experiences, it is very slow for HBase to save data? Am I right? For example, today I need to save data in a HashMap to HBase. It took about more than three hours. However when saving the same HashMap in a file in the text format with the redirected System.out, it took o

Re: HBase Is So Slow To Save Data?

2012-08-29 Thread Bing Li
Dear all, By the way, my HBase is in the pseudo-distributed mode. Thanks! Best regards, Bing On Wed, Aug 29, 2012 at 10:04 PM, Bing Li wrote: > Dear all, > > According to my experiences, it is very slow for HBase to save data? Am I > right? > > For example, today I need

Re: HBase Is So Slow To Save Data?

2012-08-29 Thread Bing Li
ic case (without the points 2 & 3 above), the performance > seems to be very bad. > > You should first look at: > - how much is spent in the put vs. preparing the list > - do you have garbage collection going on? even swap? > - what's the size of your final Array vs. the a

Re: HBase Is So Slow To Save Data?

2012-08-29 Thread Bing Li
rayList();" before > the table put. > > On Wed, Aug 29, 2012 at 5:42 PM, Bing Li wrote: > > > Dear N Keywal, > > > > Thanks so much for your reply! > > > > The total amount of data is about 110M. The available memory is enough, > 2G. > > >

Re: HBase Is So Slow To Save Data?

2012-08-29 Thread Bing Li
ts. You should do this > conversion only once to save time, since you are doing this inside 3 nested > loops. Not sure about how much this can improve, but you should try this > also. > > Best regards, > Cristofer > > -Mensagem original- > De: Bing Li [mailto:lbl.

Re: Is it correct and required to keep consistency this way?

2012-09-19 Thread Bing Li
ended. > HBase has its own mechanism(MVCC) to manage the read/write consistency. > When we start a scanning, the latest data has not committed by MVCC may not > be visible(According to our configuration). > > Jieshan > -----Original Message- > From: Bing Li [mailto:lbl...@gm

Re: Is it correct and required to keep consistency this way?

2012-09-19 Thread Bing Li
locking must be set as what is shown in my code, doesn't it? Thanks so much! Bing On Thu, Sep 20, 2012 at 11:00 AM, Bijieshan wrote: > Yes. It should be safe. What you need to pay attention is HTable is not > thread safe. What are the exceptions? > > Jieshan > -Or

Re: Is it correct and required to keep consistency this way?

2012-09-19 Thread Bing Li
oop/hbase/client/HTablePool.html > . > > Hope it helps. > Jieshan. > -Original Message- > From: Bing Li [mailto:lbl...@gmail.com] > Sent: Thursday, September 20, 2012 11:07 AM > To: user@hbase.apache.org > Cc: hbase-u...@hadoop.apache.org; Zhouxunmiao > Subject: Re

Pseudo-Distributed Mode & Multi-Thread Accessing

2012-09-21 Thread Bing Li
Dear all, Pseudo-distributed mode is still used since I am still coding. When scanning a table, I noticed that a single thread was much faster than each one in a multi-threads module. For example, the following method can be done in 2 or 3ms with a single thread. If 30 threads execute the method

Table and Family

2013-08-12 Thread Bing Li
Hi, all, My understandings about HBase table and its family are as follows. 1) Each table can consist of multiple families; 2) When retrieving with SingleColumnValueFilter, if the family is specified, other families contained in the same table are not affected. Are these claims right? But I got

Performance Are Affected? - Table and Family

2013-08-12 Thread Bing Li
! Best regards, Bing On Tue, Aug 13, 2013 at 12:31 AM, Stas Maksimov wrote: > Hi there, > > On your second point, I don't think column family can ever be an optional > parameter, so I'm not sure this understanding is correct. > > Regards, > Stas. > > >

Fwd: How to Rank in HBase?

2012-01-29 Thread Bing Li
Another question is whether it is proper to update data in HBase frequently? Thanks, Bing -- Forwarded message -- From: Bing Li Date: Mon, Jan 30, 2012 at 4:00 AM Subject: How to Rank in HBase? To: user@hbase.apache.org Dear all, I am a new user of HBase. I wonder the ranking

Re: How to Rank in HBase?

2012-01-29 Thread Bing Li
frequently, right? Best regards, Bing On Mon, Jan 30, 2012 at 1:51 PM, Stack wrote: > On Sun, Jan 29, 2012 at 12:02 PM, Bing Li wrote: > > Another question is whether it is proper to update data in HBase > frequently? > > > > This is 'normal', yes. > St.Ack >

Re: How to Rank in HBase?

2012-01-29 Thread Bing Li
fficient random read/write capabilities on top of the Hadoop > distributed file system (HDFS), and takes care of doing that in a way that > parallelizes nicely across a large cluster of machines, deals with machine > failures, etc. > > Ian > > On Jan 29, 2012, at 10:16 PM, B

Which Version of Hadoop Should I Use?

2012-02-04 Thread Bing Li
Dear all, I am starting to learn how to use HBase. I am a little bit confused about the version of Hadoop. Which one should I use? According to the book, HBase - The Definitive Guide, Page. 47, it is said that "The current version of HBase will only run on Hadoop 0.20.x." But, in the page of htt

ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 Times

2012-02-13 Thread Bing Li
Base shell. ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 Times I am trying to fix it myself. Your help is highly appreciated. Thanks so much! Bing Li On Mon, Feb 13, 2012 at 5:00 AM, Bing Li wrote: > Dear all, > > I am a new learner of HBase. I tried to s

Re: ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 Times

2012-02-13 Thread Bing Li
configuration? You can check out this > quick start guide: > > http://hbase.apache.org/book/quickstart.html > > Thanks, > Jimmy > > > On Mon, Feb 13, 2012 at 10:09 AM, Bing Li wrote: > >> Dear all, >> >> After searching on the Web and asking for h

Re: ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 Times

2012-02-13 Thread Bing Li
w you master location. > > It seems you have a distributed installation. How many regionservers do > you have? Can you check your > master web UI to make sure all look fine. > > Thanks, > Jimmy > > > On Mon, Feb 13, 2012 at 10:51 AM, Bing Li wrote: > >> Dear J

Re: ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 Times

2012-02-13 Thread Bing Li
Xiang wrote: > In this case, you may just use the standalone mode. You can follow the > quick start step by step. > > The default zookeeper port is 2181, you don't need to configure it. > > > > On Mon, Feb 13, 2012 at 11:28 AM, Bing Li wrote: > >> Dear Jim

Re: ERROR: org.apache.hadoop.hbase.MasterNotRunningException: Retried 7 Times

2012-02-13 Thread Bing Li
base > > You need to fix this and make sure your HDFS is working, for example, > the following command should work for you. > > hadoop fs -ls / > > > > On Mon, Feb 13, 2012 at 11:44 AM, Bing Li wrote: > >> Dear Jimmy, >> >> I configured the

Re: Why Cannot the Data/Name Directory Be Changed?

2012-02-13 Thread Bing Li
Dear all, I fixed the problem in the previous email by doing that on Ubuntu 10 instead of RedHat 9. RedHat 9 might be too old? Thanks so much! Bing On Tue, Feb 14, 2012 at 1:00 PM, Bing Li wrote: > Dear all, > > I am a new user of HDFS. The default Data/Name directory is /tmp. I wou

Re: ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries

2012-02-14 Thread Bing Li
our shell expects it to > be? Can you access HBase's web ui on port 60010? > > J-D > > On Sun, Feb 12, 2012 at 1:00 PM, Bing Li wrote: > > Dear all, > > > > I am a new learner of HBase. I tried to set up my HBase on a > > pseudo-distributed HDFS. > >

Re: ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries

2012-02-16 Thread Bing Li
s, Bing On Wed, Feb 15, 2012 at 2:43 AM, Jean-Daniel Cryans wrote: > And what would be missing? It's all open source so this is the moment > where you can forever leave a trace in HBase :) > > J-D > > On Tue, Feb 14, 2012 at 12:35 AM, Bing Li wrote: > > Dear Jean-Dani

Re: ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries

2012-02-17 Thread Bing Li
Stack, The link just describes a standalone mode for HBase. If possible, I think a pseudo-distributed mode is also preferred. Thanks, Bing On Fri, Feb 17, 2012 at 11:10 PM, Stack wrote: > On Thu, Feb 16, 2012 at 11:03 PM, Bing Li wrote: > > I just made summary about the experiences

Re: ERROR zookeeper.RecoverableZooKeeper: ZooKeeper exists failed after 3 retries

2012-02-17 Thread Bing Li
7, 2012 at 7:18 AM, Bing Li wrote: > > Stack, > > > > The link just describes a standalone mode for HBase. If possible, I > think a > > pseudo-distributed mode is also preferred. > > > > Thanks, > > Bing > > > > > > On Fri, Feb 17, 20

TimeStampFilter - "type int out of range"

2012-02-19 Thread Bing Li
Dear all, I am running the sample about TimeStampFilter as follows. List ts = new ArrayList(); ts.add(new Long(1329640759364)); ts.add(new Long(1329640759372)); ts.add(new Long(1329640759378)); Filter filter = new Tim

How is Data Indexed in HBase?

2012-02-22 Thread Bing Li
Dear all, I wonder how data in HBase is indexed? Now Solr is used in my system because data is managed in inverted index. Such an index is suitable to retrieve unstructured and huge amount of data. How does HBase deal with the issue? May I replaced Solr with HBase? Thanks so much! Best regards,

Solr & HBase - Re: How is Data Indexed in HBase?

2012-02-22 Thread Bing Li
: > It is highly unlikely that you could replace Solr with HBase. They're > really apples and oranges. > > > On Wed, Feb 22, 2012 at 1:09 AM, Bing Li wrote: > >> Dear all, >> >> I wonder how data in HBase is indexed? Now Solr is used in my system >> bec

Re: Solr & HBase - Re: How is Data Indexed in HBase?

2012-02-22 Thread Bing Li
>> It's on our road map. >> >> FYI >> >> On Wed, Feb 22, 2012 at 9:28 AM, Bing Li wrote: >> >> > Jacques, >> > >> > Yes. But I still have questions about that. >> > >> > In my system, when users search with a keywor

Re: Solr & HBase - Re: How is Data Indexed in HBase?

2012-02-23 Thread Bing Li
nt schema and index the > rank too for range queries and such. is my understanding of your scenario > wrong? > > thanks > > > On Wed, Feb 22, 2012 at 9:51 AM, Bing Li wrote: > >> Mr Gupta, >> >> Thanks so much for your reply! >> >> In my use

Retrieving by Counters and ValueFilter

2012-02-24 Thread Bing Li
Dear all, HBase has the feature to treat columns as counters. So I attempted to retrieve data based on the value of counters. Usually, the counters are the long type. But the filters' constructors, such as ValueFilter, in HBase does not have the parameter of long type. If so, may I still retrieve

The Problems When Retrieving By BinaryComparator

2012-02-24 Thread Bing Li
Dear all, I created a table as follows. I need to retrieve by the column of "Salary", which is a long type data. Some errors are got as follows. ROW COLUMN+CELL Classmate1 column=ClassmateFamily:Address, timestamp=1330118559432, value=Cana

Re: The Problems When Retrieving By BinaryComparator

2012-02-24 Thread Bing Li
use proper types when using Bytes. > > thanks > > On Fri, Feb 24, 2012 at 4:25 PM, Bing Li wrote: > >> Dear all, >> >> I created a table as follows. I need to retrieve by the column of >> "Salary", >> which is a long type data. Some err

RowFilter - Each Time It Should Be Initialized?

2012-03-01 Thread Bing Li
Dear all, I am now using RowFilter to retrieve multiple rows. Each time I need to call the following line? filter = new RowFilter(CompareFilter.CompareOp.EQUAL, newSubstringComparator( "Classmate2")); I check the relevant APIs. There is a method, reset(). But it seems that I have to use the

Setting Up Pseudo-Distributed Mode Failed On Ubuntu 11

2012-03-10 Thread Bing Li
Dear all, Yesterday I tried to set up the pseudo-distributed mode for HBase on Ubuntu 11 (64-bit). But I failed to do that. What I have done is exactly the same as on Ubuntu 10. On Ubuntu 10, I set it up successfully. I am not sure what are the possible problems. Could you give me some hints? Tha

Re: Setting Up Pseudo-Distributed Mode Failed On Ubuntu 11

2012-03-11 Thread Bing Li
On Ubuntu Server 10, no such problems. Thanks so much! Bing On Sun, Mar 11, 2012 at 12:01 PM, Gopal wrote: > On 03/10/2012 10:23 PM, Bing Li wrote: > >> Dear all, >> >> Yesterday I tried to set up the pseudo-distributed mode for HBase on >> Ubuntu >> 11 (64-b