I need to copy a directory from one hdfs-path to another one. However, I run into the absence of copy
command in Oozie framework:
<action name="SOME_ACTION">
<fs>
<copy source='/foo/src_dir' target='/bar/dest_dir' />
</fs>
<ok to="END"/>
<error to="KILL"/>
</action>
Unfortunately, there isn't a copy
command in fs
action. That's the error, I have got:
OozieClientException: org.apache.oozie.DagEngineException: E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content was found starting with element 'copy'. One of '{"uri:oozie:workflow:0.4":delete, "uri:oozie:workflow:0.4":mkdir, "uri:oozie:workflow:0.4":move, "uri:oozie:workflow:0.4":chmod, "uri:oozie:workflow:0.4":touchz}' is expected.
Why is copy
command is absent and what is the canonical way copying hdfs directories in Oozie framework?
There is no copy in FS action. You can use the DistCp action to achieve this: https://oozie.apache.org/docs/4.3.1/DG_DistCpActionExtension.html