hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaojinchao <gaojinc...@huawei.com>
Subject It seems like a bug for test case//Re: A question about TestAdmin failed.
Date Wed, 27 Apr 2011 03:48:45 GMT
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 <gaojinchao@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)
>
>
Mime
View raw message