Oozie配置说明

Oozie配置说明

  • Oozie数据库配置,修改oozie-site.xml文件
        <property>
            <name>oozie.db.schema.name</name>
            <value>oozie</value>
            <description>
                Oozie DataBase Name
            </description>
        </property>
        <property>
            <name>oozie.service.JPAService.create.db.schema</name>
            <value>false</value>
            <description>
                Creates Oozie DB.
                If set to true, it creates the DB schema if it does not exist. If the DB schema exists is a NOP.
                If set to false, it does not create the DB schema. If the DB schema does not exist it fails start up.
            </description>
        </property>
        <property>
            <name>oozie.service.JPAService.jdbc.driver</name>
            <value>com.mysql.jdbc.Driver</value>
            <description>
                JDBC driver class.
            </description>
        </property>
        <property>
            <name>oozie.service.JPAService.jdbc.url</name>
            <value>jdbc:mysql://localhost:3306/${oozie.db.schema.name}?seUnicode=true;characterEncoding=UTF-8</value>
            <description>
                JDBC URL.
            </description>
        </property>
        <property>
            <name>oozie.service.JPAService.jdbc.username</name>
            <value>oozie</value>
            <description>
                DB user name.
            </description>
        </property>
        <property>
            <name>oozie.service.JPAService.jdbc.password</name>
            <value>oozie</value>
            <description>
                DB user password.
     
                IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
                           if empty Configuration assumes it is NULL.
            </description>
        </property>
  • 配置代理用户,修改Hadoop配置文件Hadoop core-site.xml
    <!-- OOZIE -->
      <property>
          <name>hadoop.proxyuser.[OOZIE_SERVER_USER].hosts</name>
          <value>[OOZIE_SERVER_HOSTNAME]</value>
      </property>
      <property>
          <name>hadoop.proxyuser.[OOZIE_SERVER_USER].groups</name>
          <value>[USER_GROUPS_THAT_ALLOW_IMPERSONATION]</value>
      </property>
  • 配置失败任务重试,修改oozie-default.xml
      <!-- Workflow Action Automatic Retry -->
      <property>
          <name>oozie.service.LiteWorkflowStoreService.user.retry.max</name>
          <value>3</value>
          <description>
              Automatic retry max count for workflow action is 3 in default.
          </description>
      </property>
      <property>
          <name>oozie.service.LiteWorkflowStoreService.user.retry.inteval</name>
          <value>10</value>
          <description>
              Automatic retry interval for workflow action is in minutes and the default value is 10 minutes.
          </description>
      </property>
      <property>
          <name>oozie.service.LiteWorkflowStoreService.user.retry.error.code</name>
          <value>JA017</value>
          <description>
              Automatic retry interval for workflow action is handled for these specified error code.
          </description>
      </property>
      <property>
          <name>oozie.service.LiteWorkflowStoreService.user.retry.error.code.ext</name>
          <value> </value>
          <description>
              Automatic retry interval for workflow action is handled for these specified extra error code.
          </description>
      </property>

    在需要retry的action节点上配置
       <workflow-app xmlns="uri:oozie:workflow:0.3" name="wf-name">
       <action name="a" retry-max="2" retry-interval="1">
       </action>
  • 邮件SMTP配置,修改oozie-site.xml
        <property>
            <name>oozie.email.smtp.host</name>
            <value>smtp.miaozhen.com</value>
            <description>
            </description>
        </property>
        <property>
            <name>oozie.email.smtp.port</name>
            <value>25</value>
            <description>
            </description>
        </property>
        <property>
            <name>oozie.email.from.address</name>
            <value>******@***.com</value>
            <description>
            </description>
        </property>
        <property>
             <name>oozie.email.smtp.auth</name>
             <value>true</value>
             <description>
             </description>
        </property>
        <property>
            <name>oozie.email.smtp.username</name>
            <value>******@***.com</value>
            <description>
            </description>
        </property>
        <property>
            <name>oozie.email.smtp.password</name>
            <value>******</value>
            <description>
            </description>
        </property>
  • 时区配置,目前只支持UTC和GMT类型的时区,修改oozie-site.xml
        <property>
            <name>oozie.processing.timezone</name>
            <value>GMT+0800</value>
        </property>
  • 多workflow间共享jar包
    1:需要将要共享的jar包放到指定hdfs目录,如/user/supertool/share/lib/java
    <property>
            <name>oozie.service.WorkflowAppService.system.libpath</name>
            <value>/user/${user.name}/share/lib</value>
            <description>
                System library path to use for workflow applications.
                This path is added to workflow application if their job properties sets
                the property 'oozie.use.system.libpath' to true.
            </description>
    </property>
    2:在oozie-site.xml中加入配置,所有的java action就会将/user/supertool/share/lib/java加入classpath
    <property>
       <name>oozie.action.sharelib.for.java</name>
       <value>java<value>
    </property>
     
    3:在job.properties中设置oozie.use.system.libpath=true
     
    !!当然也可以在java action中配置此选项,只在本次action中将/user/supertool/share/lib/java加入classpath
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值