栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

大数据之Hive 完整使用 (搭建过程遇到的问题)

大数据之Hive 完整使用 (搭建过程遇到的问题)

一、没有mysql包

下载地址:mysql安装包

二、没有Hive文档

下载地址:hive word

三、hive初始化报错(ZLjava/lang/String;Ljava/lang/Object) 1、ZLjava/lang/String;Ljava/lang/Object
【bigdata@master hive】$ bin/schematool -dbType derby -initSchema
Exception in thread main java.lang.NoSuchMethodError: com.google.common.base.
Preconditions.checkArgument(ZLjava/lang/String;Ljava/lang/Object;)V

2、原因hadoop和hive的两个guava.jar版本不一致

删除低版本的那个,将高版本的复制到低版本目录下

【bigdata@master hive】$ mv /opt/module/hive-3.1.2/lib/guava-19.0.jar /opt/module/hive-3.1.2/lib/guava-19.0.bak
【bigdata@master hive】$ cp /opt/module/hadoop-3.1.3/share/hadoop/common/lib/guava-27.0-jre.jar /opt/module/hive-3.1.2/lib/guava-27.0-jre.jar
四、修改Hive默认的数据库报的错 1、错误提示

一直默认的还是 jdbc:derby、没有走自己的配置的mysql

metastore connection URL:	 jdbc:derby:;databaseName=metastore_db;create=true
metastore Connection Driver :	 org.apache.derby.jdbc.EmbeddedDriver
metastore connection User:	 APP
Starting metastore schema initialization to 3.1.0
Initialization script hive-schema-3.1.0.mysql.sql
Connecting to jdbc:derby:;databaseName=metastore_db;create=true
Connected to: Apache Derby (version 10.14.1.0 - (1808820))
Driver: Apache Derby Embedded JDBC Driver (version 10.14.1.0 - (1808820))
Transaction isolation: TRANSACTION_READ_COMMITTED
0: jdbc:derby:> !autocommit on
Autocommit status: true
0: jdbc:derby:> 
Error: Syntax error: Encountered "" at line 1, column 64. (state=42X01,code=30000)
Closing: 0: jdbc:derby:;databaseName=metastore_db;create=true
org.apache.hadoop.hive.metastore.HivemetaException: Schema initialization FAILED! metastore state would be inconsistent !!
Underlying cause: java.io.IOException : Schema script failed, errorcode 2
org.apache.hadoop.hive.metastore.HivemetaException: Schema initialization FAILED! metastore state would be inconsistent !!
	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:594)
	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:567)
	at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1517)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Caused by: java.io.IOException: Schema script failed, errorcode 2
	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:1226)
	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:1204)
	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:590)
	... 8 more
*** schemaTool failed ***
2、产生的问题

1 不是在atguigu账户

2最重要的还是 hive.size.xml (粘贴复制得分问题)

3、使用我手打 hive.size.xml



    
    
        javax.jdo.option.ConnectionURL
        jdbc:mysql://hadoop102:3306/metastore?useSSL=false
    
    
    
        javax.jdo.option.ConnectionDriverName
        com.mysql.jdbc.Driver
    
    
    
        javax.jdo.option.ConnectionUserName
        root
    
    
    
        javax.jdo.option.ConnectionPassword
        000000
    
    
    
        hive.metastore.schema.verification
        false
    
    
    
        hive.metastore.event.db.notification.api.auth
        false
    
    
    
        hive.metastore.warehouse.dir
        /user/hive/warehouse
    
	


五、任何问题可以留下评论

在这里整理一下大家遇到的问题

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/389548.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号