(三)oozie官方案例map-reduce运行
2015-12-24 15:05
411 查看
oozie安装成功后,接下来运行一个官方的mapreduce案例,参考官网:
http://archive.cloudera.com/cdh5/cdh/5/oozie-4.0.0-cdh5.3.6/DG_Examples.html
examples下的子目录解析:
xusy—HDFS的用户名
命令:
主要配置namenode、jobTracker;
其他的可以用默认!
nameNode:HDFS+namenode的端口号;
jobTracker:主机名+resourcemanager的端口号;
如果运行错误,请查看oozie.log日志
错误1:
原因:
解决方法:
将hadoop的ect下的配置文件关联上oozie,配置如下:
错误2:
解决方法:
停止hadoop进程,重启linux主机,然后启动hadoop进程!
url:xuxudede.com:11000
运行成功:
OK!mapreduce案例已经成功运行!
经验总结:不要怕遇到问题,要知道,每解决一个问题,你都会收获很多!
http://archive.cloudera.com/cdh5/cdh/5/oozie-4.0.0-cdh5.3.6/DG_Examples.html
1、解压oozie-example到oozie根目录
Expanding this file will create an examples/ directory in the local file systemexamples下的子目录解析:
apps:所有自带的oozie案例,有mapreduce、hive、sqoop等等 input-data:案例存放的测试数据 src:案例源码
2、将exmples上传到HDFS的跟目录下
hdfs的根目录,即/uer/xusyxusy—HDFS的用户名
命令:
$dfs -put examples examples
3、workflow解析
workflow.xml----->必须在hdfs上 start ... action ... end job.properties:属性信息 --->必须在本地-->需要根据实际配置 lib:依赖包---->必须在本地
4、配置job.properties
nameNode=hdfs://xuxudede.com:9000 jobTracker=xuxudede.com:8032 queueName=default examplesRoot=examples oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}/apps/map-reduce/workflow.xml outputDir=map-reduce
主要配置namenode、jobTracker;
其他的可以用默认!
nameNode:HDFS+namenode的端口号;
jobTracker:主机名+resourcemanager的端口号;
5、运行
$ oozie job -oozie http://xuxudede.com:11000/oozie -config examples/apps/map-reduce/job.properties -run
如果运行错误,请查看oozie.log日志
错误1:
2015-12-13 00:22:36,449 WARN ActionStartXCommand:544 - SERVER[xuxudede.com] USER[xusy] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-1512130005 34005-oozie-xus-W] ACTION[0000000-151213000534005-oozie-beif-W@mr-node] Error star ting action [mr-node]. ErrorType [FAILED], ErrorCode [It should never happen], Mess age [File /user/xusy/share/lib does not exist] org.apache.oozie.action.ActionExecutorException: File /user/xusy/share/lib does not exist at org.apache.oozie.action.hadoop.JavaActionExecutor.addSystemShareLibForAc tion(JavaActionExecutor.java:631) at org.apache.oozie.action.hadoop.JavaActionExecutor.addAllShareLibs(JavaAc tionExecutor.java:709)
原因:
没有读取HDFS上的文件,读取的是本地文件系统上的
解决方法:
将hadoop的ect下的配置文件关联上oozie,配置如下:
<property> <name>oozie.service.HadoopAccessorService.hadoop.configurations</name> <value>*=/home/xusy/share/cdh5.3.6/hadoop-2.5.0-cdh5.3.6/etc/hadoop</value> <description> Comma separated AUTHORITY=HADOOP_CONF_DIR, where AUTHORITY is the HOST:PORT of the Hadoop service (JobTracker, HDFS). The wildcard '*' configuration is used when there is no exact match for an authority. The HADOOP_CONF_DIR contains the relevant Hadoop *-site.xml files. If the path is relative is looked within the Oozie configuration directory; though the path can be absolute (i.e. to point to Hadoop client conf/ directories in the local filesystem. </description> </property>
错误2:
2015-12-13 00:28:30,846 WARN ActionStartXCommand:544 - SERVER[xuxudede.com] USER[xusy] GROUP[-] TOKEN[] APP[map-reduce-wf] JOB[0000000-151213002745581-oozie-beif-W] ACTION[0000000-151213002745581-oozie-xus-W@mr-node] Error starting action [mr-node]. ErrorType [NON_TRANSIENT], ErrorCode [JA002], Message [JA002: User: xusy is not allowed to impersonate xusy] org.apache.oozie.action.ActionExecutorException: JA002: User: xusy is not allowed to impersonate xusy
解决方法:
停止hadoop进程,重启linux主机,然后启动hadoop进程!
6.web上显示
正在运行:url:xuxudede.com:11000
运行成功:
OK!mapreduce案例已经成功运行!
经验总结:不要怕遇到问题,要知道,每解决一个问题,你都会收获很多!
相关文章推荐
- (转)SqlServer2008开启客户端远程连接
- hdu 4063 Aircraft 计算几何+最短路
- BWA manual reference page
- uCgui和emWin的区别
- 远程共享文件夹
- linux常用命令
- Python之抓取动态网页
- 一半以上iOS面试者都无法准确答上的问题
- lightoj 1085 - All Possible Increasing Subsequences 【树状数组优化dp】
- webView绕过信任证书访问https
- snprintf和sprintf区别分析
- iOS正则表达式详解
- iOS中NSCoding协议
- js模块化开发
- ASCII与Unicode编码消息写文件浅析
- Error in library(qcc) : there is no package called 'qcc'
- html5 - 地图
- Dialog仿iphone风格
- 动态规划之求最长公共子序列
- ThreadPoolExecutor