oozie 运行demo
昨晚装好了oozie,能启动了,并且配置了mysql作为数据库,好了,今天要执行oozie自带的demo了,好家伙,一执行就报错!报错很多,就不一一列举了,就说我最后解决的方法吧。
oozie job -oozie http://localhost:11000/oozie -config examples/apps/map-reduce/job.properties –run
这句话需要在oozie的目录里面执行,然后在网上查了很多资料,最后搞定了,需要修改三个配置文件。
在说修改配置文件之前,还漏了一些东西,先补上,首先我们需要解压目录下面的oozie-examples.tar.gz,oozie-client-3.3.2.tar.gz,
oozie-sharelib-3.3.2.tar.gz,然后把examples和share目录上传到fs上面去。
hadoop fs -put examples examples
hadoop fs -put share share
然后在/etc/profile配置oozie-client的环境变量。
接下来说怎么解决的oozie的吧。
1.修改oozie的conf目录下的oozie-site.xml
增加以下内容:
<property> <name>oozie.services</name> <value> org.apache.oozie.service.SchedulerService, org.apache.oozie.service.InstrumentationService, org.apache.oozie.service.CallableQueueService, org.apache.oozie.service.UUIDService, org.apache.oozie.service.ELService, org.apache.oozie.service.AuthorizationService, org.apache.oozie.service.MemoryLocksService, org.apache.oozie.service.DagXLogInfoService, org.apache.oozie.service.SchemaService, org.apache.oozie.service.LiteWorkflowAppService, org.apache.oozie.service.JPAService, org.apache.oozie.service.StoreService, org.apache.oozie.service.CoordinatorStoreService, org.apache.oozie.service.SLAStoreService, org.apache.oozie.service.DBLiteWorkflowStoreService, org.apache.oozie.service.CallbackService, org.apache.oozie.service.ActionService, org.apache.oozie.service.ActionCheckerService, org.apache.oozie.service.RecoveryService, org.apache.oozie.service.PurgeService, org.apache.oozie.service.CoordinatorEngineService, org.apache.oozie.service.BundleEngineService, org.apache.oozie.service.DagEngineService, org.apache.oozie.service.CoordMaterializeTriggerService, org.apache.oozie.service.StatusTransitService, org.apache.oozie.service.PauseTransitService, org.apache.oozie.service.HadoopAccessorService </value> <description> All services to be created and managed by Oozie Services singleton. Class names must be separated by commas. </description> </property> <property> <name>oozie.service.ProxyUserService.proxyuser.cenyuhai.hosts</name> <value>*</value> <description> List of hosts the '#USER#' user is allowed to perform 'doAs' operations. The '#USER#' must be replaced with the username o the user who is allowed to perform 'doAs' operations. The value can be the '*' wildcard or a list of hostnames. For multiple users copy this property and replace the user name in the property name. </description> </property> <property> <name>oozie.service.ProxyUserService.proxyuser.cenyuhai.groups</name> <value>*</value> <description> List of groups the '#USER#' user is allowed to impersonate users from to perform 'doAs' operations. The '#USER#' must be replaced with the username o the user who is allowed to perform 'doAs' operations. The value can be the '*' wildcard or a list of groups. For multiple users copy this property and replace the user name in the property name. </description> </property>2.修改oozie-env.sh,增加以下内容
export OOZIE_CONF=${OOZIE_HOME}/conf export OOZIE_DATA=${OOZIE_HOME}/data export OOZIE_LOG=${OOZIE_HOME}/logs export CATALINA_BASE=${OOZIE_HOME}/oozie-server export CATALINA_TMPDIR=${OOZIE_HOME}/oozie-server/temp export CATALINA_OUT=${OOZIE_LOG}/catalina.out3.修改所有节点的hadoop的配置文件core-site.xml,
<property> <name>hadoop.proxyuser.cenyuhai.hosts</name> <value>hadoop.Master</value> </property> <property> <name>hadoop.proxyuser.cenyuhai.groups</name> <value>cenyuhai</value> </property>然后重启就可以执行了,里面的cenyuhai是我的本机账号。
补充:在进行完上述配置之后,作业可以提交了,但是提交了MR作业之后,在web页面中查看,遇到了一个错误:
JA006: Call to localhost/127.0.0.1:9001 failed on connection exception: java.net.ConnectException: Connection refused
这个问题排查了很久,都没有得到解决 ,最后通过修改job.properties,把jobTracker从localhost:9001改成下面的全称才行,这个可能跟我的hadoop的
jobTracker设置有关,所以遇到有这方面问题的童鞋可以试试。
nameNode=hdfs://192.168.1.133:9000
jobTracker=http://192.168.1.133:9001接下来我们接着运行hive的demo,运行之前记得修改hive的demo的job.properties,改为上面写的那样。
然后提交,提交成功了,但是在web页面上查看状态为KILLED,被干掉了。。。
错误代码:JA018,错误消息:org/apache/hadoop/hive/cli/CliDriver
然后我就想着可能是jar包的问题,删掉share目录下的hive目录里的所有jar包,然后把自己机器上的hive的所有jar包复制到该目录下。
然后上传到共享目录上:
hadoop fs -put share share
再次提交,就可以查看到成功的状态啦!
oozie job -oozie http://localhost:11000/oozie -config examples/apps/hive/job.properties -run
但是这个坑爹的玩意儿,其实是把数据插入到了Derby中。。。无语了,虽然现实成功了,但是没有用。。。因为我们配置了外置的mysql数据库,那怎么办呢?
需要修改workflow.xml,把其中的configuration的配置节改成下面的样子。
<configuration> <property> <name>mapred.job.queue.name</name> <value>${queueName}</value> </property> <property> <name>hive.metastore.local</name> <value>true</value> </property> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://192.168.1.133:3306/hive?createDatabaseIfNotExist=true</value> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.jdbc.Driver</value> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>hive</value> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>mysql</value> </property> <property> <name>hive.metastore.warehouse.dir</name> <value>/user/hive/warehouse</value> </property> </configuration>然后提交之后,在hive中就可以查询到你所建立的表啦,oh,yeah!
oozie 运行demo的更多相关文章
- JSBinding + SharpKit / 初体验:下载代码及运行Demo
QQ群:189738580 以下是群主维护的JSB版本: git地址:https://github.com/qcwgithub/qjsbunitynew.git插件源码地址(不包含SpiderMonk ...
- dubbox下载编译运行demo
最近公司要搞微服务改造,拿了一个小项目开刀,找来找去,还是偏向当当的dubbox作为分布式服务框架.这里介绍下怎么一条龙跑起一个demo. 1.下载代码 因为代码放在github上,所以我们直接用Ec ...
- xcode运行demo报错:Failed to create provisioning profile.cannot be registered to your development team
问题:网上下载运行demo,出现Failed to create provisioning profile.cannot be registered to your development team此 ...
- Windows10 Faster R-CNN(GPU版) 运行 Demo
上篇文章介绍了 TensorFlow 环境的搭建,这篇介绍 demo 运行 参考链接 参考链接2 1. 下载 TensorFlow object detection API 相关文件 点击跳转下载文件 ...
- RN 环境搭建 运行demo App
1.环境搭建 1.1 JDK 1.2Android JDK 需要安装c++环境(我选择安装android studio) 1.3Node npm config set registry https: ...
- DuiLib学习笔记1——编译运行demo
c++中皮肤问题比较麻烦,MFC自带的太难用.DirectUI界面库就比较强大了,之前像skin++之类的基于DirectUI收费昂贵.DuiLib是基于DirectUI的界面库,可以将用户界面和处理 ...
- VUE环境配置——运行Demo
如果有Vue的Demo 不知道怎么运行的同学可以看这里 这里只讲Win下面环境配置 一.NodeJs安装 1.下载Windows 安装包(.msi),并安装https://nodejs.org/d ...
- conda pip 安装 dgl 并运行demo 出现:Segmentation fault (core dumped) 错误
安装dgl 并运行的时候,出现了如上错误,很是郁闷:使用 gdb python; run train.py 进行调试,发现是torch的问题:我猜测估计是torch 安装的版本过于新:于是重新安装 1 ...
- 用IIS进行部署,发布网页,运行DEMO
因项目需要,正在学习如何部署IIS服务,并发布网站,发布以后,运行网页,具体步骤如下: 一.IIS的部署 在进行部署前,需要将一些必要的配置选好,如图: 打开选项,进行设置,将箭头部分进行勾选 在wi ...
随机推荐
- Redis复制与可扩展集群搭建【转】
本文会讨论一下Redis的复制功能以及Redis复制机制本身的优缺点以及集群搭建问题. Redis复制流程概述 Redis的复制功能是完全建立在之前我们讨论过的基于内存快照的持久化策略基础上的,也就是 ...
- “TableDetails”中列“IsPrimaryKey”的值为DBNull. Mysql EntityFramework
Entity Framework连接MySQL时 ...
- 定期删除elasticsearch 的index 索引
#!/bin/bashfind /data/elasticsearch/data/pro-kz-log/nodes/0/indices/ -type d -mtime +7 | awk -F" ...
- Windows平台JDK安装
原文链接:http://android.eoe.cn/topic/android_sdk 下载Java的开发包JDK JDK有好几个类型版本,我们只需要选择Java SE类型的版本就行了.进入网页:h ...
- Android Studio 1.1.0版本以上 优化编译
本文不写内容,只是借用别人链接.不过大概内容都如下链接: http://blog.csdn.net/hyr83960944/article/details/38388429 http://bbs.it ...
- IOS之Accessor method
1 前言 本章主要介绍了Objective-C中的存取方法的相关概念. 2 详述 存储方法是一个可以获得或者设置一个对象的属性值的实例方法.在Cocoa的术语中,一个检索对象属性值的方法提及为gett ...
- 菜鸟学数据库(五)——MySQL必备命令
今天跟大家分享一下MySQL从连接到具体操作的一系列常用命令.可能有的人觉得现在有很多可视化的工具,没必要再学习那些具体的命令了,但是我不这么认为,不可否认那些工具的确让我们的工作更加方便快捷,但是如 ...
- bat批处理延迟运行脚本
@echo off:aaapause 这里是你需要运行的程序for /l %%i in (0,1,10000) do echo %%i>nulgoto aaa 当然bat延迟运行还有其他的一些方 ...
- C++技术沙龙报名开始啦!
沙龙主题:C++甜点关键字:C++之美,黑科技,神奇和魔力内容:三场主题演讲和一场开放性话题讨论时间:2015年5月16日下午2:00-6:00地点:珠海金山办公软件1楼VIP厅,珠海市吉大景山路莲山 ...
- iOS开发-应用管理
// // ViewController.m // 21-应用管理-1 // // Created by hongqiangli on 2017/8/2. // Copyright © 201 ...