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:[email protected]] 发送时间: 2011年4月27日 12:18 收件人: Gaojinchao 抄送: [email protected]; 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 <[email protected]<mailto:[email protected]>> 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:[email protected]<mailto:[email protected]>] 发送时间: 2011年4月26日 21:36 收件人: [email protected]<mailto:[email protected]> 主题: 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 <[email protected]<mailto:[email protected]>> 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) > >
