> On July 6, 2018, 1:40 p.m., András Piros wrote: > > tools/src/main/java/org/apache/oozie/tools/OozieSharelibCLI.java > > Lines 88 (patched) > > <https://reviews.apache.org/r/67834/diff/2/?file=2053414#file2053414line88> > > > > Problem is we can have ```hdfs://my/jar.jar#myjar.jar``` inside > > sharelib paths. > > > > Best is to go with e.g. `;` that cannot be present as HDFS or local > > file. > > Kinga Marton wrote: > Using semicolon(;) is not a good ideea because the shell handles it as a > command separator. What about using & ? > > András Piros wrote: > I'm OK using colon `,` as the separator between sharelib name-path pairs, > and pipe `|` between sharelib paths like this: > ``` > additional-lib > sharelibName1=/path/to/source/|/path/to/some/file,sharelibName2=/path/to/some/folder > ```
The pipe will not work, since it has the same problem as the semicolon. It is interpreted by the Shell. It can work only if is surrounded by double quotes. The problem is that every character that seems to be logic as a delimiter, is interpreted by the Shell. What about using '+' as sharelibs delimiter? Using '+' would result in the following command: ``` -extralibs sharelibName=/path/to/source/,/path/to/some/file+sharelibName2=/path/to/some/folder,hdfs://my/jar.jar#myjar.jar ``` Or another solution would be to use double quotes if we want to specify more than one extra sharelib. This way we can even use the semicolon (;) - Kinga ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67834/#review205796 ----------------------------------------------------------- On July 6, 2018, 8:36 a.m., Kinga Marton wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67834/ > ----------------------------------------------------------- > > (Updated July 6, 2018, 8:36 a.m.) > > > Review request for oozie, András Piros, Peter Cseh, and Peter Bacsko. > > > Repository: oozie-git > > > Description > ------- > > Right now sharelib can be created via sharelib create -fs FS_URI -locallib > SHARED_LIBRARY where the SHARED_LIBRARY can be a tarbal or a folder. > It would be nice to have the possibility to define additional folders to be > uploaded into the sharelib, so the users don't have to copy or link the files > together on their machine. > The syntax could be something like -additional-lib > sharelibName=/path/to/source/;/path/to/some/file,sharelibName2=/path/to/some/folder > > > Diffs > ----- > > docs/src/site/twiki/AG_Install.twiki 46363a3b3 > tools/src/main/java/org/apache/oozie/tools/OozieSharelibCLI.java 75e932c02 > tools/src/test/java/org/apache/oozie/tools/OozieSharelibFileOperations.java > d344300ed > tools/src/test/java/org/apache/oozie/tools/TestConcurrentCopyFromLocal.java > d77eba69d > tools/src/test/java/org/apache/oozie/tools/TestCopyTaskCallable.java > bce0433c6 > tools/src/test/java/org/apache/oozie/tools/TestOozieSharelibCLI.java > 5929e5ca0 > > tools/src/test/java/org/apache/oozie/tools/diag/IntegrationTestOozieSharelibCLI.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/67834/diff/4/ > > > Testing > ------- > > Tested manually + added integration test > > > Thanks, > > Kinga Marton > >