tez ui 安装测试

tez ui 安装测试

标签(空格分隔): 未分类


环境:hadoop-2.7.1,tez-0.7.0,tomcat 7

  1. 将编译后的tez-ui.xxx.war文件复制到tomcat的webapps目录中
  2. 修改tez-ui的war解压后的文件scripts/configs.js文件

    App.setConfigs({
    
    /* Environment configurations */
    envDefaults: {
    version: "0.7.0",
    /* * By default TEZ UI looks for timeline server at http://localhost:8188, uncomment and change * the following value for pointing to a different domain. */
    timelineBaseUrl: 'http://10.162.209.29:8188',
    
    /* * By default RM web interface is expected to be at http://localhost:8088, uncomment and change * the following value to point to a different domain. */
    RMWebUrl: 'http://10.162.209.29:8088',
    }

    timelineBaseUrl的值为yarn中的timeline地址 
    RMWebUrl:的值为resourcemanager的地址

  3. 配置yarn的timeline服务:修改yarn-site.xml文件,添加如下配置

         <!-- conf timeline server -->
        <property>
                <name>yarn.timeline-service.enabled</name>
                <value>true</value>
        </property>
    
        <property>
                <name>yarn.timeline-service.hostname</name>
                <value>10.162.209.29</value>
        </property>
    
        <property>
                <name>yarn.timeline-service.http-cross-origin.enabled</name>
                <value>true</value>
        </property>
    
        <property>
                <name> yarn.resourcemanager.system-metrics-publisher.enabled</name>
                <value>true</value>
        </property>

    修改后的yarn-site.xml文件同步到所有hadoop节点中,并重启yarn服务

    [hadoop@gateway]$ hadoop-2.7.1/sbin/stop-yarn.sh #停止
    [hadoop@gateway]$ hadoop-2.7.1/sbin/start-yarn.sh #启动
    [hadoop@gateway]$ hadoop-2.7.1/sbin/yarn-daemon.sh start historyserver #启动timeline服务
    • 从浏览器访问10.162.209.29:8188 地址可以看到和8088端口一样的ui界面即可
  4. 修改tez-site.xml文件 
    xml 
    <property> 
    <name>tez.history.logging.service.class</name> 
    <value>org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService</value> 
    </property> 
    <property> 
    <name>tez.allow.disabled.timeline-domains</name> 
    <value>true</value> 
    </property> 

    添加如上配置项:此处添加的tez-site.xml文件位于hive的conf下
  5. 运行一个hive的tez查询可以看到如下界面: 
    sql 
    hive> select x1.application_id,x2.application_id,x1.maxnum1,x2.minnum1 from ( 
    > select application_id,time_scope, max(num1) as maxnum1 from metric_data_entity group by application_id,time_scope limit 10) x1 
    > join ( 
    > select application_id,time_scope, min(num1) as minnum1 from metric_data_entity group by application_id,time_scope limit 10 
    > ) x2 
    > on x1.application_id=x2.application_id; 
  6. 运行后的tez-UI:
    tez ui 安装测试_第1张图片

你可能感兴趣的:(hadoop,hive,tez)