Also, I'm not sure this will be fixed with the master changes. tableExists() actually makes a call to listTables() and then checks if the table you are looking for is in the list.
listTables() uses a MetaScanner/MetaVisitor. Though the master changes de-emphasize the general use of meta scanning, it would not necessarily change the implementation of these client (to RS) calls. Hard to say what would make this flakey besides some of the older bugs around lots of META StoreFiles. What version of HBase are you running? JG > -----Original Message----- > From: Jonathan Gray [mailto:[email protected]] > Sent: Tuesday, July 20, 2010 4:06 PM > To: [email protected] > Subject: RE: Flaky tableExists() > > I've personally never seen a flaky tableExists() but it's not something > I've used heavily. > > Could you do the same operations you did below in the shell but also > run: scan '.META.' > > > -----Original Message----- > > From: Karthik Kambatla [mailto:[email protected]] > > Sent: Tuesday, July 20, 2010 3:26 PM > > To: [email protected] > > Subject: Re: Flaky tableExists() > > > > Thanks Ryan for understanding the pain :) > > > > Is there a work-around for the time being? I haven't experienced any > > such > > issues with earlier versions of HBase. Was I just lucky or would it > > make > > sense to revert to earlier questions? > > > > Thanks > > Karthik > > > > On Tue, Jul 20, 2010 at 2:54 PM, Ryan Rawson <[email protected]> > > wrote: > > > > > This sucks, and there are being substantial reworks to master > > > functions in 0.90 :-) > > > > > > Hopefully that will permanently address these kinds of bugs. > > > > > > Hopefully within a few weeks there'll be a developer preview (0.89 > > > series) that has that code. > > > > > > -ryan > > > > > > On Tue, Jul 20, 2010 at 2:52 PM, Karthik Kambatla > > > <[email protected]> wrote: > > > > Hi all > > > > > > > > I have been noticing a slightly flaky behavior with respect to > > > > HBaseAdmin.tableExists(). After I have created the table, it > > returns > > > > true/false every time when called. In hbase shell, the list > command > > > prints > > > > out all the tables sometimes, and shows no tables on other > > occasions. Any > > > > ideas as to why this happens? > > > > > > > > The master on my cluster runs the HDFS - namenode, secondary > > namenode; > > > HBase > > > > - HMaster, HQuorumPeer. The 12 slaves run the HDFS datanode and > > HBase > > > > HRegionServer. Below is the transcript of operations on hbase > > shell... > > > Every > > > > time I exit and enter hbase shell, the output changes. > > > > > > > > Thanks > > > > Karthik > > > > > > > > hbase(main):002:0> count 'SUBSCRIPTIONS' > > > > 0 row(s) in 6.0560 seconds > > > > hbase(main):003:0> create 'Test' > > > > 0 row(s) in 1.0840 seconds > > > > hbase(main):004:0> list > > > > SUBSCRIPTIONS > > > > > > > > > > > > 1 row(s) in 0.0090 seconds > > > > > > > > hbase(main):010:0> create 'Test' > > > > NativeException: org.apache.hadoop.hbase.TableExistsException: > > > > org.apache.hadoop.hbase.TableExistsException: Test > > > > at > > > > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:798) > > > > at > > > > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:762) > > > > at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown > Source) > > > > at > > > > > > > > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso > > rImpl.java:25) > > > > at java.lang.reflect.Method.invoke(Method.java:597) > > > > at > > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:657) > > > > at > > > > > > > org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:91 > > 5) > > > > > > > > > > > > hbase(main):011:0> list > > > > SUBSCRIPTIONS > > > > > > > > 1 row(s) in 0.0070 seconds > > > > hbase(main):012:0> exit > > > > > > > > [kamba...@mercado-2 ~]$ hbase shell > > > > HBase Shell; enter 'help<RETURN>' for list of supported commands. > > > > Version: 0.20.5, rUnknown, Thu Jul 15 22:27:05 PDT 2010 > > > > hbase(main):001:0> list > > > > TOPICS > > > > > > > > Test > > > > > > > > TestTable > > > > > > > > USERS > > > > > > > > 4 row(s) in 0.0930 seconds > > > > hbase(main):005:0> exit > > > > > > > > [kamba...@mercado-2 ~]$ hbase shell > > > > HBase Shell; enter 'help<RETURN>' for list of supported commands. > > > > Version: 0.20.5, rUnknown, Thu Jul 15 22:27:05 PDT 2010 > > > > hbase(main):001:0> list > > > > EVENTS > > > > > > > > SUBSCRIPTIONS > > > > > > > > TOPICS > > > > > > > > TestTable > > > > > > > > USERS > > > > > > > > 5 row(s) in 0.1000 seconds > > > > > > >
