29/12
2018
问题原因是使用了绿色版本的java;只是设置JAVA_HOME和添加PATH,jd-gui是不认的,读取的注册表;
解决方法:
修复注册表如下(将“D:\work\jre1.7.0”替换为自己的路径):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft]
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment]
"CurrentVersion"="1.7"
"Java7FamilyVersion"="1.7.0"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7]
"JavaHome"="D:/work/jre1.7.0"
"MicroVersion"="0"
"RuntimeLib"="D:/work/jre1.7.0/bin/client/jvm.dll"
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7.0]
"JavaHome"="D:/work/jre1.7.0"
"MicroVersion"="0"
"RuntimeLib"="D:/work/jre1.7.0/bin/client/jvm.dll"
在hive shell或~/.hiverc中使用add jar xxx.jar;命令,如:
hive> add jar /tmp/udf.jar;
整体环境java1.7+hadoop2.7+hive1.2;
hive执行的mr结束后,报以下错误:
Failed with exception Unable to move source hdfs://x1/hive/stagingdir_hive_2018-04-27_10-08-41_073_4546675974966003896-1/-ext-10001 to destination hdfs://x2/hive/warehouse/tag_2018042710068970_1
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
原因:
scratchdir和warehouse在多个权限的目录下;
hdfs://x1/hive/stagingdir 和 hdfs://x2/hive/warehouse ;
解决方法:
将两个目录的权限设置一致;
set hive.exec.scratchdir=hdfs://x2/hive/scratchdir/;
set hive.metastore.warehouse.dir=hdfs://x2/hive/warehouse/;
可将参数加到~/.hiverc中;