hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DM (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HBASE-15666) shaded dependencies for hbase-testing-util
Date Thu, 25 Jan 2018 07:31:00 GMT

    [ https://issues.apache.org/jira/browse/HBASE-15666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16338828#comment-16338828
] 

DM edited comment on HBASE-15666 at 1/25/18 7:30 AM:
-----------------------------------------------------

[~mdrob] - I am using version 1.2.0. I was trying it as a part of big project. But this can
be easily reproduced using a toy project placed in https://github.com/debraj-manna/reproduce
. 

You can download the maven project and just do {{mvn clean install}}. You will see the exception
in the console logs like below
{code:java}
2018-01-25 12:17:51,160 ERROR [main] master (Slf4jLog.java:warn(87)) - unavailable
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.ServletHolder.initServlet(ServletHolder.java:440)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.http.HttpServer.start(HttpServer.java:954)
	at org.apache.hadoop.hbase.http.InfoServer.start(InfoServer.java:91)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.putUpWebUI(HRegionServer.java:1794)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:602)
	at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:364)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:139)
	at org.apache.hadoop.hbase.LocalHBaseCluster.addMaster(LocalHBaseCluster.java:219)
	at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:155)
	at org.apache.hadoop.hbase.MiniHBaseCluster.init(MiniHBaseCluster.java:214)
	at org.apache.hadoop.hbase.MiniHBaseCluster.<init>(MiniHBaseCluster.java:94)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniHBaseCluster(HBaseTestingUtility.java:1031)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:991)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:863)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:857)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:801)
	at com.repro.hbase.TestHBase.testHbase(TestHBase.java:12)
	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)
{code}
I feel this is an important issue to fix else anyone using {{hbase-shaded-server}} and {{hbase-shaded-client}}
will not be able to test their code using {{hbase-testing-util}} . Let me know if you need
any more info.


was (Author: tuk):
[~mdrob] - I am using version 1.2.0. I was trying it as a part of big project. But this can
be easily reproduced using a toy project placed in https://github.com/debraj-manna/reproduce
. 

You can unzip the maven project and run {{TestHbase}}. You will see the exception in the console
logs like below
{code:java}
2018-01-25 12:17:51,160 ERROR [main] master (Slf4jLog.java:warn(87)) - unavailable
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.ServletHolder.initServlet(ServletHolder.java:440)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
	at org.apache.hadoop.hbase.shaded.org.mortbay.jetty.Server.doStart(Server.java:224)
	at org.apache.hadoop.hbase.shaded.org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
	at org.apache.hadoop.hbase.http.HttpServer.start(HttpServer.java:954)
	at org.apache.hadoop.hbase.http.InfoServer.start(InfoServer.java:91)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.putUpWebUI(HRegionServer.java:1794)
	at org.apache.hadoop.hbase.regionserver.HRegionServer.<init>(HRegionServer.java:602)
	at org.apache.hadoop.hbase.master.HMaster.<init>(HMaster.java:364)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.hadoop.hbase.util.JVMClusterUtil.createMasterThread(JVMClusterUtil.java:139)
	at org.apache.hadoop.hbase.LocalHBaseCluster.addMaster(LocalHBaseCluster.java:219)
	at org.apache.hadoop.hbase.LocalHBaseCluster.<init>(LocalHBaseCluster.java:155)
	at org.apache.hadoop.hbase.MiniHBaseCluster.init(MiniHBaseCluster.java:214)
	at org.apache.hadoop.hbase.MiniHBaseCluster.<init>(MiniHBaseCluster.java:94)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniHBaseCluster(HBaseTestingUtility.java:1031)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:991)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:863)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:857)
	at org.apache.hadoop.hbase.HBaseTestingUtility.startMiniCluster(HBaseTestingUtility.java:801)
	at com.repro.hbase.TestHBase.testHbase(TestHBase.java:12)
	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)
{code}
I feel this is an important issue to fix else anyone using {{hbase-shaded-server}} and {{hbase-shaded-client}}
will not be able to test their code using {{hbase-testing-util}} . Let me know if you need
any more info.

> shaded dependencies for hbase-testing-util
> ------------------------------------------
>
>                 Key: HBASE-15666
>                 URL: https://issues.apache.org/jira/browse/HBASE-15666
>             Project: HBase
>          Issue Type: New Feature
>          Components: test
>    Affects Versions: 1.1.0, 1.2.0
>            Reporter: Sean Busbey
>            Priority: Critical
>             Fix For: 2.0.0, 1.5.0
>
>
> Folks that make use of our shaded client but then want to test things using the hbase-testing-util
end up getting all of our dependencies again in the test scope.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message