0
votes
hadoop jar \
/usr/lib/solr/contrib/mr/search-mr-1.0.0-cdh5.4.2-job.jar \
org.apache.solr.hadoop.MapReduceIndexerTool -D \
'mapreduce.map.java.opts=-Xmx500m' --morphline-file \
/home/cloudera/Desktop/response_morphline.conf --output-dir \
hdfs://quickstart.cloudera:8020/user/cloudera/index \
--go-live \
--zk-host 127.0.0.1:2181/solr \
--collection RES \
hdfs://quickstart.cloudera:8020/user/hive/warehouse/esb_response \
--mappers 1 --reducers 1;

My workflow.xml::

<workflow-app name="ESB_response" xmlns="uri:oozie:workflow:0.5">
    <start to="java-a6ca"/>
    <kill name="Kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <action name="java-a6ca">
        <java>
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <configuration>
                <property>
                    <name></name>
                    <value></value>
                </property>
            </configuration>
            <main-class>org.apache.solr.hadoop.MapReduceIndexerTool</main-class>
            <java-opts>[{u&#39;value&#39;: u&#39;-Dmapreduce.map.java.opts=-Xmx500m&#39;}]</java-opts>
            <arg>--morphline-file /user/hue/oozie/workspaces/hue-oozie-1446554691.71/response_morphline.conf</arg>
            <arg>--output-dir hdfs://quickstart.cloudera:8020/user/cloudera/index</arg>
            <arg>--go-live</arg>
            <arg>--zk-host 127.0.0.1:2181/solr</arg>
            <arg>--collection RES</arg>
            <arg>--mappers 1</arg>
            <arg>--reducers 1</arg>
            <file>#</file>
            <archive>#</archive>
        </java>
        <ok to="End"/>
        <error to="Kill"/>
    </action>
    <end name="End"/>
</workflow-app>

Hi I need to schedule this job through oozie? Can any one help? I have created this workflow by drag and drop feature in hue..but it throws an error as :: org.apache.oozie.action.ActionExecutorException: IllegalArgumentException: Can not create a Path from an empty string at org.apache.oozie.action.ActionExecutor.convertException(ActionExecutor.java:445) at org.apache.oozie.action.hadoop.JavaActionExecutor.submitLauncher(JavaActionExecutor.java:1008) at org.apache.oozie.action.hadoop.JavaActionExecutor.start(JavaActionExecutor.java:1162) at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:234) at org.apache.oozie.command.wf.ActionStartXCommand.execute(ActionStartXCommand.java:64) at org.apache.oozie.command.XCommand.call(XCommand.java:286) at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:321) at org.apache.oozie.service.CallableQueueService$CompositeCallable.call(CallableQueueService.java:250) at org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:175) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

2
Yet another proof that Hue job editor is useless. There are XML elements with no content i.e. <property> <file> <archive> -- and be aware that # means "rename the original HDFS file (left) to that local name (right)" so that's a plausible explanation for your message.Samson Scharfrichter

2 Answers

1
votes

Try removing the <file>#</file> and <archive>#</archive> from the workflow.xml

0
votes

If you are using and tags in the oozie workflow then i would recommend to give the full path of the file that you want to include in the oozie workflow.

Because here Oozie is looking for the file that you are referring but it is not getting that.

So either pass the file path in the tagg or remove the path if you don't want to add any file in oozie job.

Regards