GithubHelp home page GithubHelp logo

Comments (6)

romainr avatar romainr commented on May 19, 2024

The arg elements, if present, contains arguments for the main function. The value of each arg element is considered a single argument and they are passed to the main method in the same order.
https://oozie.apache.org/docs/4.0.1/WorkflowFunctionalSpec.html#a3.2.7_Java_Action

Do you see the final command string executed by Oozie in the logs?

It might be fine:
--time
"30
seconds"

-->

--time<>"30<>seconds"

from hue.

andreaferretti avatar andreaferretti commented on May 19, 2024

The problem is not in Oozie. Oozie can manage arguments with spaces, because arguments are wrapped inside the <arg> tag in XML. The problem is in the Hue interface to Oozie. The desired output would be two arguments - the first one being --time and the second one 30 seconds. In Oozie this happens with

<arg>--time</arg>
<arg>30 seconds</arg>

In bash, I can launch the program and quote the arguments, like --time "30 seconds".

What I am not able to do is to pass this argument in the Hue user interface

from hue.

romainr avatar romainr commented on May 19, 2024

I see! I created https://issues.cloudera.org/browse/HUE-2146

Unfortunately I don't see any other workaround than not using a space for now (e.g. --time "30seconds", --time "30-seconds" ...) and updating the Java program to also understand this format.

from hue.

skeltoac avatar skeltoac commented on May 19, 2024

I also experienced this while using tabs for record delimiters in a sqoop action. The arg '\t' would not work. I worked around the issue by recompiling sqoop with tab as the default delimiter.

from hue.

 avatar commented on May 19, 2024

I found a way to pass a space character as an oozie arg parameter. You have to double escape the octal value for the space character, i.e., "\040". So, let's say you want the arg parameter to be "Problem solved", you would need to enter "Problem\040solved".

The octal value for a space character is 040. For a bash script it would be \040. From oozie it needs to be \040.

from hue.

 avatar commented on May 19, 2024

Funny thing happened. After I wrote the comment above, I realized that it only showed a single back slash. So, I need to escape my comment, too! What I meant to say is this:

I found a way to pass a space character as an oozie arg parameter. You have to double escape the octal value for the space character, i.e., "\040". So, let's say you want the arg parameter to be "Problem solved", you would need to enter "Problem\040solved".

The octal value for a space character is 040. For a bash script it would be \040. From oozie it needs to be \040.

from hue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.