Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Oozie workflow import fails while importing from hue

avatar
New Contributor
I am working on Oozie to automate ETL which involves more than 100 steps.I am able to create the workflow successfully in the development cluster.The problem comes when I am trying to move this huge workflow using export and import feature of Hue. I am getting a weird(Pardon my ignorance) error while importing workflows. Exports are working fine.
 
{"message": "Problem installing fixture '/tmp/tmp31Ptfm.json': Document2 matching query does not exist."}
5 REPLIES 5

avatar
New Contributor

I am also facing same problem. Any suggestions?

avatar
New Contributor

Hello. I had the same problem with coordinators (workflows on their own worked just fine)

 

What did the trick for me was to manually modify the coordinator.json, and move the coordinator object at the end of the file.

Maybe this happens because of the dependency you set for the coordinator, and it looks for the workflow that is not yet loaded.

 

Pretty wierd, as in some cases the export actually writes them in the good order.

avatar
Cloudera Employee
  1. Using Hue, navigate to Workflows > Editors
  2. Select the checkbox next to the workflow you want to export.
    Note:
    • If the workflow has dependent workflows, make sure to check those boxes as well.
    • You must export all dependencies into the same json file to be able to import.
    • Perform the following steps for every workflow entry in the exported json.
    • Make sure that the owner in the workflow json matches the user that is going to import the workflow json. Example:
      [
      {
        "pk": 7,
        "model": "desktop.document2",
        "fields": {
          "uuid": "29f4a162-d3ea-72b4-f031-08da995254ab",
      .....
          "owner": [
            "importinguser"
          ],
      ......
    • If importing into a different cluster than the one exported from, remove the parent_directory entry (as this does not exist in the new cluster) by removing the entire section:
      "parent_directory": [
            "bb0c705b-db54-4e3b-9afa-a849ccad3994",
            1,
            false
          ],
    • If importing into the same cluster that was exported from, the uuid must be unique (to change the uuid increment a few numbers or letters in the one that is already there or run uuidgen on a Linux or OSX host).
  3. Import the workflow by navigating back to Workflows > Editors, selecting Import.

Hope the above helps.

avatar
New Contributor

I rediscovered what@Shikkou pointed out, and the solution worked for me.

I will elaborate the action step, as it's not super clear from his answer.

 

Say your 'Master-Workflow' looks like this, 

  • START
  • Fork-1
    • Sub-Workflow-1-0
    • Sub-Workflow-1-1
  • Fork-2
    • Sub-Workflow-2
  • END

 

When you export this workflow, the exported json file, Master-Workflow.json might end up looking like

[
  {
    ....
    "name": "SUB-WORKFLOW-1-0"
  },
  {
    ....
    "name": "MASTER-WORKFLOW"    
  }  
  {
    ....
    "name": "SUB-WORKFLOW-2"    
  },
  {
    ....
    "name": "SUB-WORKFLOW-1-1"
  },

]

If Sub-Workflow-2 lists either of Sub-Workflow-1-0 or Sub-Workflow-1-1 as a dependency, it will throw the error OP mentions.

 

The solution is to simply edit 'Master-Workflow.json' to reflect the correct order, which in this case looks like

[
  {
    ....
    "name": "SUB-WORKFLOW-1-0"
  },
  {
    ....
    "name": "SUB-WORKFLOW-1-1"
  },
  {
    ....
    "name": "SUB-WORKFLOW-2"    
  },
  {
    ....
    "name": "MASTER-WORKFLOW"    
  }
]

 

You should now be able to import the entire thing!

 

P.S. - Unlike what @Adlin has pointed out, we were able to import entire workflows between users on different clusters without making any of the changes he has listed.

avatar
New Contributor

@bktahathanks, I also faced same issue, I just reorder the some part of workflow in json file and it works.