hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Debraj Manna <subharaj.ma...@gmail.com>
Subject Re: HbaseTestingUtlity with hbase-shaded-client and hbase-shaded-server
Date Wed, 24 Jan 2018 06:35:39 GMT
I was getting exceptions like below because of the Guava that is used in
our application code and the one that is used hbase. So whenever I am
starting minicluster it was throwing exception like below

java.lang.NoSuchMethodError:
com.google.common.base.Objects.toStringHelper(Ljava/lang/Object;)Lcom/google/common/base/Objects$ToStringHelper;

    at org.apache.hadoop.metrics2.lib.MetricsRegistry.toString(MetricsRegistry.java:406)
    at java.lang.String.valueOf(String.java:2994)
    at java.lang.StringBuilder.append(StringBuilder.java:131)
    at org.apache.hadoop.ipc.metrics.RpcMetrics.<init>(RpcMetrics.java:74)
    at org.apache.hadoop.ipc.metrics.RpcMetrics.create(RpcMetrics.java:80)
    at org.apache.hadoop.ipc.Server.<init>(Server.java:2252)
    at org.apache.hadoop.ipc.RPC$Server.<init>(RPC.java:1042)
    at org.apache.hadoop.ipc.ProtobufRpcEngine$Server.<init>(ProtobufRpcEngine.java:535)
    at org.apache.hadoop.ipc.ProtobufRpcEngine.getServer(ProtobufRpcEngine.java:510)
    at org.apache.hadoop.ipc.RPC$Builder.build(RPC.java:887)
    at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.<init>(NameNodeRpcServer.java:341)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createRpcServer(NameNode.java:695)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(NameNode.java:672)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:838)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameNode.java:817)
    at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1538)
    at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNode(MiniDFSCluster.java:1114)
    at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNodesAndSetConf(MiniDFSCluster.java:985)
    at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(MiniDFSCluster.java:814)
    at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.java:745)
    at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniDFSCluster(HBaseTestingUtility.java:585)
    at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:987)
    at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:868)
    at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:862)
    at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:806)
    at com.vnera.storage.metrics.HBaseTestTableFactory.<init>(HBaseTestTableFactory.java:24)
    at com.vnera.storage.metrics.HBaseTests.testCounterTimetamp(HBaseTests.java:70)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)


Using shaded client and server I am not getting the above exception but
getting the exception which I posted in this query

java.lang.ClassCastException: org.apache.hadoop.hbase.shaded
.org.mortbay.jetty.servlet.Context$SContext cannot be cast to
org.mortbay.jetty.handler.ContextHandler$SContext
at org.mortbay.jetty.servlet.DefaultServlet.init(DefaultServlet.java:154)



On Tue, Jan 23, 2018 at 8:12 PM, Stack <stack@duboce.net> wrote:

> On Sun, Jan 21, 2018 at 10:33 PM, Debraj Manna <subharaj.manna@gmail.com>
> wrote:
>
> > Hi
> >
> > Is the above exception related to the below open issue
> > https://issues.apache.org/jira/browse/HBASE-15666 ?
> >
> >
> From the issue, it seems like this combination does not work. You need to
> use shaded client Debraj?
> Thanks,
> S
>
>
>
> > Thanks,
> >
> > On Sun, Jan 21, 2018 at 10:43 PM, Debraj Manna <subharaj.manna@gmail.com
> >
> > wrote:
> >
> > > I am trying to use HBaseTestingUtility 1.2 with hbase-shaded-client &
> > > hbase-shaded-server. It is throwing me the below exception. Can someone
> > let
> > > me know how can I avoid this?
> > >
> > > java.lang.ClassCastException: org.apache.hadoop.hbase.shaded
> > > .org.mortbay.jetty.servlet.Context$SContext cannot be cast to
> > > org.mortbay.jetty.handler.ContextHandler$SContext
> > > at org.mortbay.jetty.servlet.DefaultServlet.init(
> > DefaultServlet.java:154)
> > > at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.Ser
> > > vletHolder.initServlet(ServletHolder.java:440)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.Ser
> > > vletHolder.doStart(ServletHolder.java:263)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.component.Abstrac
> > > tLifeCycle.start(AbstractLifeCycle.java:50)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.Ser
> > > vletHandler.initialize(ServletHandler.java:736)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.Con
> > > text.startContext(Context.java:140)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.webapp.WebA
> > > ppContext.startContext(WebAppContext.java:1282)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.Con
> > > textHandler.doStart(ContextHandler.java:519)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.webapp.WebA
> > > ppContext.doStart(WebAppContext.java:499)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.component.Abstrac
> > > tLifeCycle.start(AbstractLifeCycle.java:50)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.Han
> > > dlerCollection.doStart(HandlerCollection.java:152)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.Con
> > > textHandlerCollection.doStart(ContextHandlerCollection.java:156)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.component.Abstrac
> > > tLifeCycle.start(AbstractLifeCycle.java:50)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.Han
> > > dlerWrapper.doStart(HandlerWrapper.java:130)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.Server.doSt
> > > art(Server.java:224)
> > > at org.apache.hadoop.hbase.shaded.org.mortbay.component.Abstrac
> > > tLifeCycle.start(AbstractLifeCycle.java:50)
> > > at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:900)
> > > at org.apache.hadoop.hdfs.server.namenode.NameNodeHttpServer.st
> > > art(NameNodeHttpServer.java:142)
> > > at org.apache.hadoop.hdfs.server.namenode.NameNode.startHttpSer
> > > ver(NameNode.java:774)
> > > at org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(N
> > > ameNode.java:667)
> > > at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameN
> > > ode.java:838)
> > > at org.apache.hadoop.hdfs.server.namenode.NameNode.<init>(NameN
> > > ode.java:817)
> > > at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNo
> > > de(NameNode.java:1538)
> > > at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNode(MiniDFS
> > > Cluster.java:1114)
> > > at org.apache.hadoop.hdfs.MiniDFSCluster.createNameNodesAndSetC
> > > onf(MiniDFSCluster.java:985)
> > > at org.apache.hadoop.hdfs.MiniDFSCluster.initMiniDFSCluster(Min
> > > iDFSCluster.java:814)
> > > at org.apache.hadoop.hdfs.MiniDFSCluster.<init>(MiniDFSCluster.
> java:745)
> > > at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniDFSClus
> > > ter(HBaseTestingUtility.java:585)
> > > at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster
> > > (HBaseTestingUtility.java:987)
> > > at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster
> > > (HBaseTestingUtility.java:868)
> > > at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster
> > > (HBaseTestingUtility.java:862)
> > > at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster
> > > (HBaseTestingUtility.java:806)
> > > at com.vnera.storage.metrics.HBaseTestTableFactory.<init>(HBase
> > > TestTableFactory.java:25)
> > > at com.vnera.storage.metrics.HBaseTests.testCounterTimetamp(HBa
> > > seTests.java:70)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
> > > ssorImpl.java:62)
> > > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
> > > thodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:498)
> > > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
> > > FrameworkMethod.java:50)
> > > at org.junit.internal.runners.model.ReflectiveCallable.run(Refl
> > > ectiveCallable.java:12)
> > > at org.junit.runners.model.FrameworkMethod.invokeExplosively(Fr
> > > ameworkMethod.java:47)
> > > at org.junit.internal.runners.statements.InvokeMethod.evaluate(
> > > InvokeMethod.java:17)
> > > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> > > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit
> > > 4ClassRunner.java:78)
> > > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit
> > > 4ClassRunner.java:57)
> > > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> > > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> > > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> > > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> > > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> > > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> > > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > > at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs
> > > (JUnit4IdeaTestRunner.java:68)
> > > at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.star
> > > tRunnerWithArgs(IdeaTestRunner.java:47)
> > > at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsA
> > > ndStart(JUnitStarter.java:242)
> > > at com.intellij.rt.execution.junit.JUnitStarter.main(
> > JUnitStarter.java:70)
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message