[
https://issues.apache.org/jira/browse/LENS-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15458319#comment-15458319
]
Archana H commented on LENS-1140:
---------------------------------
lens-shell>add jar --path hdfs://host:8020//tmp/hiveudftest.jar
Add resource succeeded
But in logs its giving following error
{CODE}
02 Sep 2016 11:56:35 [4e45e1f7-0169-4e58-923f-50f42a3c4291]
[8656e965-fa93-4caa-b2b4-bc06f37e1502 grizzly-http-server-5] ERROR
org.apache.lens.server.session.LensSessionImpl - Invalid URL
hdfs://192.168.138.252:8020/tmp/hiveudftest.jar with location:
/tmp/8656e965-fa93-4caa-b2b4-bc06f37e1502_resources/hiveudftest.jar adding to
db exp_yoda
java.net.MalformedURLException: no protocol:
/tmp/8656e965-fa93-4caa-b2b4-bc06f37e1502_resources/hiveudftest.jar
at java.net.URL.<init>(URL.java:586) ~[na:1.8.0_40]
at java.net.URL.<init>(URL.java:483) ~[na:1.8.0_40]
at java.net.URL.<init>(URL.java:432) ~[na:1.8.0_40]
at
org.apache.lens.server.session.LensSessionImpl.addResourceToClassLoader(LensSessionImpl.java:390)
[classes/:na]
at
org.apache.lens.server.session.LensSessionImpl.addResourceToAllSessionClassLoaders(LensSessionImpl.java:400)
[classes/:na]
at
org.apache.lens.server.session.LensSessionImpl.addResource(LensSessionImpl.java:326)
[classes/:na]
at
org.apache.lens.server.session.HiveSessionService.addResource(HiveSessionService.java:119)
[classes/:na]
at
org.apache.lens.server.session.SessionResource.addResource(SessionResource.java:146)
[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_40]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_40]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_40]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_40]
at
org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
[jersey-server-2.22.1.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
[jersey-common-2.22.1.jar:na]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
[jersey-common-2.22.1.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
[jersey-common-2.22.1.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
[jersey-common-2.22.1.jar:na]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
[jersey-common-2.22.1.jar:na]
at
org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
[jersey-common-2.22.1.jar:na]
at
org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
[jersey-server-2.22.1.jar:na]
at
org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:384)
[jersey-container-grizzly2-http-2.22.1.jar:na]
at
org.glassfish.grizzly.http.server.HttpHandler$1.run(HttpHandler.java:224)
[grizzly-http-server-2.3.23.jar:2.3.23]
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
[grizzly-framework-2.3.23.jar:2.3.23]
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
[grizzly-framework-2.3.23.jar:2.3.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]
{CODE}
> Merging session jar with DB resources fails if session jar is in HDFS
> ---------------------------------------------------------------------
>
> Key: LENS-1140
> URL: https://issues.apache.org/jira/browse/LENS-1140
> Project: Apache Lens
> Issue Type: Bug
> Components: server
> Reporter: Amareshwari Sriramadasu
> Assignee: Amareshwari Sriramadasu
> Fix For: 2.6
>
> Attachments: LENS-1140.2.patch
>
>
> Scenario :
> DB db1 has DB resources.
> User does the following :
> {code}
> use db1
> add jar hdfs://myhdfs/tmp/mynew.jar
> {code}
> Server fails to add it to classpath. Here is the server log :
> {noformat}
> org.apache.lens.server.AuthenticationFilter - Request from user: null ,
> path=session/resources/add
> lensserver.log.2016-05-05.178:05 May 2016 11:01:41
> [d302a498-4136-4fdb-91b8-c24777ac407e] [grizzly-http-server-24] INFO
> org.apache.hive.service.cli.operation.Operation - Putting temp output to file
> /tmp/lens/946c79fc-7dea-44e3-8b96-44e4a3acf4897870923792886226589.pipeout
> lensserver.log.2016-05-05.178:05 May 2016 11:01:41
> [d302a498-4136-4fdb-91b8-c24777ac407e] [grizzly-http-server-24] INFO
> SessionState - converting to local hdfs://myhdfs/tmp/mynew.jar
> lensserver.log.2016-05-05.178:05 May 2016 11:01:52
> [d302a498-4136-4fdb-91b8-c24777ac407e] [grizzly-http-server-24] INFO
> SessionState - Added
> /tmp/946c79fc-7dea-44e3-8b96-44e4a3acf489_resources/mynew.jar to class path
> lensserver.log.2016-05-05.178:05 May 2016 11:01:52
> [d302a498-4136-4fdb-91b8-c24777ac407e] [grizzly-http-server-24] INFO
> SessionState - Added resource:
> /tmp/946c79fc-7dea-44e3-8b96-44e4a3acf489_resources/mynew.jar
> lensserver.log.2016-05-05.178:05 May 2016 11:01:52
> [d302a498-4136-4fdb-91b8-c24777ac407e] [grizzly-http-server-24] ERROR
> org.apache.lens.server.session.DatabaseResourceService - Invalid URL
> hdfs://myhdfs/tmp/mynew.jar adding to db db1
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)