現在的位置: 首頁 > 綜合 > 正文

Oozie配置說明

2019年11月04日 ⁄ 綜合 ⁄ 共 4731字 ⁄ 字型大小 評論關閉

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

抱歉!評論已關閉.