关于hive Metadata 使用 MsSQL
下面的页面里说明,
根据说明,Hive SmokeTest 无法通过,一直提示
Logging initialized using configuration in file:/D:/hdp/hive-0.12.0.2.0.6.0-0009
/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/hdp/hadoop-2.2.0.2.0.6.0-0009/share/hadoop
/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/hdp/hive-0.12.0.2.0.6.0-0009/lib/slf4j-log
4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
FAILED: SemanticException [Error 10001]: Table not found hivesmoke
Run-HiveSmokeTest : Hive Smoke Test: FAILED
查下去,发现
这两个服务一直重启。
再排除吧,先从 metastore 开始吧,
这个测试一直失败,怎么回事?查看 Hive-。。。。/scripts\metastore\upgrade 目录下,有 Mysql,Derby , Oracle,….独没有 Mssql , 难道? 不支持,不对啊,再看看Oozie的数据库明明自动创建了表,难道?是Hive配置的问题,
好吧,查看 Hive-Site.xml 的配置文件,找到一配置节。
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:sqlserver://hdp10:1433;database=hive;encrypt=true;trustServerCertificate=true;create=false</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
原来如些,我想那个测试的哥们,肯定是本机上已经有了hive数据库,create就写成了false, 所以,我这里一直没有过,当然,就出错了。
1,保证有个空数据库,
2,把配置节改成,
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:sqlserver://hdp10:1433;database=hive;encrypt=false;trustServerCertificate=true;create=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
Logging initialized using configuration in file:/D:/hdp/hive-0.12.0.2.0.6.0-0009
/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/hdp/hadoop-2.2.0.2.0.6.0-0009/share/hadoop
/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/hdp/hive-0.12.0.2.0.6.0-0009/lib/slf4j-log
4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Authorization failed:java.security.AccessControlException: action WRITE not perm
itted on path hdfs://hdp10:8020/ for user hadoop. Use show grant to get more det
ails.
Run-HiveSmokeTest : Hive Smoke Test: FAILED
所在位置 行:1 字符: 18
+ Run-hiveSmokeTest <<<<
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep
tion
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio
n,Run-HiveSmokeTest
403
这一次又是没有写权限了。。。。
好吧,我Runas administrator 总可以了吧,
是的,是可以了。,
但, runas hadoop user 这个问题还是要解决的。这个问题,一会再说。