首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法在oozie中运行hive from shell action,有人能帮我解决这个问题吗?

无法在oozie中运行hive from shell action,有人能帮我解决这个问题吗?
EN

Stack Overflow用户
提问于 2018-05-03 20:52:26
回答 1查看 89关注 0票数 0

这是我的工作流和错误日志。shell文件内容:

代码语言:javascript
运行
复制
#!/bin/bash
echo
echo
echo "testing"
echo

export HIVE_CONF_DIR=
echo "hive job got started"
cd /opt/mapr/hive/hive-2.1/bin
echo /cygdrive/c/Projects/JLR/embedded_software/main_unit/arm
hive -e "use ozzie_test; create table if not exists test_edh1(name string, id int);"
result=0
if [  -ne 0 ]; then
  echo "Hive error number is: "
  exit 1
else
  echo "hive job got completed successfully"
fi

错误消息:

代码语言:javascript
运行
复制
getting the errorcode  as 127 
Hive error number is: 127

./testScript.sh: line 11: cd: /opt/mapr/hive/hive-2.1/bin: No such file or directory
./testScript.sh: line 13: **hive: command not found**
EN

回答 1

Stack Overflow用户

发布于 2018-05-03 23:08:42

这个'/opt/mapr/hive/hive-2.1/bin‘是hdfs路径吗?如果是,您正试图在hdfs路径上使用'cd‘命令,而shell在本地目录中检查该路径,因此出现错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50155581

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档