raini@biyuzhe:~$ schematool -dbType mysql -initSchema
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found the binding in [the jar: file:/home/raini/app/apache – hive – 2.1.1 – bin/lib/log4j – slf4j – impl – against 2.4.1. Jar!/org/slf4j/impl/StaticLoggerBinder class]
slf4j: Found the binding in [the jar: file:/home/raini/app/hadoop – 2.8.0/share/hadoop/common/lib/slf4j – log4j12-1.7.10. 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.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL: jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true& UseSSL =false
Metastore Connection Driver : com.mysql. JDBC.Driver
Connection User: hive
Starting Metastore schema initialization to 2.1.0
Initialization script hive – schema – 2.1.0. Mysql.
SQL Initialization script completed
org.. Apache hadoop. Hive. Metastore. HiveMetaException: Failed to get the schema version.
physicist cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException : Table ‘hive.VERSION’ doesn’t exist
SQL Error code: 1146
Use –verbose for detailed stacktrace.
*** schemaTool failed ***
problem above, after installing hive 2.1.1, formatting was not successful, and did not find metastore (using mysql, but still fine before upgrade)
reason:
previously used hive 1.2.1, mysql connection metastore use user user is hive, may metadata deletion is not clean or some configuration file cannot be deleted,
solution:
USES another user.
mysql> create user 'hive1'@'%' identified by 'hive1';
mysql> grant all on *.* to 'hive1'@localhost identified by 'hive1';
mysql> flush privileges;
span> and modify: XML hive – site. span> p>
< property>
& lt; name> javax.jdo.option.ConnectionUserName< /name>
& lt; value> hive1< /value>
& lt; /property>
& lt; property>
& lt; name> javax.jdo.option.ConnectionPassword< /name>
& lt; value> hive1< /value>
& lt; /property> span> span> p>
this is the step required for hive2.0.
mysql> The SOURCE/home/raini/app/hive/scripts/metastore/upgrade/mysql/hive – schema – 2.1.0. Mysql. SQL;
start hive to fix ~
question 2:
hive (default)> create database anserchapp;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: java.io.IOException Failed on local exception: java.io.IOException: Couldn’t set up IO streams; Host Details: Local Host is: “biyuzhe/127.0.1.1”; destination host is: “user”:8020; )
Settings:
mysql> ALTER DATABASE hive character set latin1;
Query OK, 1 row affected (0.00 SEC)
error:
hive (default)> create database anserchapp;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.lang.IllegalArgumentException: java.net.UnknownHostException: user)
Read More:
- Hive: How to Solve dearby database initialization error
- Failed: execution error, return code 1 from org.apache.hadoop . hive.ql.exec .DDLTask…
- FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(me
- The problem of error reporting in Ranger connection hive is solved
- Execution error, return code 1 from org.apache.hadoop . hive.ql.exec .DDLTask.
- When executing hive – f script com.mysql.jdbc . exceptions.jdbc4 .CommunicationsException: Communications link failure
- Error reporting when importing sqoop from Mysql to hive
- Java connection zookeeper high availability hive error
- The difference between hive and relational database
- hive is not allowed to impersonate anonymous
- org.apache.hadoop.hive.ql.exec.spark.SparkTask. Failed to create Spark client for Spark session 0354
- [Solved] hiveonspark:Execution Error, return code 30041 from org.apache.hadoop.hive.ql.exec.spark.SparkTask
- Run spark to report error while identifying ‘ org.apache.spark . sql.hive.HiveSessionState ‘
- Error while instantiating ‘org.apache.spark.sql.hive.HiveExternalCatalog’:
- Spoop export hive to MySQL
- The Spring problem Failed to read Schema Document
- Beeline connection hive2 reports an error permission denied
- Hive view execution plan
- Hive SQL syntax error and corresponding solutions
- Exception on start hive: caused by: java.net.noroutetohostexception: no route to host