淘先锋技术网

首页 1 2 3 4 5 6 7

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