3

oozie 调用jar包-转

 3 years ago
source link: http://www.hechunbo.com/index.php/archives/378.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

oozie 第三方jar包

对于OOZIE,引入第三方JAR的方法是oozie-site.xml中的oozie.service.WorkflowAppService.system.libpath, 我们需要配置这个选项,并把相应的JAR包上传到这个目录下。注意,这也是一个HDFS的路径!

oozie直接调用jar包

<action name="user_action_info_q_node">
        <shell xmlns="uri:oozie:shell-action:0.2">
            <job-tracker>${jobtracker_address}</job-tracker>
            <name-node>${namenode_address}</name-node>
            <configuration>
                <property>
                  <name>mapred.job.queue.name</name>
                  <value>${mapred_job_queue_name}</value>
                </property>
            </configuration>
            <exec>hadoop</exec>
            <argument>jar</argument>
            <argument>${mongo_sync_jar_name}</argument>
            <argument>com.hive.syncJob.HiveMongoSync</argument>
            <argument>-mongo-ip</argument>
            <argument>${mongo_ip}</argument>
            <argument>-mongo-port</argument>
            <argument>${mongo_port}</argument>
        </shell>
        <ok to="info_mongo_shell_node"/>
        <error to="fail"/>
    </action>

2.使用jar包

<action name="test1">
        <java>
            <job-tracker>${jobtracker_address}</job-tracker>
            <name-node>${namenode_address}</name-node>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${mapred_job_queue_name}</value>
                </property>
              
            </configuration>
           <main-class>test.java.main.HiveJDBCTEST</main-class>
         <capture-output/>
        </java>
        <ok to="end"/>
        <error to="fail"/>
    </action>

参考:https://blog.csdn.net/dacoolbaby/article/details/84523417


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK