`
fighting_2013
  • 浏览: 14788 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

Oozie运行Hive

阅读更多
1.运行Hive需要用到hive-site.xml文件以及对应版本的hive的jar包,于是将hive-site.xml文件和当前所用hive版本下相关的jar包上传到HDFS上面。
2.修改examples/apps/hive/workflow.xml文件,主要添加对hive-site.xml配置的支持
<job-xml>${hiveSitePath}</job-xml>
其中需要注意事项:job-xml顺序
<xs:sequence>
    <xs:element name="job-tracker" type="xs:string" minOccurs="1" maxOccurs="1"/>
    <xs:element name="name-node" type="xs:string" minOccurs="1" maxOccurs="1"/>
    <xs:element name="prepare" type="hive:PREPARE" minOccurs="0" maxOccurs="1"/>
    <xs:element name="job-xml" type="xs:string" minOccurs="0" maxOccurs="1"/>
    <xs:element name="configuration" type="hive:CONFIGURATION" minOccurs="0" maxOccurs="1"/>
    <xs:element name="script" type="xs:string" minOccurs="1" maxOccurs="1"/>
    <xs:element name="param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="file" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="archive" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
3.修改examples/apps/hive/job.properties文件,在文件中添加相关位置的配置
hiveSitePath=${nameNode}/user/${user.name}/hive/hive-site.xml
oozie.libpath=${nameNode}/user/${user.name}/share/lib/hive
4.执行命令
bin/oozie job -config ../examples/apps/hive/job.properties -run

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics