下载地址: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;)V2、原因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 "2、产生的问题" 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 ***
1 不是在atguigu账户
3、使用我手打 hive.size.xml2最重要的还是 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
在这里整理一下大家遇到的问题



