[
https://issues.apache.org/jira/browse/OOZIE-748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405444#comment-13405444
]
Robert Kanter commented on OOZIE-748:
-------------------------------------
I removed group from my code and the similar code.
I used conf.getStrings() because WorkflowAppService uses it to read in the
"regular" oozie.libpath. Either way, I just tried using a path with a space
and conf.getStrings() seems fine, but there's actually a problem in
JavaActionExecutor's addToCache method where it does {noformat}URI uri = new
URI(path.toUri().getPath(){noformat} With a space, path.toUri() will replace
the space with "%20", but the additional .getPath() makes it a regular space
again, which seems to cause the URI constructor to throw an exception:
{code}
-------------------------------------------------------------------------------
Test set: org.apache.oozie.action.hadoop.TestJavaActionExecutor
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.63 sec <<<
FAILURE!
testActionLibsPath(org.apache.oozie.action.hadoop.TestJavaActionExecutor) Time
elapsed: 0.02 sec <<< ERROR!
org.apache.oozie.action.ActionExecutorException: URISyntaxException: Illegal
character in path at index 153:
/user/test/Users/rkanter/dev/oozie-trunk/core/target/test-data/oozietests/org.apache.oozie.action.hadoop.TestJavaActionExecutor/testActionLibsPath/action
libs/jar1.jar
at
org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:385)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.addToCache(JavaActionExecutor.java:338)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.addActionLibs(JavaActionExecutor.java:427)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.setLibFilesArchives(JavaActionExecutor.java:460)
at
org.apache.oozie.action.hadoop.TestJavaActionExecutor.testActionLibsPath(TestJavaActionExecutor.java:201)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at
org.apache.maven.surefire.junitcore.ClassDemarcatingRunner.run(ClassDemarcatingRunner.java:58)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.net.URISyntaxException: Illegal character in path at index 153:
/user/test/Users/rkanter/dev/oozie-trunk/core/target/test-data/oozietests/org.apache.oozie.action.hadoop.TestJavaActionExecutor/testActionLibsPath/action
libs/jar1.jar
at java.net.URI$Parser.fail(URI.java:2810)
at java.net.URI$Parser.checkChars(URI.java:2983)
at java.net.URI$Parser.parseHierarchical(URI.java:3067)
at java.net.URI$Parser.parse(URI.java:3025)
at java.net.URI.<init>(URI.java:577)
at
org.apache.oozie.action.hadoop.JavaActionExecutor.addToCache(JavaActionExecutor.java:301)
... 26 more
{code}
Are files added to the distributed cache supposed to be allowed to have spaces
in them?
> Add support for oozie.libpath to be set on a per-action basis in workflow.xml
> -----------------------------------------------------------------------------
>
> Key: OOZIE-748
> URL: https://issues.apache.org/jira/browse/OOZIE-748
> Project: Oozie
> Issue Type: Improvement
> Components: workflow
> Affects Versions: 3.2.0
> Reporter: J. McConnell
> Assignee: Robert Kanter
> Attachments: OOZIE-748-v2.patch, OOZIE-748.patch
>
>
> Currently, the oozie.libpath setting is allowed in job.properties when
> submitting a job to run in order to add a second directory to load jars from.
> It would be useful if the value of this setting set in the configuration of
> workflow actions were honored and the jars loaded.
> The use case is that I have three existing Java apps each with their
> dependencies managed by Maven. To avoid dependency conflicts, I have to
> deploy their dependencies to three separate directories. What I would like to
> do is create a single workflow with three Java actions to execute the three
> jobs, but they each need their own setting for oozie.libpath.
> Note: It may actually be oozie.launcher.oozie.libpath that should be
> configured within a workflow action. Either way, support for this
> functionality would be welcome.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira