分享

cloudera hue安装及Oozie的安装

pig2 发表于 2014-2-9 19:21:41 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 4 138427
本帖最后由 pig2 于 2014-2-9 19:27 编辑

思考:hue与Oozie之间的关系是什么?

下载hue 1.2
下载地址:
https://github.com/cloudera/hue/downloads/
  1. HADOOP_HOME=/hadoop/hadoop0.20.2 PREFIX=/hadoop/hue make install
复制代码
以前叫cloudera desktop,使用django作为web框架

1. 安装



waiting  .. .. ..
执行完会在PREFIX指定的路径下生成hue的服务程序

2.配置

在hue/desktop/conf配置hue.ini
[[database]]
engine=mysql
host=localhost
port=3306
user=peter
password=peter
name=hue
hadoop,hdfs,mapred配置
hadoop_home=/hadoop/hadoop0.20.2
hadoop_conf_dir=/hadoop/hadoop0.20.2/conf
hdfs_port=8020
http_port=50070
jobtracker_host=localhost


3.配置hive
hive_home=/hadoop/hive0.70
hive_conf_dir=/hadoop/hive0.70/conf
4.初始化

/hadoop/hue/build/env/bin/hue syncdb --noinput

5.启动

/hadoop/hue/build/env/bin/supervisor

11453a302-0.png



---------------------------------------------------------------------------------------------------------------------------------------------------
Oozie的安装

Oozie是一种Java Web应用程序,它运行在Java servlet容器——即Tomcat——中,并使用数据库来存储以下内容:
  • 工作流定义
  • 当前运行的工作流实例,包括实例的状态和变量
Oozie工作流是放置在控制依赖DAG(有向无环图 Direct Acyclic Graph)中的一组动作(例如,Hadoop的Map/Reduce作业、Pig作业等),其中指定了动作执行的顺序。

Oozie翻译:驯象人,Hadoop得名来源于创始人Doug Cutting的孩子给一大象玩具取的名字,而oozie作为Hadoop上的工作流引擎,名字取得真的很贴切。
先获取oozie的版本,使用版本3.3.1.
http://mirror.bit.edu.cn/apache/oozie/3.3.1/
此版本需要自己build,需要先下载安装JDK, maven, hadoop, extjs libray 2.2.
我的环境:

  • Ubuntu
  • JDK 1.6.0_43
  • maven 3.0.7
  • Hadoop 1.0.4
  • extjs 2.2 (Oozie web-console需要)

1. Build:
./bin/mkdistro.sh -DskipTests
成功build后,会在目录里生成一个distribution.
1.png



hadoop安装时创建的hadoop组和hadoop用户对oozie目录是没有权限,所以最好一开始创建oozie组和oozie用户,同时赋予权限,不然会报错.偷懒用了root用户。新用户下记得export JAVA_HOME=<JDK安装路径>

2.安装oozie:
Create a libext/ directory in the directory where Oozie was expanded.If using a version of Hadoop bundled in Oozie hadooplibs/ , copy the corresponding Hadoop JARs from hadooplibs/ to the libext/ directory. If using a different version of Hadoop, copy the required Hadoop JARs from such version in the libext/ directory.
If using the ExtJS library copy the ZIP file to the libext/ directory.

根据官方文档在distibution的目录下(/usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1)创建libext,因为装的hadoop版本是1.0.4,所以拷贝$HADOOP_HOME/lib下的所有jar包到libext下,同时拷贝ext-2.2.zip到该目录下。
还要拷贝$HADOOP_HOME下的所有jar包到libext.

运行oozie-setup.sh创建oozie.war
  1. cd /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/bin
  2. ./oozie-setup.sh
复制代码
成功运行后
  1. New Oozie WAR file with added 'ExtJS library, JARs' at /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/oozie-server/webapps/oozie.war  
  2.   
  3. INFO: Oozie is ready to be started  
复制代码
拷贝oozie.war到tomcat部署目录下
  1. root@ubuntu:/usr/local/oozie-3.3.1/webapp/src/main/webapp# cp /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/oozie.war ./  
复制代码
修改配置oozie-site.xml,将false改成true.vi /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/conf/oozie-site.xml

<property>
        <name>oozie.service.JPAService.create.db.schema</name>
        <value>true</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>
创建Oozie DB
  1. cd /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/bin  
  2. ./ooziedb.sh create -sqlfile oozie.sql -run  
复制代码
成功运行后
  1. DONE  
  2. Check DB schema does not exist  
  3. DONE  
  4. Check OOZIE_SYS table does not exist  
  5. DONE  
  6. Create SQL schema  
  7. DONE  
  8. DONE  
  9. Create OOZIE_SYS table  
  10. DONE  
  11. Oozie DB has been created for Oozie version '3.3.1'   
复制代码
运行oozie
  1. cd /usr/local/oozie-3.3.1/distro/target/oozie-3.3.1-distro/oozie-3.3.1/bin  
  2. ./oozie-start.sh  
复制代码
用浏览器访问http://localhost:11000/oozie/就能看到oozie web console.


2.png





来自群组: Hadoop技术组

已有(4)人评论

跳转到指定楼层
pig2 发表于 2014-2-9 20:06:46
安装Hue和Oozie web console遇到的问题:
为了能够管理MapReduce Job和浏览HDFS文件系统,我们需要安装Hue服务,Hue依赖Oozie服务。部署完Hue和Oozie后,发现报错如下,现在给大家介绍一下解决方法。

To enable Oozie web console install the Ext JS library

下载和部署Ext JS
  1. [root@nodeD oozie]# ll /usr/local/src/
  2. total 6644
  3. -rw-r--r-- 1 root root 6800612 Mar  7 09:44 ext-2.2.zip
  4. [root@nodeD oozie]# unzip ext-2.2.zip
  5. [root@nodeD oozie]# cd /var/lib/oozie/
  6. [root@nodeD oozie]# ll
  7. total 4
  8. drwxr-xr-x 5 oozie oozie 4096 Mar  7 09:49 data
  9. [root@nodeD oozie]# mv /usr/local/src/ext-2.2 .
复制代码
The deployment directory of Oozie workflows does not exist. Run “Setup Examples” on the Oozie workflow page.

在Hue界面上,点击Oozie Editor/Dashboard -> Workflow -> Setup Examples安装示例。

问题:
  1. [06/Mar/2013 21:40:33 +0000] hive_site    CRITICAL Cannot understand remote metastore uri "thrift://nodeB:9083,thrift://nodeD:9083"
复制代码
尝试下面的方法有效:
  1. [beeswax]
  2. hive_conf_dir=/etc/hive/conf
复制代码
  1. http://grokbase.com/t/cloudera/hue-user/132mwcgcm3/hive-settings-not-reflected-in-beeswax-ui
  2. if you use CM you can't edit hue.ini as it will be overridden by CM.
  3. If you want Hue to point to another hive-site.xml, you need to add the
  4. property below to the "Hue Server Configuration Safety Valve for
  5. hue_safety_valve_server.ini" property in the "Advanced" menu of the Hue
  6. service.
  7. [beeswax]
  8. # Hive configuration directory, where hive-site.xml is located
  9. hive_conf_dir=/etc/hive/conf
  10. or click on the Beeswax service and insert your Hive properties in "Hive
  11. Configuration Safety Valve", that way
  12. <property>
  13. <name>hive.security.authorization.enabled</name>
  14. <value>true</value>
  15. </property>
复制代码
回复

使用道具 举报

sunshaojie130 发表于 2016-12-12 17:22:05
楼主你好,我的hue做oozie任务时,老是感觉权限不对。必须将相应的目录的权限改成777才能使用,是oozie的问题还是hue的权限问题啊,该怎么改用户的权限啊
回复

使用道具 举报

ljlinux2012 发表于 2017-3-1 15:07:25
学习了谢谢楼主了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条