Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-2754

[oozie] Sqoop action with variable adds an empty argument

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.7.0
    • Fix Version/s: 3.9.0
    • Component/s: con.oozie
    • Labels:
      None
    • Environment:

      Running Hue with Oozie in CDH 5.4.1 in pseudo-dist mode on a single CentOS 6.6 VM (Firefox 17)

      Description

      If you add a Sqoop action and include a variable in the sqoop command, and attempt to run the workflow, Oozie will choke on a spurious generated empty arg tag.

      To reproduce:

      • Create a new work flow
      • Drag in a Sqoop action
      • You'll see a default sqoop command. Replace any parameter with a variable. I used this:
        import --connect jdbc:hsqldb:file:db.hsqldb --table ${tablename} --target-dir hdfs://localhost:8020/user/foo -m 1
      • Save and submit the workflow
      • Enter some value for the variable when prompted. I entered "test"
      • An error message displays:
        E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'arg'. One of ' {"uri:oozie:sqoop-action:0.2":file, "uri:oozie:sqoop-action:0.2":archive}

        ' is expected.

      This is reproducible only with a new sqoop action. If you enter a sqoop action that does not contain a variable and then edit it to contain a variable, that works.

      I examined the generated XML, and sure enough, there's an invalid (empty) arg tag generated:

      <workflow-app name="Sqoop_Test_1" xmlns="uri:oozie:workflow:0.5">
      <start to="sqoop-78ae"/>
      <kill name="Kill">
      <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
      </kill>
      <action name="sqoop-78ae">
      <sqoop xmlns="uri:oozie:sqoop-action:0.2">
      <job-tracker>${jobTracker}</job-tracker>
      <name-node>${nameNode}</name-node>
      <command>import --connect jdbc:hsqldb:file:db.hsqldb --table ${tablename} --target-dir hdfs://localhost:8020/user/foo -m 1</command>
      <arg></arg>
      </sqoop>
      <ok to="End"/>
      <error to="Kill"/>
      </action>
      <end name="End"/>
      </workflow-app>

        Attachments

          Activity

            People

            • Assignee:
              romain Romain Rigaux
              Reporter:
              dcarroll@cloudera.com Diana Carroll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: