|
|
-
Failing to diagnose errors using HBaseTestingUtility
Noah Watkins 2012-04-04, 19:40
I am working on a project that uses HBase and want to develop my unit tests to use the HBaseTestingUtility to test without a separate cluster, but I am running into a lot problems using it. Everything compiles fine, but there my unit tests that try to spin up a cluster blow up:
This is the basic test I am trying to run:
public class PersiaAdminTest { private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@BeforeClass public static void setUpBeforeClass() throws Exception { TEST_UTIL.startMiniCluster(1); }
@AfterClass public static void tearDownAfterClass() throws Exception { TEST_UTIL.shutdownMiniCluster(); }
@Test public void testPersiaAdmin() throws IOException { assertTrue(true); } }
My pom.xml has the following dependencies:
hadoop-core-1.0.0 hadoop-test-1.0.0 hbase-0.92.1 hbase-0.92.1 (test-jar) junit-4.10
And the error message I am getting is: (note that when I download the 0.92.1 release tar ball, the unit tests that use HBaseTestingUtility don't have this issue):
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.154 sec <<< FAILURE! edu.ucsc.srl.persia.PersiaAdminTest Time elapsed: 6.155 sec <<< ERROR! java.io.IOException: Shutting down at org.apache.hadoop.hbase.MiniHBaseCluster.init(MiniHBaseCluster.java:203) at org.apache.hadoop.hbase.MiniHBaseCluster.<init>(MiniHBaseCluster.java:76) at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniHBaseCluster(HBaseTestingUtility.java:523) at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:503) at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:451) at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:438) at edu.ucsc.srl.persia.PersiaAdminTest.setUpBeforeClass(PersiaAdminTest.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110) at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175) at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68) Caused by: java.lang.RuntimeException: Failed construction of Master: class org.apache.hadoop.hbase.master.HMaster at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:157) at org.apache.hadoop.hbase.LocalHBaseCluster.addMaster(LocalHBaseCluster.java:198) at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:148) at org.apache.hadoop.hbase.MiniHBaseCluster.init(MiniHBaseCluster.java:185) ... 28 more Caused by: java.lang.NoSuchMethodError: org.codehaus.jackson.type.JavaType.isFullyTyped()Z at org.codehaus.jackson.map.type.ArrayType.<init>(ArrayType.java:36) at org.codehaus.jackson.map.type.ArrayType.construct(ArrayType.java:48) at org.codehaus.jackson.map.type.ArrayType.addCommonTypes(ArrayType.java:78) at org.codehaus.jackson.map.type.TypeFactory.<init>(TypeFactory.java:43) at org.codehaus.jackson.map.type.TypeFactory.<clinit>(TypeFactory.java:15) at org.codehaus.jackson.map.ObjectMapper.<clinit>(ObjectMapper.java:42) at org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.<clinit>(WritableRpcEngine.java:258) at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getServer(WritableRpcEngine.java:245) at org.apache.hadoop.hbase.ipc.WritableRpcEngine.getServer(WritableRpcEngine.java:55) at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:401) at org.apache.hadoop.hbase.ipc.HBaseRPC.getServer(HBaseRPC.java:390) at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:244) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:154) ... 31 more
====Below is the log. It looks like the problem is because the cluster isn't starting up, but I'm still clueless what's wrong. ==== Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec Running edu.ucsc.srl.persia.PersiaAdminTest 12/04/04 12:22:09 INFO hbase.HBaseTestingUtility: Starting up minicluster with 1 master(s) and 1 regionserver(s) and 1 datanode(s) 12/04/04 12:22:09
-
Re: Failing to diagnose errors using HBaseTestingUtility
Stack 2012-04-04, 19:51
On Wed, Apr 4, 2012 at 12:40 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: > I am working on a project that uses HBase and want to develop my unit tests to use the HBaseTestingUtility to test without a separate cluster, but I am running into a lot problems using it. Everything compiles fine, but there my unit tests that try to spin up a cluster blow up: >
Check your classpath. Looks like jackson is missing (or one of its supporting jars) going by this I saw in your output:
Caused by: java.lang.NoSuchMethodError: org.codehaus.jackson.type.JavaType.isFullyTyped()Z
Yes, the master is failing to instantiate because of the above exception. St.Ack
-
Re: Failing to diagnose errors using HBaseTestingUtility
Noah Watkins 2012-04-04, 20:22
On Apr 4, 2012, at 12:51 PM, Stack wrote:
> Caused by: java.lang.NoSuchMethodError: > org.codehaus.jackson.type.JavaType.isFullyTyped()
Doh! Not sure how i missed that. Thank you. My tests are now reported as being run successfully, but there are still many exceptions that are/look concerning. I'd really like to resolve these to keep the logs clean, but at the very least, knowing that they harmless would be acceptable :) -- Any thoughts? I saw something similar in an old JIRA about setting umask to 0022, which looked related, but I've never dealt with MXBean errors before.
Thanks, Noah
12/04/04 13:05:10 INFO master.AssignmentManager: Clean cluster startup. Assigning userregions javax.management.NotCompliantMBeanException: org.apache.hadoop.hbase.master.MXBean: Method org.apache.hadoop.hbase.master.MXBean.getRegionServers has parameter or return type that cannot be translated into an open type at com.sun.jmx.mbeanserver.Introspector.throwException(Introspector.java:419) at com.sun.jmx.mbeanserver.MBeanAnalyzer.<init>(MBeanAnalyzer.java:118) at com.sun.jmx.mbeanserver.MBeanAnalyzer.analyzer(MBeanAnalyzer.java:104) at com.sun.jmx.mbeanserver.MXBeanIntrospector.getAnalyzer(MXBeanIntrospector.java:71) at com.sun.jmx.mbeanserver.MBeanIntrospector.getPerInterface(MBeanIntrospector.java:181) at com.sun.jmx.mbeanserver.MBeanSupport.<init>(MBeanSupport.java:136) at com.sun.jmx.mbeanserver.MXBeanSupport.<init>(MXBeanSupport.java:66) at com.sun.jmx.mbeanserver.Introspector.makeDynamicMBean(Introspector.java:184) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:936) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330) at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516) at org.apache.hadoop.metrics.util.MBeanUtil.registerMBean(MBeanUtil.java:58) at org.apache.hadoop.hbase.master.HMaster.registerMBean(HMaster.java:1646) at org.apache.hadoop.hbase.master.HMaster.finishInitialization(HMaster.java:527) at org.apache.hadoop.hbase.master.HMaster.run(HMaster.java:336) at java.lang.Thread.run(Thread.java:679) Caused by: java.lang.IllegalArgumentException: Method org.apache.hadoop.hbase.master.MXBean.getRegionServers has parameter or return type that cannot be translated into an open type at com.sun.jmx.mbeanserver.ConvertingMethod.from(ConvertingMethod.java:45) at com.sun.jmx.mbeanserver.MXBeanIntrospector.mFrom(MXBeanIntrospector.java:81) at com.sun.jmx.mbeanserver.MXBeanIntrospector.mFrom(MXBeanIntrospector.java:51) at com.sun.jmx.mbeanserver.MBeanAnalyzer.initMaps(MBeanAnalyzer.java:135) at com.sun.jmx.mbeanserver.MBeanAnalyzer.<init>(MBeanAnalyzer.java:116) ... 14 more Caused by: javax.management.openmbean.OpenDataException: Cannot obtain array class at com.sun.jmx.mbeanserver.OpenConverter.openDataException(OpenConverter.java:1389) at com.sun.jmx.mbeanserver.OpenConverter.makeArrayOrCollectionConverter(OpenConverter.java:346) at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:295) at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277) at com.sun.jmx.mbeanserver.OpenConverter.makeTabularConverter(OpenConverter.java:376) at com.sun.jmx.mbeanserver.OpenConverter.makeParameterizedConverter(OpenConverter.java:417) at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:312) at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277) at com.sun.jmx.mbeanserver.OpenConverter.makeCompositeConverter(OpenConverter.java:482) at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:309) at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277) at com.sun.jmx.mbeanserver.OpenConverter.makeTabularConverter(OpenConverter.java:377) at com.sun.jmx.mbeanserver.OpenConverter.makeParameterizedConverter(OpenConverter.java:417) at com.sun.jmx.mbeanserver.OpenConverter.makeConverter(OpenConverter.java:312) at com.sun.jmx.mbeanserver.OpenConverter.toConverter(OpenConverter.java:277) at com.sun.jmx.mbeanserver.ConvertingMethod.<init>(ConvertingMethod.java:197) at com.sun.jmx.mbeanserver.ConvertingMethod.from(ConvertingMethod.java:40) ... 18 more Caused by: java.lang.ClassNotFoundException: [Lbyte; at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at com.sun.jmx.mbeanserver.OpenConverter.makeArrayOrCollectionConverter(OpenConverter.java:344) ... 33 more 12/04/04 13:05:10 INFO master.HMaster: Registered HMaster MXBean 12/04/04 13:05:10 INFO master.HMaster: Master has completed initialization 12/04/04 13:05:11 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x1367ef5d1320002 12/04/04 13:05:11 INFO server.PrepRequestProcessor: Processed session termination for sessionid: 0x1367ef5d1320002 12/04/04 13:05:11 INFO zookeeper.ZooKeeper: Session: 0x1367ef5d1320002 closed 12/04/04 13:05:11 INFO hbase.HBaseTestingUtility: Minicluster is up 12/04/04 13:05:11 INFO zookeeper.ClientCnxn: EventThread shut down 12/04/04 13:05:11 INFO hbase.HBaseTestingUtility: Shutting down minicluster 12/04/04 13:05:11 INFO server.NIOServerCnxn: Closed socket connection for client /127.0.0.1:53724 which had sessionid 0x1367ef5d1320002 12/04/04 13:05:11 INFO master.HMaster: Cluster shutdown requested 12/04/04 13:05:11 INFO regionserver.HRegionServer: STOPPED: Shutdown requested 12/04/04 13:05:11 INFO master.ServerManager: Waiting on regionserver(s) to go down localhost,60207,1333569902087 12/04/04 13:05:11 INFO master.HMaster$2: localhost,35192,1333569901811-BalancerChore exiting 12/04/04 13:05:11 INFO master.CatalogJanitor: localhost,35192,1333569901811-CatalogJanitor exiting 12/04/04 13:05:12 INFO master.SplitLogManager$TimeoutMonitor: localhost,35192,1333569901811.splitLogManagerTimeoutMonitor exiting 12/04/04 13:05:12 INFO master.ServerManager: Waiting on regionserver(s) to go down l
-
Re: Failing to diagnose errors using HBaseTestingUtility
Stack 2012-04-04, 20:43
On Wed, Apr 4, 2012 at 1:22 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: > Doh! Not sure how i missed that. Thank you. My tests are now reported as being run successfully, but there are still many exceptions that are/look concerning. I'd really like to resolve these to keep the logs clean, but at the very least, knowing that they harmless would be acceptable :) -- Any thoughts? I saw something similar in an old JIRA about setting umask to 0022, which looked related, but I've never dealt with MXBean errors before. >
Is this trunk? Looks like the exceptions don't kill your test but please file an issue to clean them up. What JVM are you on?
St.Ack
-
Re: Failing to diagnose errors using HBaseTestingUtility
Noah Watkins 2012-04-04, 20:49
On Apr 4, 2012, at 1:43 PM, Stack wrote:
> On Wed, Apr 4, 2012 at 1:22 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: >> Doh! Not sure how i missed that. Thank you. My tests are now reported as being run successfully, but there are still many exceptions that are/look concerning. I'd really like to resolve these to keep the logs clean, but at the very least, knowing that they harmless would be acceptable :) -- Any thoughts? I saw something similar in an old JIRA about setting umask to 0022, which looked related, but I've never dealt with MXBean errors before. >> > > Is this trunk? Looks like the exceptions don't kill your test but
I don't think so? These test are run without a live HBase installation. So all the dependencies are brought in from the default Maven repository. Does that answer your question?
> please file an issue to clean them up. What JVM are you on?
nwatkins@kyoto:~/projects$ java -version java version "1.6.0_23" OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre11-0ubuntu1.11.10.2) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Could this be a sore point? Perhaps Oracle might behave better?
-
Re: Failing to diagnose errors using HBaseTestingUtility
Stack 2012-04-04, 20:51
On Wed, Apr 4, 2012 at 1:49 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: > Could this be a sore point? Perhaps Oracle might behave better?
Try it. St.Ack
-
Re: Failing to diagnose errors using HBaseTestingUtility
Noah Watkins 2012-04-04, 20:53
On Apr 4, 2012, at 1:51 PM, Stack wrote:
> On Wed, Apr 4, 2012 at 1:49 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: >> Could this be a sore point? Perhaps Oracle might behave better?
I guess not. I'm using the same JVM to run the 0.92.1 release tar ball and don't get any of these issues when running the tests. Sigh.
-
Re: Failing to diagnose errors using HBaseTestingUtility
Stack 2012-04-04, 22:17
On Wed, Apr 4, 2012 at 1:53 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: > > On Apr 4, 2012, at 1:51 PM, Stack wrote: > >> On Wed, Apr 4, 2012 at 1:49 PM, Noah Watkins <[EMAIL PROTECTED]> wrote: >>> Could this be a sore point? Perhaps Oracle might behave better? > > I guess not. I'm using the same JVM to run the 0.92.1 release tar ball and don't get any of these issues when running the tests. Sigh. > If you don't see complaints like the below:
Caused by: java.lang.ClassNotFoundException: [Lbyte; at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at com.sun.jmx.mbeanserver.OpenConverter.makeArrayOrCollectionConverter(OpenConverter.java:344)
when you run hbase unit tests, then something odd about your environment.
Google your exception? You might get a clue (funny how someone else has almost always had your problem first).
St.Ack
|
|