You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Gaojinchao <ga...@huawei.com> on 2011/04/25 13:24:57 UTC

A question about create table with regions in hbase version 0.90.3

I merge issue HBASE-3744 to 0.90.2 and test it.
Find that Creating table fails when region server shutdown

Does it need try to one more times for putting Meta data?

public static void addRegionToMeta(CatalogTracker catalogTracker,
      HRegionInfo regionInfo)
  throws IOException {
    Put put = new Put(regionInfo.getRegionName());
    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
        Writables.getBytes(regionInfo));
    catalogTracker.waitForMetaServerConnectionDefault().put(                        // try again ?
        CatalogTracker.META_REGION, put);
    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to META");
  }

Client logs:
11/04/25 17:22:51 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x12f8be0d9b7000b
11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b closed
11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
org.apache.hadoop.ipc.RemoteException: org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not running
        at org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)

        at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
        at org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
        at $Proxy6.put(Unknown Source)
        at org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
        at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
        at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
        at org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
        at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)

        at org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
        at org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
        at $Proxy4.createTable(Unknown Source)
        at org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
        at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
        at com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)

Re: A question about create table with regions in hbase version 0.90.3

Posted by Gaojinchao <ga...@huawei.com>.
1/About classs MetaEditor. We should add a parameter:
private volatile Configuration configuration;

It cans get some client configure and use to 

for (int tries = 0; tries < numRetries && retry; ++tries) {
 catalogTracker.waitForMetaServerConnectionDefault().put(
        CatalogTracker.META_REGION, put);
}

2/Or createTable function may be modified:
     int numRetries = conf.getInt("hbase.client.retries.number", 10);
	
      // 3. Insert into META
      for (int tries = 0; tries < numRetries; tries++) {
        try {
    	  MetaEditor.addRegionToMeta(catalogTracker, region.getRegionInfo());
        }
        catch (IOException e)
        {
        	LOG.warn("Insert meta failed", e);
        }
      }

-----邮件原件-----
发件人: saint.ack@gmail.com [mailto:saint.ack@gmail.com] 代表 Stack
发送时间: 2011年4月27日 2:48
收件人: user@hbase.apache.org
主题: Re: A question about create table with regions in hbase version 0.90.3

How would you fix it Gaojinchao?
St.Ack

2011/4/25 Gaojinchao <ga...@huawei.com>:
> Thank you for your reply.
>
> I don't change it. It is default.
> But I think it is not the case the meta table doesn't assigned.
> It had got it and been putting some data into meta table,
>
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not running at org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>
> // I mean that the exception of put function is not caught and processed.
> Does it need to do ?
>
> at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
> at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>
>
>
>
>
> -----邮件原件-----
> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
> 发送时间: 2011年4月26日 12:13
> 收件人: user@hbase.apache.org
> 主题: Re: A question about create table with regions in hbase version 0.90.3
>
> waitForMetaServerConnectionDefault() calls waitForMeta() which should have
> waited for "hbase.master.catalog.timeout"
> What's the value for "hbase.master.catalog.timeout" on your cluster ?
>
> Thanks
>
> 2011/4/25 Gaojinchao <ga...@huawei.com>
>
>> In client code Put data into Region server has one more times:
>> eg:
>>    public void processBatch(List<Row> list,
>>    ....
>>      for (int tries = 0; tries < numRetries && retry; ++tries) {   // if
>> put data failed and try to do.
>>    ...
>>
>> In function addRegionToMeta. Does it need to do this ?
>>
>> catalogTracker.waitForMetaServerConnectionDefault().put(   // does need try
>> again ?  It fails for checkOpen because of  Region server is shutdowned.
>>
>> hmaster logs show
>>  "org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)"
>>
>>
>> -----邮件原件-----
>> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
>> 发送时间: 2011年4月25日 21:25
>> 收件人: user@hbase.apache.org
>> 主题: Re: A question about create table with regions in hbase version 0.90.3
>>
>> Can you give more detail as to how many region servers were shutting down ?
>>
>> Thanks
>>
>> 2011/4/25 Gaojinchao <ga...@huawei.com>
>>
>> > I merge issue HBASE-3744 to 0.90.2 and test it.
>> > Find that Creating table fails when region server shutdown
>> >
>> > Does it need try to one more times for putting Meta data?
>> >
>> > public static void addRegionToMeta(CatalogTracker catalogTracker,
>> >      HRegionInfo regionInfo)
>> >  throws IOException {
>> >    Put put = new Put(regionInfo.getRegionName());
>> >    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
>> >        Writables.getBytes(regionInfo));
>> >    catalogTracker.waitForMetaServerConnectionDefault().put(
>> >        // try again ?
>> >        CatalogTracker.META_REGION, put);
>> >    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
>> > META");
>> >  }
>> >
>> > Client logs:
>> > 11/04/25 17:22:51 INFO
>> client.HConnectionManager$HConnectionImplementation:
>> > Closed zookeeper sessionid=0x12f8be0d9b7000b
>> > 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
>> > closed
>> > 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
>> > org.apache.hadoop.ipc.RemoteException:
>> > org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
>> > running
>> >        at
>> >
>> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>> >        at
>> >
>> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
>> >        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
>> >        at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >        at java.lang.reflect.Method.invoke(Method.java:597)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>> >        at
>> >
>> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>> >
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>> >        at $Proxy6.put(Unknown Source)
>> >        at
>> >
>> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
>> >        at
>> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
>> >        at
>> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
>> >        at
>> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >        at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >        at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >        at java.lang.reflect.Method.invoke(Method.java:597)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>> >        at
>> >
>> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>> >
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>> >        at $Proxy4.createTable(Unknown Source)
>> >        at
>> >
>> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
>> >        at
>> >
>> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
>> >        at
>> >
>> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
>> >
>>
>

Re: A question about create table with regions in hbase version 0.90.3

Posted by Stack <st...@duboce.net>.
How would you fix it Gaojinchao?
St.Ack

2011/4/25 Gaojinchao <ga...@huawei.com>:
> Thank you for your reply.
>
> I don't change it. It is default.
> But I think it is not the case the meta table doesn't assigned.
> It had got it and been putting some data into meta table,
>
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not running at org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>
> // I mean that the exception of put function is not caught and processed.
> Does it need to do ?
>
> at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
> at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>
>
>
>
>
> -----邮件原件-----
> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
> 发送时间: 2011年4月26日 12:13
> 收件人: user@hbase.apache.org
> 主题: Re: A question about create table with regions in hbase version 0.90.3
>
> waitForMetaServerConnectionDefault() calls waitForMeta() which should have
> waited for "hbase.master.catalog.timeout"
> What's the value for "hbase.master.catalog.timeout" on your cluster ?
>
> Thanks
>
> 2011/4/25 Gaojinchao <ga...@huawei.com>
>
>> In client code Put data into Region server has one more times:
>> eg:
>>    public void processBatch(List<Row> list,
>>    ....
>>      for (int tries = 0; tries < numRetries && retry; ++tries) {   // if
>> put data failed and try to do.
>>    ...
>>
>> In function addRegionToMeta. Does it need to do this ?
>>
>> catalogTracker.waitForMetaServerConnectionDefault().put(   // does need try
>> again ?  It fails for checkOpen because of  Region server is shutdowned.
>>
>> hmaster logs show
>>  "org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)"
>>
>>
>> -----邮件原件-----
>> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
>> 发送时间: 2011年4月25日 21:25
>> 收件人: user@hbase.apache.org
>> 主题: Re: A question about create table with regions in hbase version 0.90.3
>>
>> Can you give more detail as to how many region servers were shutting down ?
>>
>> Thanks
>>
>> 2011/4/25 Gaojinchao <ga...@huawei.com>
>>
>> > I merge issue HBASE-3744 to 0.90.2 and test it.
>> > Find that Creating table fails when region server shutdown
>> >
>> > Does it need try to one more times for putting Meta data?
>> >
>> > public static void addRegionToMeta(CatalogTracker catalogTracker,
>> >      HRegionInfo regionInfo)
>> >  throws IOException {
>> >    Put put = new Put(regionInfo.getRegionName());
>> >    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
>> >        Writables.getBytes(regionInfo));
>> >    catalogTracker.waitForMetaServerConnectionDefault().put(
>> >        // try again ?
>> >        CatalogTracker.META_REGION, put);
>> >    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
>> > META");
>> >  }
>> >
>> > Client logs:
>> > 11/04/25 17:22:51 INFO
>> client.HConnectionManager$HConnectionImplementation:
>> > Closed zookeeper sessionid=0x12f8be0d9b7000b
>> > 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
>> > closed
>> > 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
>> > org.apache.hadoop.ipc.RemoteException:
>> > org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
>> > running
>> >        at
>> >
>> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>> >        at
>> >
>> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
>> >        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
>> >        at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >        at java.lang.reflect.Method.invoke(Method.java:597)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>> >        at
>> >
>> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>> >
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>> >        at $Proxy6.put(Unknown Source)
>> >        at
>> >
>> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
>> >        at
>> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
>> >        at
>> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
>> >        at
>> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >        at
>> >
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >        at
>> >
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >        at java.lang.reflect.Method.invoke(Method.java:597)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>> >        at
>> >
>> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>> >
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>> >        at
>> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>> >        at $Proxy4.createTable(Unknown Source)
>> >        at
>> >
>> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
>> >        at
>> >
>> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
>> >        at
>> >
>> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
>> >
>>
>

Re: It seems like a bug for test case//Re: A question about TestAdmin failed.

Posted by Ted Yu <yu...@gmail.com>.
Jinchao:
Thanks for your hint.
I think the sleep call should be replaced with the following code which I
copied from HMaster:
    MasterServices services = TEST_UTIL.getMiniHBaseCluster().getMaster();
    AssignmentManager am = services.getAssignmentManager();
    for (HRegionInfo regionInfo : regions.keySet()) {
      try {
        am.waitForAssignment(regionInfo);
      } catch (InterruptedException e) {
        LOG.info("Interrupted waiting for region to be assigned during " +
            "create table call", e);
        Thread.currentThread().interrupt();
        return;
      }
    }

I tested the above change on Linux and it worked.

Please get 3744-addendum.patch from HBASE-3744.

Thanks

2011/4/26 Gaojinchao <ga...@huawei.com>

>  Thanks for your reply.
>
> I  know HBASE-3744. I had merged to my version.
>
>
>
> Only run TestAdmin is also success.
>
> But run all test case, it failed .
>
> It seems like the configure of machine.
>
>
>
> I try to sleep 60s before call verifyRoundRobinDistribution.
>
>
>
> *发件人:* Ted Yu [mailto:yuzhihong@gmail.com]
> *发送时间:* 2011年4月27日 12:18
> *收件人:* Gaojinchao
> *抄送:* dev@hbase.apache.org; Chenjian
> *主题:* Re: It seems like a bug for test case//Re: A question about
> TestAdmin failed.
>
>
>
> HBASE-3744 introduced a change in how createTable() works.
> By default, sync parameter is false:
>   public void createTable(HTableDescriptor desc, byte [][] splitKeys)
>   throws IOException {
>     createTable(desc, splitKeys, false);
>   }
> because HBaseAdmin.createTableAsync() doesn't pass sync parameter to the
> master.
>
> On a Linux machine, TestAdmin passed.
>
> 2011/4/26 Gaojinchao <ga...@huawei.com>
>
> It seems like that test case TestAdmin has some bug.
>
> In version 0.90.2.  Region can assigned to Region server by this code
> // 5. Trigger immediate assignment of the regions in round-robin fashion
>    List<HServerInfo> servers = serverManager.getOnlineServersList();
>    try {
>      this.assignmentManager.assignUserRegions(Arrays.asList(newRegions),
> servers);    // It waits for 10 minites.
>    } catch (InterruptedException ie) {
>      LOG.error("Caught " + ie + " during round-robin assignment");
>      throw new IOException(ie);
>    }
>
> But In version 0.90.3. Region can't assigned to region server. (issue
> HBASE-3744)
>
>  // 5. Trigger immediate assignment of the regions in round-robin fashion
>    List<HServerInfo> servers = serverManager.getOnlineServersList();
>    this.assignmentManager.bulkAssignUserRegions(newRegions, servers, sync);
>        // It doesn't wait for.
>
> So function verifyRoundRobinDistribution can't get address and throws
> exceptions
> List<HRegionInfo> regs = server2Regions.get(server);
>
> public int hashCode() {
>    int result = address.hashCode();        // Region can't be assigned, So
> it seems like throw some exceptions.
>    result ^= stringValue.hashCode();
>    return result;
>  }
>
>
>
> -----邮件原件-----
> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
> 发送时间: 2011年4月26日 21:36
> 收件人: user@hbase.apache.org
> 主题: Re: A question about TestAdmin failed.
>
> Stack made some change in trunk to deal with NPE.
>
> FYI
>
> On Tue, Apr 26, 2011 at 5:27 AM, Gaojinchao <ga...@huawei.com> wrote:
>
> > I merge some code to 0.90.2
> > run unit test and find one failed.
> >
> > how to dig it ? thanks.
> > Logs:
> >
> >
> -------------------------------------------------------------------------------
> > Test set: org.apache.hadoop.hbase.client.TestAdmin
> >
> >
> -------------------------------------------------------------------------------
> > Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 649.314
> > sec <<< FAILURE!
> > testCreateTableWithRegions(org.apache.hadoop.hbase.client.TestAdmin)
>  Time
> > elapsed: 3.475 sec  <<< ERROR!
> > java.lang.NullPointerException
> >        at
> > org.apache.hadoop.hbase.HServerAddress.hashCode(HServerAddress.java:149)
> >        at java.util.HashMap.get(HashMap.java:300)
> >        at
> >
> org.apache.hadoop.hbase.client.TestAdmin.verifyRoundRobinDistribution(TestAdmin.java:309)
> >        at
> >
> org.apache.hadoop.hbase.client.TestAdmin.testCreateTableWithRegions(TestAdmin.java:385)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> >
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> >        at
> >
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> >        at
> >
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> >        at
> >
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> >        at
> >
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >        at
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> >        at
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> >        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> >        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> >        at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> >        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> >        at
> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> >        at
> >
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >        at
> >
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> >        at
> >
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> >        at
> >
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> >        at
> >
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> >
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
> >        at
> >
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
> >
> >
>
>
>

Re: It seems like a bug for test case//Re: A question about TestAdmin failed.

Posted by Gaojinchao <ga...@huawei.com>.
Thanks for your reply.
I  know HBASE-3744. I had merged to my version.

Only run TestAdmin is also success.
But run all test case, it failed .
It seems like the configure of machine.

I try to sleep 60s before call verifyRoundRobinDistribution.

发件人: Ted Yu [mailto:yuzhihong@gmail.com]
发送时间: 2011年4月27日 12:18
收件人: Gaojinchao
抄送: dev@hbase.apache.org; Chenjian
主题: Re: It seems like a bug for test case//Re: A question about TestAdmin failed.

HBASE-3744 introduced a change in how createTable() works.
By default, sync parameter is false:
  public void createTable(HTableDescriptor desc, byte [][] splitKeys)
  throws IOException {
    createTable(desc, splitKeys, false);
  }
because HBaseAdmin.createTableAsync() doesn't pass sync parameter to the master.

On a Linux machine, TestAdmin passed.
2011/4/26 Gaojinchao <ga...@huawei.com>>
It seems like that test case TestAdmin has some bug.

In version 0.90.2.  Region can assigned to Region server by this code
// 5. Trigger immediate assignment of the regions in round-robin fashion
   List<HServerInfo> servers = serverManager.getOnlineServersList();
   try {
     this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers);    // It waits for 10 minites.
   } catch (InterruptedException ie) {
     LOG.error("Caught " + ie + " during round-robin assignment");
     throw new IOException(ie);
   }

But In version 0.90.3. Region can't assigned to region server. (issue HBASE-3744)

 // 5. Trigger immediate assignment of the regions in round-robin fashion
   List<HServerInfo> servers = serverManager.getOnlineServersList();
   this.assignmentManager.bulkAssignUserRegions(newRegions, servers, sync);        // It doesn't wait for.

So function verifyRoundRobinDistribution can't get address and throws exceptions
List<HRegionInfo> regs = server2Regions.get(server);

public int hashCode() {
   int result = address.hashCode();        // Region can't be assigned, So it seems like throw some exceptions.
   result ^= stringValue.hashCode();
   return result;
 }



-----邮件原件-----
发件人: Ted Yu [mailto:yuzhihong@gmail.com<ma...@gmail.com>]
发送时间: 2011年4月26日 21:36
收件人: user@hbase.apache.org<ma...@hbase.apache.org>
主题: Re: A question about TestAdmin failed.

Stack made some change in trunk to deal with NPE.

FYI

On Tue, Apr 26, 2011 at 5:27 AM, Gaojinchao <ga...@huawei.com>> wrote:

> I merge some code to 0.90.2
> run unit test and find one failed.
>
> how to dig it ? thanks.
> Logs:
>
> -------------------------------------------------------------------------------
> Test set: org.apache.hadoop.hbase.client.TestAdmin
>
> -------------------------------------------------------------------------------
> Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 649.314
> sec <<< FAILURE!
> testCreateTableWithRegions(org.apache.hadoop.hbase.client.TestAdmin)  Time
> elapsed: 3.475 sec  <<< ERROR!
> java.lang.NullPointerException
>        at
> org.apache.hadoop.hbase.HServerAddress.hashCode(HServerAddress.java:149)
>        at java.util.HashMap.get(HashMap.java:300)
>        at
> org.apache.hadoop.hbase.client.TestAdmin.verifyRoundRobinDistribution(TestAdmin.java:309)
>        at
> org.apache.hadoop.hbase.client.TestAdmin.testCreateTableWithRegions(TestAdmin.java:385)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>        at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>        at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>        at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>        at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
>
>


Re: It seems like a bug for test case//Re: A question about TestAdmin failed.

Posted by Ted Yu <yu...@gmail.com>.
HBASE-3744 introduced a change in how createTable() works.
By default, sync parameter is false:
  public void createTable(HTableDescriptor desc, byte [][] splitKeys)
  throws IOException {
    createTable(desc, splitKeys, false);
  }
because HBaseAdmin.createTableAsync() doesn't pass sync parameter to the
master.

On a Linux machine, TestAdmin passed.

2011/4/26 Gaojinchao <ga...@huawei.com>

> It seems like that test case TestAdmin has some bug.
>
> In version 0.90.2.  Region can assigned to Region server by this code
> // 5. Trigger immediate assignment of the regions in round-robin fashion
>    List<HServerInfo> servers = serverManager.getOnlineServersList();
>    try {
>      this.assignmentManager.assignUserRegions(Arrays.asList(newRegions),
> servers);    // It waits for 10 minites.
>    } catch (InterruptedException ie) {
>      LOG.error("Caught " + ie + " during round-robin assignment");
>      throw new IOException(ie);
>    }
>
> But In version 0.90.3. Region can't assigned to region server. (issue
> HBASE-3744)
>
>  // 5. Trigger immediate assignment of the regions in round-robin fashion
>    List<HServerInfo> servers = serverManager.getOnlineServersList();
>    this.assignmentManager.bulkAssignUserRegions(newRegions, servers, sync);
>        // It doesn't wait for.
>
> So function verifyRoundRobinDistribution can't get address and throws
> exceptions
> List<HRegionInfo> regs = server2Regions.get(server);
>
> public int hashCode() {
>    int result = address.hashCode();        // Region can't be assigned, So
> it seems like throw some exceptions.
>    result ^= stringValue.hashCode();
>    return result;
>  }
>
>
>
> -----邮件原件-----
> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
> 发送时间: 2011年4月26日 21:36
> 收件人: user@hbase.apache.org
> 主题: Re: A question about TestAdmin failed.
>
> Stack made some change in trunk to deal with NPE.
>
> FYI
>
> On Tue, Apr 26, 2011 at 5:27 AM, Gaojinchao <ga...@huawei.com> wrote:
>
> > I merge some code to 0.90.2
> > run unit test and find one failed.
> >
> > how to dig it ? thanks.
> > Logs:
> >
> >
> -------------------------------------------------------------------------------
> > Test set: org.apache.hadoop.hbase.client.TestAdmin
> >
> >
> -------------------------------------------------------------------------------
> > Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 649.314
> > sec <<< FAILURE!
> > testCreateTableWithRegions(org.apache.hadoop.hbase.client.TestAdmin)
>  Time
> > elapsed: 3.475 sec  <<< ERROR!
> > java.lang.NullPointerException
> >        at
> > org.apache.hadoop.hbase.HServerAddress.hashCode(HServerAddress.java:149)
> >        at java.util.HashMap.get(HashMap.java:300)
> >        at
> >
> org.apache.hadoop.hbase.client.TestAdmin.verifyRoundRobinDistribution(TestAdmin.java:309)
> >        at
> >
> org.apache.hadoop.hbase.client.TestAdmin.testCreateTableWithRegions(TestAdmin.java:385)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> >
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> >        at
> >
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> >        at
> >
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> >        at
> >
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> >        at
> >
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >        at
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> >        at
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> >        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> >        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> >        at
> org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> >        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> >        at
> org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> >        at
> >
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> >        at
> >
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> >        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> >        at
> >
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> >        at
> >
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> >        at
> >
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> >
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
> >        at
> >
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
> >
> >
>

It seems like a bug for test case//Re: A question about TestAdmin failed.

Posted by Gaojinchao <ga...@huawei.com>.
It seems like that test case TestAdmin has some bug.

In version 0.90.2.  Region can assigned to Region server by this code
// 5. Trigger immediate assignment of the regions in round-robin fashion
    List<HServerInfo> servers = serverManager.getOnlineServersList();
    try {
      this.assignmentManager.assignUserRegions(Arrays.asList(newRegions), servers);    // It waits for 10 minites.
    } catch (InterruptedException ie) {
      LOG.error("Caught " + ie + " during round-robin assignment");
      throw new IOException(ie);
    }

But In version 0.90.3. Region can't assigned to region server. (issue HBASE-3744)

  // 5. Trigger immediate assignment of the regions in round-robin fashion
    List<HServerInfo> servers = serverManager.getOnlineServersList();
    this.assignmentManager.bulkAssignUserRegions(newRegions, servers, sync);        // It doesn't wait for.

So function verifyRoundRobinDistribution can't get address and throws exceptions
List<HRegionInfo> regs = server2Regions.get(server);

public int hashCode() {
    int result = address.hashCode();        // Region can't be assigned, So it seems like throw some exceptions.
    result ^= stringValue.hashCode();
    return result;
  }



-----邮件原件-----
发件人: Ted Yu [mailto:yuzhihong@gmail.com] 
发送时间: 2011年4月26日 21:36
收件人: user@hbase.apache.org
主题: Re: A question about TestAdmin failed.

Stack made some change in trunk to deal with NPE.

FYI

On Tue, Apr 26, 2011 at 5:27 AM, Gaojinchao <ga...@huawei.com> wrote:

> I merge some code to 0.90.2
> run unit test and find one failed.
>
> how to dig it ? thanks.
> Logs:
>
> -------------------------------------------------------------------------------
> Test set: org.apache.hadoop.hbase.client.TestAdmin
>
> -------------------------------------------------------------------------------
> Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 649.314
> sec <<< FAILURE!
> testCreateTableWithRegions(org.apache.hadoop.hbase.client.TestAdmin)  Time
> elapsed: 3.475 sec  <<< ERROR!
> java.lang.NullPointerException
>        at
> org.apache.hadoop.hbase.HServerAddress.hashCode(HServerAddress.java:149)
>        at java.util.HashMap.get(HashMap.java:300)
>        at
> org.apache.hadoop.hbase.client.TestAdmin.verifyRoundRobinDistribution(TestAdmin.java:309)
>        at
> org.apache.hadoop.hbase.client.TestAdmin.testCreateTableWithRegions(TestAdmin.java:385)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>        at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>        at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>        at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>        at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
>
>

Re: A question about TestAdmin failed.

Posted by Ted Yu <yu...@gmail.com>.
Stack made some change in trunk to deal with NPE.

FYI

On Tue, Apr 26, 2011 at 5:27 AM, Gaojinchao <ga...@huawei.com> wrote:

> I merge some code to 0.90.2
> run unit test and find one failed.
>
> how to dig it ? thanks.
> Logs:
>
> -------------------------------------------------------------------------------
> Test set: org.apache.hadoop.hbase.client.TestAdmin
>
> -------------------------------------------------------------------------------
> Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 649.314
> sec <<< FAILURE!
> testCreateTableWithRegions(org.apache.hadoop.hbase.client.TestAdmin)  Time
> elapsed: 3.475 sec  <<< ERROR!
> java.lang.NullPointerException
>        at
> org.apache.hadoop.hbase.HServerAddress.hashCode(HServerAddress.java:149)
>        at java.util.HashMap.get(HashMap.java:300)
>        at
> org.apache.hadoop.hbase.client.TestAdmin.verifyRoundRobinDistribution(TestAdmin.java:309)
>        at
> org.apache.hadoop.hbase.client.TestAdmin.testCreateTableWithRegions(TestAdmin.java:385)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>        at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>        at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>        at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>        at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>        at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>        at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
>        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>        at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)
>
>

A question about TestAdmin failed.

Posted by Gaojinchao <ga...@huawei.com>.
I merge some code to 0.90.2 
run unit test and find one failed.

how to dig it ? thanks.
Logs:
-------------------------------------------------------------------------------
Test set: org.apache.hadoop.hbase.client.TestAdmin
-------------------------------------------------------------------------------
Tests run: 16, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 649.314 sec <<< FAILURE!
testCreateTableWithRegions(org.apache.hadoop.hbase.client.TestAdmin)  Time elapsed: 3.475 sec  <<< ERROR!
java.lang.NullPointerException
	at org.apache.hadoop.hbase.HServerAddress.hashCode(HServerAddress.java:149)
	at java.util.HashMap.get(HashMap.java:300)
	at org.apache.hadoop.hbase.client.TestAdmin.verifyRoundRobinDistribution(TestAdmin.java:309)
	at org.apache.hadoop.hbase.client.TestAdmin.testCreateTableWithRegions(TestAdmin.java:385)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1005)


Re: A question about create table with regions in hbase version 0.90.3

Posted by Gaojinchao <ga...@huawei.com>.
Thank you for your reply.

I don't change it. It is default.
But I think it is not the case the meta table doesn't assigned.
It had got it and been putting some data into meta table, 

org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not running at org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)

// I mean that the exception of put function is not caught and processed.
Does it need to do ?

at org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)   
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)





-----邮件原件-----
发件人: Ted Yu [mailto:yuzhihong@gmail.com] 
发送时间: 2011年4月26日 12:13
收件人: user@hbase.apache.org
主题: Re: A question about create table with regions in hbase version 0.90.3

waitForMetaServerConnectionDefault() calls waitForMeta() which should have
waited for "hbase.master.catalog.timeout"
What's the value for "hbase.master.catalog.timeout" on your cluster ?

Thanks

2011/4/25 Gaojinchao <ga...@huawei.com>

> In client code Put data into Region server has one more times:
> eg:
>    public void processBatch(List<Row> list,
>    ....
>      for (int tries = 0; tries < numRetries && retry; ++tries) {   // if
> put data failed and try to do.
>    ...
>
> In function addRegionToMeta. Does it need to do this ?
>
> catalogTracker.waitForMetaServerConnectionDefault().put(   // does need try
> again ?  It fails for checkOpen because of  Region server is shutdowned.
>
> hmaster logs show
>  "org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)"
>
>
> -----邮件原件-----
> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
> 发送时间: 2011年4月25日 21:25
> 收件人: user@hbase.apache.org
> 主题: Re: A question about create table with regions in hbase version 0.90.3
>
> Can you give more detail as to how many region servers were shutting down ?
>
> Thanks
>
> 2011/4/25 Gaojinchao <ga...@huawei.com>
>
> > I merge issue HBASE-3744 to 0.90.2 and test it.
> > Find that Creating table fails when region server shutdown
> >
> > Does it need try to one more times for putting Meta data?
> >
> > public static void addRegionToMeta(CatalogTracker catalogTracker,
> >      HRegionInfo regionInfo)
> >  throws IOException {
> >    Put put = new Put(regionInfo.getRegionName());
> >    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
> >        Writables.getBytes(regionInfo));
> >    catalogTracker.waitForMetaServerConnectionDefault().put(
> >        // try again ?
> >        CatalogTracker.META_REGION, put);
> >    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
> > META");
> >  }
> >
> > Client logs:
> > 11/04/25 17:22:51 INFO
> client.HConnectionManager$HConnectionImplementation:
> > Closed zookeeper sessionid=0x12f8be0d9b7000b
> > 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
> > closed
> > 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
> > org.apache.hadoop.ipc.RemoteException:
> > org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
> > running
> >        at
> >
> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
> >        at
> >
> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
> >        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
> >        at
> >
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
> >
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
> >        at $Proxy6.put(Unknown Source)
> >        at
> >
> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
> >        at
> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
> >        at
> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
> >        at
> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
> >        at
> >
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
> >
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
> >        at $Proxy4.createTable(Unknown Source)
> >        at
> >
> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
> >        at
> >
> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
> >        at
> >
> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
> >
>

Re: A question about create table with regions in hbase version 0.90.3

Posted by Ted Yu <yu...@gmail.com>.
waitForMetaServerConnectionDefault() calls waitForMeta() which should have
waited for "hbase.master.catalog.timeout"
What's the value for "hbase.master.catalog.timeout" on your cluster ?

Thanks

2011/4/25 Gaojinchao <ga...@huawei.com>

> In client code Put data into Region server has one more times:
> eg:
>    public void processBatch(List<Row> list,
>    ....
>      for (int tries = 0; tries < numRetries && retry; ++tries) {   // if
> put data failed and try to do.
>    ...
>
> In function addRegionToMeta. Does it need to do this ?
>
> catalogTracker.waitForMetaServerConnectionDefault().put(   // does need try
> again ?  It fails for checkOpen because of  Region server is shutdowned.
>
> hmaster logs show
>  "org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)"
>
>
> -----邮件原件-----
> 发件人: Ted Yu [mailto:yuzhihong@gmail.com]
> 发送时间: 2011年4月25日 21:25
> 收件人: user@hbase.apache.org
> 主题: Re: A question about create table with regions in hbase version 0.90.3
>
> Can you give more detail as to how many region servers were shutting down ?
>
> Thanks
>
> 2011/4/25 Gaojinchao <ga...@huawei.com>
>
> > I merge issue HBASE-3744 to 0.90.2 and test it.
> > Find that Creating table fails when region server shutdown
> >
> > Does it need try to one more times for putting Meta data?
> >
> > public static void addRegionToMeta(CatalogTracker catalogTracker,
> >      HRegionInfo regionInfo)
> >  throws IOException {
> >    Put put = new Put(regionInfo.getRegionName());
> >    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
> >        Writables.getBytes(regionInfo));
> >    catalogTracker.waitForMetaServerConnectionDefault().put(
> >        // try again ?
> >        CatalogTracker.META_REGION, put);
> >    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
> > META");
> >  }
> >
> > Client logs:
> > 11/04/25 17:22:51 INFO
> client.HConnectionManager$HConnectionImplementation:
> > Closed zookeeper sessionid=0x12f8be0d9b7000b
> > 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
> > closed
> > 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
> > org.apache.hadoop.ipc.RemoteException:
> > org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
> > running
> >        at
> >
> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
> >        at
> >
> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
> >        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
> >        at
> >
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
> >
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
> >        at $Proxy6.put(Unknown Source)
> >        at
> >
> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
> >        at
> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
> >        at
> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
> >        at
> > org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >        at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
> >        at
> >
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
> >
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
> >        at
> > org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
> >        at $Proxy4.createTable(Unknown Source)
> >        at
> >
> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
> >        at
> >
> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
> >        at
> >
> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
> >
>

Re: A question about create table with regions in hbase version 0.90.3

Posted by Gaojinchao <ga...@huawei.com>.
In client code Put data into Region server has one more times:
eg:
    public void processBatch(List<Row> list,
    ....
      for (int tries = 0; tries < numRetries && retry; ++tries) {   // if put data failed and try to do.
    ...

In function addRegionToMeta. Does it need to do this ?

catalogTracker.waitForMetaServerConnectionDefault().put(   // does need try again ?  It fails for checkOpen because of  Region server is shutdowned.

hmaster logs show  "org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)"


-----邮件原件-----
发件人: Ted Yu [mailto:yuzhihong@gmail.com] 
发送时间: 2011年4月25日 21:25
收件人: user@hbase.apache.org
主题: Re: A question about create table with regions in hbase version 0.90.3

Can you give more detail as to how many region servers were shutting down ?

Thanks

2011/4/25 Gaojinchao <ga...@huawei.com>

> I merge issue HBASE-3744 to 0.90.2 and test it.
> Find that Creating table fails when region server shutdown
>
> Does it need try to one more times for putting Meta data?
>
> public static void addRegionToMeta(CatalogTracker catalogTracker,
>      HRegionInfo regionInfo)
>  throws IOException {
>    Put put = new Put(regionInfo.getRegionName());
>    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
>        Writables.getBytes(regionInfo));
>    catalogTracker.waitForMetaServerConnectionDefault().put(
>        // try again ?
>        CatalogTracker.META_REGION, put);
>    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
> META");
>  }
>
> Client logs:
> 11/04/25 17:22:51 INFO client.HConnectionManager$HConnectionImplementation:
> Closed zookeeper sessionid=0x12f8be0d9b7000b
> 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
> closed
> 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
> org.apache.hadoop.ipc.RemoteException:
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
> running
>        at
> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>        at
> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
>        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>        at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>
>        at
> org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>        at $Proxy6.put(Unknown Source)
>        at
> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>        at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>
>        at
> org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>        at $Proxy4.createTable(Unknown Source)
>        at
> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
>        at
> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
>        at
> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
>

Re: A question about create table with regions in hbase version 0.90.3

Posted by Gaojinchao <ga...@huawei.com>.
One region server with meta table is shutdowned.


-----邮件原件-----
发件人: Ted Yu [mailto:yuzhihong@gmail.com] 
发送时间: 2011年4月25日 21:25
收件人: user@hbase.apache.org
主题: Re: A question about create table with regions in hbase version 0.90.3

Can you give more detail as to how many region servers were shutting down ?

Thanks

2011/4/25 Gaojinchao <ga...@huawei.com>

> I merge issue HBASE-3744 to 0.90.2 and test it.
> Find that Creating table fails when region server shutdown
>
> Does it need try to one more times for putting Meta data?
>
> public static void addRegionToMeta(CatalogTracker catalogTracker,
>      HRegionInfo regionInfo)
>  throws IOException {
>    Put put = new Put(regionInfo.getRegionName());
>    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
>        Writables.getBytes(regionInfo));
>    catalogTracker.waitForMetaServerConnectionDefault().put(
>        // try again ?
>        CatalogTracker.META_REGION, put);
>    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
> META");
>  }
>
> Client logs:
> 11/04/25 17:22:51 INFO client.HConnectionManager$HConnectionImplementation:
> Closed zookeeper sessionid=0x12f8be0d9b7000b
> 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
> closed
> 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
> org.apache.hadoop.ipc.RemoteException:
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
> running
>        at
> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>        at
> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
>        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>        at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>
>        at
> org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>        at $Proxy6.put(Unknown Source)
>        at
> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>        at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>
>        at
> org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>        at $Proxy4.createTable(Unknown Source)
>        at
> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
>        at
> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
>        at
> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
>

Re: A question about create table with regions in hbase version 0.90.3

Posted by Ted Yu <yu...@gmail.com>.
Can you give more detail as to how many region servers were shutting down ?

Thanks

2011/4/25 Gaojinchao <ga...@huawei.com>

> I merge issue HBASE-3744 to 0.90.2 and test it.
> Find that Creating table fails when region server shutdown
>
> Does it need try to one more times for putting Meta data?
>
> public static void addRegionToMeta(CatalogTracker catalogTracker,
>      HRegionInfo regionInfo)
>  throws IOException {
>    Put put = new Put(regionInfo.getRegionName());
>    put.add(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER,
>        Writables.getBytes(regionInfo));
>    catalogTracker.waitForMetaServerConnectionDefault().put(
>        // try again ?
>        CatalogTracker.META_REGION, put);
>    LOG.info("Added region " + regionInfo.getRegionNameAsString() + " to
> META");
>  }
>
> Client logs:
> 11/04/25 17:22:51 INFO client.HConnectionManager$HConnectionImplementation:
> Closed zookeeper sessionid=0x12f8be0d9b7000b
> 11/04/25 17:22:51 INFO zookeeper.ZooKeeper: Session: 0x12f8be0d9b7000b
> closed
> 11/04/25 17:22:51 INFO zookeeper.ClientCnxn: EventThread shut down
> org.apache.hadoop.ipc.RemoteException:
> org.apache.hadoop.ipc.RemoteException: java.io.IOException: Server not
> running
>        at
> org.apache.hadoop.hbase.regionserver.HRegionServer.checkOpen(HRegionServer.java:2335)
>        at
> org.apache.hadoop.hbase.regionserver.HRegionServer.put(HRegionServer.java:1647)
>        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>        at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>
>        at
> org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>        at $Proxy6.put(Unknown Source)
>        at
> org.apache.hadoop.hbase.catalog.MetaEditor.addRegionToMeta(MetaEditor.java:57)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:804)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:780)
>        at
> org.apache.hadoop.hbase.master.HMaster.createTable(HMaster.java:747)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570)
>        at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039)
>
>        at
> org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:771)
>        at
> org.apache.hadoop.hbase.ipc.HBaseRPC$Invoker.invoke(HBaseRPC.java:257)
>        at $Proxy4.createTable(Unknown Source)
>        at
> org.apache.hadoop.hbase.client.HBaseAdmin.createTableAsync(HBaseAdmin.java:340)
>        at
> org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:302)
>        at
> com.huawei.smartcare.performanceTuning.createTable.main(createTable.java:103)
>