Support Questions

Find answers, ask questions, and share your expertise

Hive Metastore Start

avatar
Contributor

stderr: /var/lib/ambari-agent/data/errors-617.txt

Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 260, in <module>
    HiveMetastore().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 314, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 60, in start
    create_metastore_schema()
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py", line 371, in create_metastore_schema
    user = params.hive_user
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 262, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 303, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-server2-hive2/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED] -verbose' returned 1. SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.1.0-129/hive2/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.6.1.0-129/hadoop/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://ip-10-0-1-45.ec2.internal/hive?createDatabaseIfNotExist=true
Metastore Connection Driver :	 com.mysql.jdbc.Driver
Metastore connection User:	 hive
Starting metastore schema initialization to 2.1.1000
Initialization script hive-schema-2.1.1000.mysql.sql
Connecting to jdbc:mysql://ip-10-0-1-45.ec2.internal/hive?createDatabaseIfNotExist=true
Connected to: MySQL (version 5.6.36)
Driver: MySQL Connector Java (version mysql-connector-java-5.1.25-SNAPSHOT ( Revision: ${bzr.revision-id} ))
Transaction isolation: TRANSACTION_READ_COMMITTED
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> !autocommit on
Autocommit status: true
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @OLD_CHARACTER_SET_C 
LIENT=@@CHARACTER_SET_CLIENT */
No rows affected (0.021 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @OLD_CHARACTER_SET_R 
ESULTS=@@CHARACTER_SET_RESULTS */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @OLD_COLLATION_CONNE 
CTION=@@COLLATION_CONNECTION */
No rows affected (0.013 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET NAMES utf8 */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40103 SET @OLD_TIME_ZONE=@@TIM 
E_ZONE */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40103 SET TIME_ZONE='+00:00' * 
/
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40014 SET @OLD_UNIQUE_CHECKS=@ 
@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40014 SET @OLD_FOREIGN_KEY_CHE 
CKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @OLD_SQL_MODE=@@SQL_ 
MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40111 SET @OLD_SQL_NOTES=@@SQL 
_NOTES, SQL_NOTES=0 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `BUCKE 
TING_COLS` ( `SD_ID` bigint(20) NOT NULL, `BUCKET_COL_NAME` varchar(256) CHARACT 
ER SET latin1 COLLATE latin1_bin DEFAULT NULL, `INTEGER_IDX` int(11) NOT NULL, P 
RIMARY KEY (`SD_ID`,`INTEGER_IDX`), KEY `BUCKETING_COLS_N49` (`SD_ID`), CONSTRAI 
NT `BUCKETING_COLS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`) ) ENGIN 
E=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.008 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.008 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `CDS`  
( `CD_ID` bigint(20) NOT NULL, PRIMARY KEY (`CD_ID`) ) ENGINE=InnoDB DEFAULT CHA 
RSET=latin1
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `COLUM 
NS_V2` ( `CD_ID` bigint(20) NOT NULL, `COMMENT` varchar(256) CHARACTER SET latin 
1 COLLATE latin1_bin DEFAULT NULL, `COLUMN_NAME` varchar(767) CHARACTER SET lati 
n1 COLLATE latin1_bin NOT NULL, `TYPE_NAME` varchar(4000) DEFAULT NULL, `INTEGER 
_IDX` int(11) NOT NULL, PRIMARY KEY (`CD_ID`,`COLUMN_NAME`), KEY `COLUMNS_V2_N49 
` (`CD_ID`), CONSTRAINT `COLUMNS_V2_FK1` FOREIGN KEY (`CD_ID`) REFERENCES `CDS`  
(`CD_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `DATAB 
ASE_PARAMS` ( `DB_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(180) CHARACTER SE 
T latin1 COLLATE latin1_bin NOT NULL, `PARAM_VALUE` varchar(4000) CHARACTER SET  
latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`DB_ID`,`PARAM_KEY`), KEY ` 
DATABASE_PARAMS_N49` (`DB_ID`), CONSTRAINT `DATABASE_PARAMS_FK1` FOREIGN KEY (`D 
B_ID`) REFERENCES `DBS` (`DB_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.004 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `DBS`  
( `DB_ID` bigint(20) NOT NULL, `DESC` varchar(4000) CHARACTER SET latin1 COLLATE 
 latin1_bin DEFAULT NULL, `DB_LOCATION_URI` varchar(4000) CHARACTER SET latin1 C 
OLLATE latin1_bin NOT NULL, `NAME` varchar(128) CHARACTER SET latin1 COLLATE lat 
in1_bin DEFAULT NULL, `OWNER_NAME` varchar(128) CHARACTER SET latin1 COLLATE lat 
in1_bin DEFAULT NULL, `OWNER_TYPE` varchar(10) CHARACTER SET latin1 COLLATE lati 
n1_bin DEFAULT NULL, PRIMARY KEY (`DB_ID`), UNIQUE KEY `UNIQUE_DATABASE` (`NAME` 
) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `DB_PR 
IVS` ( `DB_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `DB_ID 
` bigint(20) DEFAULT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varcha 
r(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varc 
har(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_NAME`  
varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_TY 
PE` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `DB_PRIV` 
 varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY  
(`DB_GRANT_ID`), UNIQUE KEY `DBPRIVILEGEINDEX` (`DB_ID`,`PRINCIPAL_NAME`,`PRINCI 
PAL_TYPE`,`DB_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), KEY `DB_PRIVS_N49` (`DB_ID`), CON 
STRAINT `DB_PRIVS_FK1` FOREIGN KEY (`DB_ID`) REFERENCES `DBS` (`DB_ID`) ) ENGINE 
=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `GLOBA 
L_PRIVS` ( `USER_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL,  
`GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) CHARACTER SET latin1 
 COLLATE latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varchar(128) CHARACTER SET lati 
n1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_NAME` varchar(128) CHARACTER SET  
latin1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_TYPE` varchar(128) CHARACTER  
SET latin1 COLLATE latin1_bin DEFAULT NULL, `USER_PRIV` varchar(128) CHARACTER S 
ET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`USER_GRANT_ID`), UNIQUE 
 KEY `GLOBALPRIVILEGEINDEX` (`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`USER_PRIV`,`GRAN 
TOR`,`GRANTOR_TYPE`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.006 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `IDXS` 
 ( `INDEX_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `DEFERRED_REB 
UILD` bit(1) NOT NULL, `INDEX_HANDLER_CLASS` varchar(4000) CHARACTER SET latin1  
COLLATE latin1_bin DEFAULT NULL, `INDEX_NAME` varchar(128) CHARACTER SET latin1  
COLLATE latin1_bin DEFAULT NULL, `INDEX_TBL_ID` bigint(20) DEFAULT NULL, `LAST_A 
CCESS_TIME` int(11) NOT NULL, `ORIG_TBL_ID` bigint(20) DEFAULT NULL, `SD_ID` big 
int(20) DEFAULT NULL, PRIMARY KEY (`INDEX_ID`), UNIQUE KEY `UNIQUEINDEX` (`INDEX 
_NAME`,`ORIG_TBL_ID`), KEY `IDXS_N51` (`SD_ID`), KEY `IDXS_N50` (`INDEX_TBL_ID`) 
, KEY `IDXS_N49` (`ORIG_TBL_ID`), CONSTRAINT `IDXS_FK1` FOREIGN KEY (`ORIG_TBL_I 
D`) REFERENCES `TBLS` (`TBL_ID`), CONSTRAINT `IDXS_FK2` FOREIGN KEY (`SD_ID`) RE 
FERENCES `SDS` (`SD_ID`), CONSTRAINT `IDXS_FK3` FOREIGN KEY (`INDEX_TBL_ID`) REF 
ERENCES `TBLS` (`TBL_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `INDEX 
_PARAMS` ( `INDEX_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(256) CHARACTER SE 
T latin1 COLLATE latin1_bin NOT NULL, `PARAM_VALUE` varchar(4000) CHARACTER SET  
latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`INDEX_ID`,`PARAM_KEY`), KE 
Y `INDEX_PARAMS_N49` (`INDEX_ID`), CONSTRAINT `INDEX_PARAMS_FK1` FOREIGN KEY (`I 
NDEX_ID`) REFERENCES `IDXS` (`INDEX_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `NUCLE 
US_TABLES` ( `CLASS_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin N 
OT NULL, `TABLE_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT N 
ULL, `TYPE` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, `OWNER` 
 varchar(2) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, `VERSION` varchar( 
20) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL, `INTERFACE_NAME` varchar(2 
55) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`CLASS_NA 
ME`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PARTI 
TIONS` ( `PART_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `LAST_AC 
CESS_TIME` int(11) NOT NULL, `PART_NAME` varchar(767) CHARACTER SET latin1 COLLA 
TE latin1_bin DEFAULT NULL, `SD_ID` bigint(20) DEFAULT NULL, `TBL_ID` bigint(20) 
 DEFAULT NULL, PRIMARY KEY (`PART_ID`), UNIQUE KEY `UNIQUEPARTITION` (`PART_NAME 
`,`TBL_ID`), KEY `PARTITIONS_N49` (`TBL_ID`), KEY `PARTITIONS_N50` (`SD_ID`), CO 
NSTRAINT `PARTITIONS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`), C 
ONSTRAINT `PARTITIONS_FK2` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`) ) EN 
GINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PARTI 
TION_EVENTS` ( `PART_NAME_ID` bigint(20) NOT NULL, `DB_NAME` varchar(128) CHARAC 
TER SET latin1 COLLATE latin1_bin DEFAULT NULL, `EVENT_TIME` bigint(20) NOT NULL 
, `EVENT_TYPE` int(11) NOT NULL, `PARTITION_NAME` varchar(767) CHARACTER SET lat 
in1 COLLATE latin1_bin DEFAULT NULL, `TBL_NAME` varchar(128) CHARACTER SET latin 
1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`PART_NAME_ID`), KEY `PARTITIONE 
VENTINDEX` (`PARTITION_NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.01 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.006 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PARTI 
TION_KEYS` ( `TBL_ID` bigint(20) NOT NULL, `PKEY_COMMENT` varchar(4000) CHARACTE 
R SET latin1 COLLATE latin1_bin DEFAULT NULL, `PKEY_NAME` varchar(128) CHARACTER 
 SET latin1 COLLATE latin1_bin NOT NULL, `PKEY_TYPE` varchar(767) CHARACTER SET  
latin1 COLLATE latin1_bin NOT NULL, `INTEGER_IDX` int(11) NOT NULL, PRIMARY KEY  
(`TBL_ID`,`PKEY_NAME`), KEY `PARTITION_KEYS_N49` (`TBL_ID`), CONSTRAINT `PARTITI 
ON_KEYS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`) ) ENGINE=InnoDB 
 DEFAULT CHARSET=latin1
No rows affected (0.004 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PARTI 
TION_KEY_VALS` ( `PART_ID` bigint(20) NOT NULL, `PART_KEY_VAL` varchar(256) CHAR 
ACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `INTEGER_IDX` int(11) NOT NULL 
, PRIMARY KEY (`PART_ID`,`INTEGER_IDX`), KEY `PARTITION_KEY_VALS_N49` (`PART_ID` 
), CONSTRAINT `PARTITION_KEY_VALS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTI 
TIONS` (`PART_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PARTI 
TION_PARAMS` ( `PART_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(256) CHARACTER 
 SET latin1 COLLATE latin1_bin NOT NULL, `PARAM_VALUE` varchar(4000) CHARACTER S 
ET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`PART_ID`,`PARAM_KEY`),  
KEY `PARTITION_PARAMS_N49` (`PART_ID`), CONSTRAINT `PARTITION_PARAMS_FK1` FOREIG 
N KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`) ) ENGINE=InnoDB DEFAULT CH 
ARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PART_ 
COL_PRIVS` ( `PART_COLUMN_GRANT_ID` bigint(20) NOT NULL, `COLUMN_NAME` varchar(1 
000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `CREATE_TIME` int(11) 
 NOT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) CHARACTER 
 SET latin1 COLLATE latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varchar(128) CHARACT 
ER SET latin1 COLLATE latin1_bin DEFAULT NULL, `PART_ID` bigint(20) DEFAULT NULL 
, `PRINCIPAL_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT  
NULL, `PRINCIPAL_TYPE` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFA 
ULT NULL, `PART_COL_PRIV` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin D 
EFAULT NULL, PRIMARY KEY (`PART_COLUMN_GRANT_ID`), KEY `PART_COL_PRIVS_N49` (`PA 
RT_ID`), KEY `PARTITIONCOLUMNPRIVILEGEINDEX` (`PART_ID`,`COLUMN_NAME`,`PRINCIPAL 
_NAME`,`PRINCIPAL_TYPE`,`PART_COL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), CONSTRAINT `P 
ART_COL_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITIONS` (`PART_ID`) ) 
 ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PART_ 
PRIVS` ( `PART_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `G 
RANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) CHARACTER SET latin1 C 
OLLATE latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varchar(128) CHARACTER SET latin1 
 COLLATE latin1_bin DEFAULT NULL, `PART_ID` bigint(20) DEFAULT NULL, `PRINCIPAL_ 
NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `PRINCI 
PAL_TYPE` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `PA 
RT_PRIV` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIM 
ARY KEY (`PART_GRANT_ID`), KEY `PARTPRIVILEGEINDEX` (`PART_ID`,`PRINCIPAL_NAME`, 
`PRINCIPAL_TYPE`,`PART_PRIV`,`GRANTOR`,`GRANTOR_TYPE`), KEY `PART_PRIVS_N49` (`P 
ART_ID`), CONSTRAINT `PART_PRIVS_FK1` FOREIGN KEY (`PART_ID`) REFERENCES `PARTIT 
IONS` (`PART_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `ROLES 
` ( `ROLE_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `OWNER_NAME`  
varchar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `ROLE_NAME` v 
archar(128) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (` 
ROLE_ID`), UNIQUE KEY `ROLEENTITYINDEX` (`ROLE_NAME`) ) ENGINE=InnoDB DEFAULT CH 
ARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `ROLE_ 
MAP` ( `ROLE_GRANT_ID` bigint(20) NOT NULL, `ADD_TIME` int(11) NOT NULL, `GRANT_ 
OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) CHARACTER SET latin1 COLLAT 
E latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varchar(128) CHARACTER SET latin1 COLL 
ATE latin1_bin DEFAULT NULL, `PRINCIPAL_NAME` varchar(128) CHARACTER SET latin1  
COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_TYPE` varchar(128) CHARACTER SET lat 
in1 COLLATE latin1_bin DEFAULT NULL, `ROLE_ID` bigint(20) DEFAULT NULL, PRIMARY  
KEY (`ROLE_GRANT_ID`), UNIQUE KEY `USERROLEMAPINDEX` (`PRINCIPAL_NAME`,`ROLE_ID` 
,`GRANTOR`,`GRANTOR_TYPE`), KEY `ROLE_MAP_N49` (`ROLE_ID`), CONSTRAINT `ROLE_MAP 
_FK1` FOREIGN KEY (`ROLE_ID`) REFERENCES `ROLES` (`ROLE_ID`) ) ENGINE=InnoDB DEF 
AULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SDS`  
( `SD_ID` bigint(20) NOT NULL, `CD_ID` bigint(20) DEFAULT NULL, `INPUT_FORMAT` v 
archar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `IS_COMPRESSE 
D` bit(1) NOT NULL, `IS_STOREDASSUBDIRECTORIES` bit(1) NOT NULL, `LOCATION` varc 
har(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `NUM_BUCKETS` in 
t(11) NOT NULL, `OUTPUT_FORMAT` varchar(4000) CHARACTER SET latin1 COLLATE latin 
1_bin DEFAULT NULL, `SERDE_ID` bigint(20) DEFAULT NULL, PRIMARY KEY (`SD_ID`), K 
EY `SDS_N49` (`SERDE_ID`), KEY `SDS_N50` (`CD_ID`), CONSTRAINT `SDS_FK1` FOREIGN 
 KEY (`SERDE_ID`) REFERENCES `SERDES` (`SERDE_ID`), CONSTRAINT `SDS_FK2` FOREIGN 
 KEY (`CD_ID`) REFERENCES `CDS` (`CD_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SD_PA 
RAMS` ( `SD_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(256) CHARACTER SET lati 
n1 COLLATE latin1_bin NOT NULL, `PARAM_VALUE` varchar(4000) CHARACTER SET latin1 
 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`SD_ID`,`PARAM_KEY`), KEY `SD_PAR 
AMS_N49` (`SD_ID`), CONSTRAINT `SD_PARAMS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES  
`SDS` (`SD_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SEQUE 
NCE_TABLE` ( `SEQUENCE_NAME` varchar(255) CHARACTER SET latin1 COLLATE latin1_bi 
n NOT NULL, `NEXT_VAL` bigint(20) NOT NULL, PRIMARY KEY (`SEQUENCE_NAME`) ) ENGI 
NE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SERDE 
S` ( `SERDE_ID` bigint(20) NOT NULL, `NAME` varchar(128) CHARACTER SET latin1 CO 
LLATE latin1_bin DEFAULT NULL, `SLIB` varchar(4000) CHARACTER SET latin1 COLLATE 
 latin1_bin DEFAULT NULL, PRIMARY KEY (`SERDE_ID`) ) ENGINE=InnoDB DEFAULT CHARS 
ET=latin1
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SERDE 
_PARAMS` ( `SERDE_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(256) CHARACTER SE 
T latin1 COLLATE latin1_bin NOT NULL, `PARAM_VALUE` varchar(4000) CHARACTER SET  
latin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`SERDE_ID`,`PARAM_KEY`), KE 
Y `SERDE_PARAMS_N49` (`SERDE_ID`), CONSTRAINT `SERDE_PARAMS_FK1` FOREIGN KEY (`S 
ERDE_ID`) REFERENCES `SERDES` (`SERDE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin 
1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SKEWE 
D_COL_NAMES` ( `SD_ID` bigint(20) NOT NULL, `SKEWED_COL_NAME` varchar(256) CHARA 
CTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `INTEGER_IDX` int(11) NOT NULL, 
 PRIMARY KEY (`SD_ID`,`INTEGER_IDX`), KEY `SKEWED_COL_NAMES_N49` (`SD_ID`), CONS 
TRAINT `SKEWED_COL_NAMES_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`) ) 
 ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.004 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SKEWE 
D_COL_VALUE_LOC_MAP` ( `SD_ID` bigint(20) NOT NULL, `STRING_LIST_ID_KID` bigint( 
20) NOT NULL, `LOCATION` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin D 
EFAULT NULL, PRIMARY KEY (`SD_ID`,`STRING_LIST_ID_KID`), KEY `SKEWED_COL_VALUE_L 
OC_MAP_N49` (`STRING_LIST_ID_KID`), KEY `SKEWED_COL_VALUE_LOC_MAP_N50` (`SD_ID`) 
, CONSTRAINT `SKEWED_COL_VALUE_LOC_MAP_FK2` FOREIGN KEY (`STRING_LIST_ID_KID`) R 
EFERENCES `SKEWED_STRING_LIST` (`STRING_LIST_ID`), CONSTRAINT `SKEWED_COL_VALUE_ 
LOC_MAP_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`) ) ENGINE=InnoDB DE 
FAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SKEWE 
D_STRING_LIST` ( `STRING_LIST_ID` bigint(20) NOT NULL, PRIMARY KEY (`STRING_LIST 
_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.005 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.011 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SKEWE 
D_STRING_LIST_VALUES` ( `STRING_LIST_ID` bigint(20) NOT NULL, `STRING_LIST_VALUE 
` varchar(256) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `INTEGER_ID 
X` int(11) NOT NULL, PRIMARY KEY (`STRING_LIST_ID`,`INTEGER_IDX`), KEY `SKEWED_S 
TRING_LIST_VALUES_N49` (`STRING_LIST_ID`), CONSTRAINT `SKEWED_STRING_LIST_VALUES 
_FK1` FOREIGN KEY (`STRING_LIST_ID`) REFERENCES `SKEWED_STRING_LIST` (`STRING_LI 
ST_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SKEWE 
D_VALUES` ( `SD_ID_OID` bigint(20) NOT NULL, `STRING_LIST_ID_EID` bigint(20) NOT 
 NULL, `INTEGER_IDX` int(11) NOT NULL, PRIMARY KEY (`SD_ID_OID`,`INTEGER_IDX`),  
KEY `SKEWED_VALUES_N50` (`SD_ID_OID`), KEY `SKEWED_VALUES_N49` (`STRING_LIST_ID_ 
EID`), CONSTRAINT `SKEWED_VALUES_FK2` FOREIGN KEY (`STRING_LIST_ID_EID`) REFEREN 
CES `SKEWED_STRING_LIST` (`STRING_LIST_ID`), CONSTRAINT `SKEWED_VALUES_FK1` FORE 
IGN KEY (`SD_ID_OID`) REFERENCES `SDS` (`SD_ID`) ) ENGINE=InnoDB DEFAULT CHARSET 
=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `SORT_ 
COLS` ( `SD_ID` bigint(20) NOT NULL, `COLUMN_NAME` varchar(1000) CHARACTER SET l 
atin1 COLLATE latin1_bin DEFAULT NULL, `ORDER` int(11) NOT NULL, `INTEGER_IDX` i 
nt(11) NOT NULL, PRIMARY KEY (`SD_ID`,`INTEGER_IDX`), KEY `SORT_COLS_N49` (`SD_I 
D`), CONSTRAINT `SORT_COLS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`) 
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `TABLE 
_PARAMS` ( `TBL_ID` bigint(20) NOT NULL, `PARAM_KEY` varchar(256) CHARACTER SET  
latin1 COLLATE latin1_bin NOT NULL, `PARAM_VALUE` varchar(4000) CHARACTER SET la 
tin1 COLLATE latin1_bin DEFAULT NULL, PRIMARY KEY (`TBL_ID`,`PARAM_KEY`), KEY `T 
ABLE_PARAMS_N49` (`TBL_ID`), CONSTRAINT `TABLE_PARAMS_FK1` FOREIGN KEY (`TBL_ID` 
) REFERENCES `TBLS` (`TBL_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.018 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.004 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `TBLS` 
 ( `TBL_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `DB_ID` bigint( 
20) DEFAULT NULL, `LAST_ACCESS_TIME` int(11) NOT NULL, `OWNER` varchar(767) CHAR 
ACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `RETENTION` int(11) NOT NULL,  
`SD_ID` bigint(20) DEFAULT NULL, `TBL_NAME` varchar(128) CHARACTER SET latin1 CO 
LLATE latin1_bin DEFAULT NULL, `TBL_TYPE` varchar(128) CHARACTER SET latin1 COLL 
ATE latin1_bin DEFAULT NULL, `VIEW_EXPANDED_TEXT` mediumtext, `VIEW_ORIGINAL_TEX 
T` mediumtext, PRIMARY KEY (`TBL_ID`), UNIQUE KEY `UNIQUETABLE` (`TBL_NAME`,`DB_ 
ID`), KEY `TBLS_N50` (`SD_ID`), KEY `TBLS_N49` (`DB_ID`), CONSTRAINT `TBLS_FK1`  
FOREIGN KEY (`SD_ID`) REFERENCES `SDS` (`SD_ID`), CONSTRAINT `TBLS_FK2` FOREIGN  
KEY (`DB_ID`) REFERENCES `DBS` (`DB_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `TBL_C 
OL_PRIVS` ( `TBL_COLUMN_GRANT_ID` bigint(20) NOT NULL, `COLUMN_NAME` varchar(100 
0) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `CREATE_TIME` int(11) N 
OT NULL, `GRANT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) CHARACTER S 
ET latin1 COLLATE latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varchar(128) CHARACTER 
 SET latin1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_NAME` varchar(128) CHARA 
CTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_TYPE` varchar(128) C 
HARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `TBL_COL_PRIV` varchar(128) 
 CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `TBL_ID` bigint(20) DEFAU 
LT NULL, PRIMARY KEY (`TBL_COLUMN_GRANT_ID`), KEY `TABLECOLUMNPRIVILEGEINDEX` (` 
TBL_ID`,`COLUMN_NAME`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`TBL_COL_PRIV`,`GRANTOR` 
,`GRANTOR_TYPE`), KEY `TBL_COL_PRIVS_N49` (`TBL_ID`), CONSTRAINT `TBL_COL_PRIVS_ 
FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`) ) ENGINE=InnoDB DEFAULT 
 CHARSET=latin1
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET @saved_cs_client     
 = @@character_set_client */
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = utf8 */
No rows affected (0.003 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `TBL_P 
RIVS` ( `TBL_GRANT_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `GRA 
NT_OPTION` smallint(6) NOT NULL, `GRANTOR` varchar(128) CHARACTER SET latin1 COL 
LATE latin1_bin DEFAULT NULL, `GRANTOR_TYPE` varchar(128) CHARACTER SET latin1 C 
OLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_NAME` varchar(128) CHARACTER SET lati 
n1 COLLATE latin1_bin DEFAULT NULL, `PRINCIPAL_TYPE` varchar(128) CHARACTER SET  
latin1 COLLATE latin1_bin DEFAULT NULL, `TBL_PRIV` varchar(128) CHARACTER SET la 
tin1 COLLATE latin1_bin DEFAULT NULL, `TBL_ID` bigint(20) DEFAULT NULL, PRIMARY  
KEY (`TBL_GRANT_ID`), KEY `TBL_PRIVS_N49` (`TBL_ID`), KEY `TABLEPRIVILEGEINDEX`  
(`TBL_ID`,`PRINCIPAL_NAME`,`PRINCIPAL_TYPE`,`TBL_PRIV`,`GRANTOR`,`GRANTOR_TYPE`) 
, CONSTRAINT `TBL_PRIVS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL_ID`) 
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0.002 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> /*!40101 SET character_set_client 
 = @saved_cs_client */
No rows affected (0.001 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `TAB_C 
OL_STATS` ( `CS_ID` bigint(20) NOT NULL, `DB_NAME` varchar(128) CHARACTER SET la 
tin1 COLLATE latin1_bin NOT NULL, `TABLE_NAME` varchar(128) CHARACTER SET latin1 
 COLLATE latin1_bin NOT NULL, `COLUMN_NAME` varchar(1000) CHARACTER SET latin1 C 
OLLATE latin1_bin NOT NULL, `COLUMN_TYPE` varchar(128) CHARACTER SET latin1 COLL 
ATE latin1_bin NOT NULL, `TBL_ID` bigint(20) NOT NULL, `LONG_LOW_VALUE` bigint(2 
0), `LONG_HIGH_VALUE` bigint(20), `DOUBLE_HIGH_VALUE` double(53,4), `DOUBLE_LOW_ 
VALUE` double(53,4), `BIG_DECIMAL_LOW_VALUE` varchar(4000) CHARACTER SET latin1  
COLLATE latin1_bin, `BIG_DECIMAL_HIGH_VALUE` varchar(4000) CHARACTER SET latin1  
COLLATE latin1_bin, `NUM_NULLS` bigint(20) NOT NULL, `NUM_DISTINCTS` bigint(20), 
 `AVG_COL_LEN` double(53,4), `MAX_COL_LEN` bigint(20), `NUM_TRUES` bigint(20), ` 
NUM_FALSES` bigint(20), `LAST_ANALYZED` bigint(20) NOT NULL, PRIMARY KEY (`CS_ID 
`), CONSTRAINT `TAB_COL_STATS_FK` FOREIGN KEY (`TBL_ID`) REFERENCES `TBLS` (`TBL 
_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE TABLE IF NOT EXISTS `PART_ 
COL_STATS` ( `CS_ID` bigint(20) NOT NULL, `DB_NAME` varchar(128) CHARACTER SET l 
atin1 COLLATE latin1_bin NOT NULL, `TABLE_NAME` varchar(128) CHARACTER SET latin 
1 COLLATE latin1_bin NOT NULL, `PARTITION_NAME` varchar(767) CHARACTER SET latin 
1 COLLATE latin1_bin NOT NULL, `COLUMN_NAME` varchar(1000) CHARACTER SET latin1  
COLLATE latin1_bin NOT NULL, `COLUMN_TYPE` varchar(128) CHARACTER SET latin1 COL 
LATE latin1_bin NOT NULL, `PART_ID` bigint(20) NOT NULL, `LONG_LOW_VALUE` bigint 
(20), `LONG_HIGH_VALUE` bigint(20), `DOUBLE_HIGH_VALUE` double(53,4), `DOUBLE_LO 
W_VALUE` double(53,4), `BIG_DECIMAL_LOW_VALUE` varchar(4000) CHARACTER SET latin 
1 COLLATE latin1_bin, `BIG_DECIMAL_HIGH_VALUE` varchar(4000) CHARACTER SET latin 
1 COLLATE latin1_bin, `NUM_NULLS` bigint(20) NOT NULL, `NUM_DISTINCTS` bigint(20 
), `AVG_COL_LEN` double(53,4), `MAX_COL_LEN` bigint(20), `NUM_TRUES` bigint(20), 
 `NUM_FALSES` bigint(20), `LAST_ANALYZED` bigint(20) NOT NULL, PRIMARY KEY (`CS_ 
ID`), CONSTRAINT `PART_COL_STATS_FK` FOREIGN KEY (`PART_ID`) REFERENCES `PARTITI 
ONS` (`PART_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
No rows affected (0 seconds)
0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hiv> CREATE INDEX PCS_STATS_IDX ON PAR 
T_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME) USING BTREE
Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)

Closing: 0: jdbc:mysql://ip-10-0-1-45.ec2.internal/hive?createDatabaseIfNotExist=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:304)
	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:277)
	at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:526)
	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:233)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: java.io.IOException: Schema script failed, errorcode 2
	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:410)
	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:367)
	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:300)
	... 8 more
*** schemaTool failed ***

stdout: /var/lib/ambari-agent/data/output-617.txt

2017-07-10 20:22:39,909 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-07-10 20:22:40,105 - Stack Feature Version Info: stack_version=2.6, version=None, current_cluster_version=None -> 2.6
2017-07-10 20:22:40,117 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
User Group mapping (user_group) is missing in the hostLevelParams
2017-07-10 20:22:40,120 - Group['metron'] {}
2017-07-10 20:22:40,121 - Group['livy'] {}
2017-07-10 20:22:40,122 - Group['elasticsearch'] {}
2017-07-10 20:22:40,122 - Group['spark'] {}
2017-07-10 20:22:40,122 - Group['zeppelin'] {}
2017-07-10 20:22:40,122 - Group['hadoop'] {}
2017-07-10 20:22:40,123 - Group['kibana'] {}
2017-07-10 20:22:40,123 - Group['users'] {}
2017-07-10 20:22:40,123 - User['hive'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,125 - User['storm'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,126 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,127 - User['infra-solr'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,128 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,129 - User['tez'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2017-07-10 20:22:40,130 - User['zeppelin'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'zeppelin', u'hadoop']}
2017-07-10 20:22:40,131 - User['metron'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,132 - User['livy'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,132 - User['elasticsearch'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,133 - User['spark'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,134 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'users']}
2017-07-10 20:22:40,135 - User['flume'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,136 - User['kafka'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,137 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,138 - User['yarn'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,139 - User['kibana'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,140 - User['mapred'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,141 - User['hbase'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,142 - User['hcat'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': [u'hadoop']}
2017-07-10 20:22:40,143 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2017-07-10 20:22:40,145 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2017-07-10 20:22:40,151 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if
2017-07-10 20:22:40,152 - Directory['/tmp/hbase-hbase'] {'owner': 'hbase', 'create_parents': True, 'mode': 0775, 'cd_access': 'a'}
2017-07-10 20:22:40,153 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2017-07-10 20:22:40,154 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] {'not_if': '(test $(id -u hbase) -gt 1000) || (false)'}
2017-07-10 20:22:40,160 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh hbase /home/hbase,/tmp/hbase,/usr/bin/hbase,/var/log/hbase,/tmp/hbase-hbase'] due to not_if
2017-07-10 20:22:40,160 - Group['hdfs'] {}
2017-07-10 20:22:40,161 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': [u'hadoop', u'hdfs']}
2017-07-10 20:22:40,162 - FS Type: 
2017-07-10 20:22:40,162 - Directory['/etc/hadoop'] {'mode': 0755}
2017-07-10 20:22:40,187 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2017-07-10 20:22:40,189 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2017-07-10 20:22:40,210 - Execute[('setenforce', '0')] {'not_if': '(! which getenforce ) || (which getenforce && getenforce | grep -q Disabled)', 'sudo': True, 'only_if': 'test -f /selinux/enforce'}
2017-07-10 20:22:40,222 - Skipping Execute[('setenforce', '0')] due to only_if
2017-07-10 20:22:40,222 - Directory['/var/log/hadoop'] {'owner': 'root', 'create_parents': True, 'group': 'hadoop', 'mode': 0775, 'cd_access': 'a'}
2017-07-10 20:22:40,225 - Directory['/var/run/hadoop'] {'owner': 'root', 'create_parents': True, 'group': 'root', 'cd_access': 'a'}
2017-07-10 20:22:40,225 - Directory['/tmp/hadoop-hdfs'] {'owner': 'hdfs', 'create_parents': True, 'cd_access': 'a'}
2017-07-10 20:22:40,231 - File['/usr/hdp/current/hadoop-client/conf/commons-logging.properties'] {'content': Template('commons-logging.properties.j2'), 'owner': 'hdfs'}
2017-07-10 20:22:40,234 - File['/usr/hdp/current/hadoop-client/conf/health_check'] {'content': Template('health_check.j2'), 'owner': 'hdfs'}
2017-07-10 20:22:40,244 - File['/usr/hdp/current/hadoop-client/conf/log4j.properties'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop', 'mode': 0644}
2017-07-10 20:22:40,261 - File['/usr/hdp/current/hadoop-client/conf/hadoop-metrics2.properties'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2017-07-10 20:22:40,262 - File['/usr/hdp/current/hadoop-client/conf/task-log4j.properties'] {'content': StaticFile('task-log4j.properties'), 'mode': 0755}
2017-07-10 20:22:40,263 - File['/usr/hdp/current/hadoop-client/conf/configuration.xsl'] {'owner': 'hdfs', 'group': 'hadoop'}
2017-07-10 20:22:40,270 - File['/etc/hadoop/conf/topology_mappings.data'] {'owner': 'hdfs', 'content': Template('topology_mappings.data.j2'), 'only_if': 'test -d /etc/hadoop/conf', 'group': 'hadoop'}
2017-07-10 20:22:40,276 - File['/etc/hadoop/conf/topology_script.py'] {'content': StaticFile('topology_script.py'), 'only_if': 'test -d /etc/hadoop/conf', 'mode': 0755}
2017-07-10 20:22:40,519 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-07-10 20:22:40,530 - call['ambari-python-wrap /usr/bin/hdp-select status hive-server2'] {'timeout': 20}
2017-07-10 20:22:40,553 - call returned (0, 'hive-server2 - 2.6.1.0-129')
2017-07-10 20:22:40,554 - Stack Feature Version Info: stack_version=2.6, version=None, current_cluster_version=None -> 2.6
2017-07-10 20:22:40,585 - File['/var/lib/ambari-agent/cred/lib/CredentialUtil.jar'] {'content': DownloadSource('http://ip-10-0-1-57.ec2.internal:8080/resources/CredentialUtil.jar'), 'mode': 0755}
2017-07-10 20:22:40,587 - Not downloading the file from http://ip-10-0-1-57.ec2.internal:8080/resources/CredentialUtil.jar, because /var/lib/ambari-agent/tmp/CredentialUtil.jar already exists
2017-07-10 20:22:40,587 - checked_call[('/usr/jdk64/jdk1.8.0_112/bin/java', '-cp', u'/var/lib/ambari-agent/cred/lib/*', 'org.apache.ambari.server.credentialapi.CredentialUtil', 'get', 'javax.jdo.option.ConnectionPassword', '-provider', u'jceks://file/var/lib/ambari-agent/cred/conf/hive/hive-site.jceks')] {}
2017-07-10 20:22:41,540 - checked_call returned (0, 'SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".\nSLF4J: Defaulting to no-operation (NOP) logger implementation\nSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.\nJul 10, 2017 8:22:41 PM org.apache.hadoop.util.NativeCodeLoader <clinit>\nWARNING: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable\nAdmin')
2017-07-10 20:22:41,552 - Directory['/etc/hive'] {'mode': 0755}
2017-07-10 20:22:41,552 - Directories to fill with configs: [u'/usr/hdp/current/hive-metastore/conf', u'/usr/hdp/current/hive-metastore/conf/conf.server']
2017-07-10 20:22:41,553 - Directory['/etc/hive/2.6.1.0-129/0'] {'owner': 'hive', 'group': 'hadoop', 'create_parents': True, 'mode': 0755}
2017-07-10 20:22:41,553 - XmlConfig['mapred-site.xml'] {'group': 'hadoop', 'conf_dir': '/etc/hive/2.6.1.0-129/0', 'mode': 0644, 'configuration_attributes': {}, 'owner': 'hive', 'configurations': ...}
2017-07-10 20:22:41,564 - Generating config: /etc/hive/2.6.1.0-129/0/mapred-site.xml
2017-07-10 20:22:41,564 - File['/etc/hive/2.6.1.0-129/0/mapred-site.xml'] {'owner': 'hive', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': 0644, 'encoding': 'UTF-8'}
2017-07-10 20:22:41,605 - File['/etc/hive/2.6.1.0-129/0/hive-default.xml.template'] {'owner': 'hive', 'group': 'hadoop', 'mode': 0644}
2017-07-10 20:22:41,606 - File['/etc/hive/2.6.1.0-129/0/hive-env.sh.template'] {'owner': 'hive', 'group': 'hadoop', 'mode': 0644}
2017-07-10 20:22:41,608 - File['/etc/hive/2.6.1.0-129/0/hive-exec-log4j.properties'] {'content': InlineTemplate(...), 'owner': 'hive', 'group': 'hadoop', 'mode': 0644}
2017-07-10 20:22:41,611 - File['/etc/hive/2.6.1.0-129/0/hive-log4j.properties'] {'content': InlineTemplate(...), 'owner': 'hive', 'group': 'hadoop', 'mode': 0644}
2017-07-10 20:22:41,612 - Directory['/etc/hive/2.6.1.0-129/0/conf.server'] {'owner': 'hive', 'group': 'hadoop', 'create_parents': True, 'mode': 0700}
2017-07-10 20:22:41,612 - XmlConfig['mapred-site.xml'] {'group': 'hadoop', 'conf_dir': '/etc/hive/2.6.1.0-129/0/conf.server', 'mode': 0600, 'configuration_attributes': {}, 'owner': 'hive', 'configurations': ...}
2017-07-10 20:22:41,619 - Generating config: /etc/hive/2.6.1.0-129/0/conf.server/mapred-site.xml
2017-07-10 20:22:41,620 - File['/etc/hive/2.6.1.0-129/0/conf.server/mapred-site.xml'] {'owner': 'hive', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': 0600, 'encoding': 'UTF-8'}
2017-07-10 20:22:41,660 - File['/etc/hive/2.6.1.0-129/0/conf.server/hive-default.xml.template'] {'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2017-07-10 20:22:41,661 - File['/etc/hive/2.6.1.0-129/0/conf.server/hive-env.sh.template'] {'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2017-07-10 20:22:41,663 - File['/etc/hive/2.6.1.0-129/0/conf.server/hive-exec-log4j.properties'] {'content': InlineTemplate(...), 'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2017-07-10 20:22:41,665 - File['/etc/hive/2.6.1.0-129/0/conf.server/hive-log4j.properties'] {'content': InlineTemplate(...), 'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2017-07-10 20:22:41,666 - File['/usr/hdp/current/hive-metastore/conf/conf.server/hive-site.jceks'] {'content': StaticFile('/var/lib/ambari-agent/cred/conf/hive/hive-site.jceks'), 'owner': 'hive', 'group': 'hadoop', 'mode': 0640}
2017-07-10 20:22:41,667 - Writing File['/usr/hdp/current/hive-metastore/conf/conf.server/hive-site.jceks'] because contents don't match
2017-07-10 20:22:41,667 - XmlConfig['hive-site.xml'] {'group': 'hadoop', 'conf_dir': '/usr/hdp/current/hive-metastore/conf/conf.server', 'mode': 0600, 'configuration_attributes': {u'hidden': {u'javax.jdo.option.ConnectionPassword': u'HIVE_CLIENT,WEBHCAT_SERVER,HCAT,CONFIG_DOWNLOAD'}}, 'owner': 'hive', 'configurations': ...}
2017-07-10 20:22:41,675 - Generating config: /usr/hdp/current/hive-metastore/conf/conf.server/hive-site.xml
2017-07-10 20:22:41,676 - File['/usr/hdp/current/hive-metastore/conf/conf.server/hive-site.xml'] {'owner': 'hive', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': 0600, 'encoding': 'UTF-8'}
2017-07-10 20:22:41,803 - XmlConfig['hivemetastore-site.xml'] {'group': 'hadoop', 'conf_dir': '/usr/hdp/current/hive-metastore/conf/conf.server', 'mode': 0600, 'configuration_attributes': {}, 'owner': 'hive', 'configurations': {u'hive.service.metrics.hadoop2.component': u'hivemetastore', u'hive.metastore.metrics.enabled': u'true', u'hive.service.metrics.reporter': u'HADOOP2'}}
2017-07-10 20:22:41,811 - Generating config: /usr/hdp/current/hive-metastore/conf/conf.server/hivemetastore-site.xml
2017-07-10 20:22:41,811 - File['/usr/hdp/current/hive-metastore/conf/conf.server/hivemetastore-site.xml'] {'owner': 'hive', 'content': InlineTemplate(...), 'group': 'hadoop', 'mode': 0600, 'encoding': 'UTF-8'}
2017-07-10 20:22:41,818 - File['/usr/hdp/current/hive-metastore/conf/conf.server/hive-env.sh'] {'content': InlineTemplate(...), 'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2017-07-10 20:22:41,818 - Directory['/etc/security/limits.d'] {'owner': 'root', 'create_parents': True, 'group': 'root'}
2017-07-10 20:22:41,821 - File['/etc/security/limits.d/hive.conf'] {'content': Template('hive.conf.j2'), 'owner': 'root', 'group': 'root', 'mode': 0644}
2017-07-10 20:22:41,822 - File['/usr/lib/ambari-agent/DBConnectionVerification.jar'] {'content': DownloadSource('http://ip-10-0-1-57.ec2.internal:8080/resources/DBConnectionVerification.jar'), 'mode': 0644}
2017-07-10 20:22:41,822 - Not downloading the file from http://ip-10-0-1-57.ec2.internal:8080/resources/DBConnectionVerification.jar, because /var/lib/ambari-agent/tmp/DBConnectionVerification.jar already exists
2017-07-10 20:22:41,825 - File['/usr/hdp/current/hive-metastore/conf/conf.server/hadoop-metrics2-hivemetastore.properties'] {'content': Template('hadoop-metrics2-hivemetastore.properties.j2'), 'owner': 'hive', 'group': 'hadoop', 'mode': 0600}
2017-07-10 20:22:41,826 - File['/var/lib/ambari-agent/tmp/start_metastore_script'] {'content': StaticFile('startMetastore.sh'), 'mode': 0755}
2017-07-10 20:22:41,827 - Directory['/var/run/hive'] {'owner': 'hive', 'create_parents': True, 'group': 'hadoop', 'mode': 0755, 'cd_access': 'a'}
2017-07-10 20:22:41,827 - Directory['/var/log/hive'] {'owner': 'hive', 'create_parents': True, 'group': 'hadoop', 'mode': 0755, 'cd_access': 'a'}
2017-07-10 20:22:41,828 - Directory['/var/lib/hive'] {'owner': 'hive', 'create_parents': True, 'group': 'hadoop', 'mode': 0755, 'cd_access': 'a'}
2017-07-10 20:22:41,829 - Execute['export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-server2-hive2/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED] -verbose'] {'not_if': u"ambari-sudo.sh su hive -l -s /bin/bash -c 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-server2-hive2/bin/schematool -info -dbType mysql -userName hive -passWord [PROTECTED] -verbose'", 'user': 'hive'}
 

Command failed after 1 tries

1 ACCEPTED SOLUTION

avatar
Master Guru

@Rahul P

This is known issue.

To resolve this:

Please take backup of your metastore DB before doing any changes.

On the Hive Metastore installed node:

1) As the error mentions "Initialization script hive-schema-2.1.1000.mysql.sql", check /usr/hdp/current/hive-server2-hive2/scripts/metastore/upgrade/mysql/hive-*schema-2.1.0.mysql.sql

For example:

cd /usr/hdp/current/hive-server2-hive2/scripts/metastore/upgrade/mysql/ 
grep 'CREATE INDEX' hive-*schema-2.1.0.mysql.sql 
hive-schema-2.1.1000.mysql.sql:CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME) USING BTREE;
hive-schema-2.1.1000.mysql.sql:CREATE INDEX `CONSTRAINTS_PARENT_TABLE_ID_INDEX` ON KEY_CONSTRAINTS (`PARENT_TBL_ID`) USING BTREE;
hive-txn-schema-2.1.0.mysql.sql:CREATE INDEX HL_TXNID_IDX ON HIVE_LOCKS (HL_TXNID); 

2) Delete above indexes from MySQL:

Make sure you are using the database that is specified in log above.

Connecting to jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true

use <hivedB>
drop index CONSTRAINTS_PARENT_TABLE_ID_INDEX on KEY_CONSTRAINTS;
drop index PCS_STATS_IDX on PART_COL_STATS;
drop index HL_TXNID_IDX on HIVE_LOCKS; 

3) Add "IF NOT EXISTS" in the following tables by editing hive-txn-schema-2.1.0.mysql.sql file:

grep 'CREATE TABLE' hive-*schema-2.1.0.mysql.sql | grep -v 'IF NOT EXISTS'
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE TXNS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE TXN_COMPONENTS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE COMPLETED_TXN_COMPONENTS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE NEXT_TXN_ID (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE HIVE_LOCKS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE NEXT_LOCK_ID (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE COMPACTION_QUEUE (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE COMPLETED_COMPACTIONS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE AUX_TABLE (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE WRITE_SET ( 

For example:

sed -i.bak 's/^CREATE TABLE \([^I][^F]\)/CREATE TABLE IF NOT EXISTS \1/g' hive-txn-schema-2.1.0.mysql.sql 

4) Starting Hive Metastore from Ambari

5) After starting the metastore, if the following error happens, remove the conflicting row and start again.

0: jdbc:mysql://sandbox.hortonworks.com/hive> INSERT INTO VERSION (VER_ID, SCHEMA 
_VERSION, VERSION_COMMENT) VALUES (1, '2.1.0', 'Hive release version 2.1.0')
Error: Duplicate entry '1' for key 'PRIMARY' (state=23000,code=1062)

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

@Rahul P you can try below steps:

Log into your mysql db:

# mysql -u root -p -h localhost #use hive; #drop INDEX PCS_STATS_IDX ON PART_COL_STATS;

Restart the metastore.

avatar
Master Guru

@Rahul P

This is known issue.

To resolve this:

Please take backup of your metastore DB before doing any changes.

On the Hive Metastore installed node:

1) As the error mentions "Initialization script hive-schema-2.1.1000.mysql.sql", check /usr/hdp/current/hive-server2-hive2/scripts/metastore/upgrade/mysql/hive-*schema-2.1.0.mysql.sql

For example:

cd /usr/hdp/current/hive-server2-hive2/scripts/metastore/upgrade/mysql/ 
grep 'CREATE INDEX' hive-*schema-2.1.0.mysql.sql 
hive-schema-2.1.1000.mysql.sql:CREATE INDEX PCS_STATS_IDX ON PART_COL_STATS (DB_NAME,TABLE_NAME,COLUMN_NAME,PARTITION_NAME) USING BTREE;
hive-schema-2.1.1000.mysql.sql:CREATE INDEX `CONSTRAINTS_PARENT_TABLE_ID_INDEX` ON KEY_CONSTRAINTS (`PARENT_TBL_ID`) USING BTREE;
hive-txn-schema-2.1.0.mysql.sql:CREATE INDEX HL_TXNID_IDX ON HIVE_LOCKS (HL_TXNID); 

2) Delete above indexes from MySQL:

Make sure you are using the database that is specified in log above.

Connecting to jdbc:mysql://localhost/hive?createDatabaseIfNotExist=true

use <hivedB>
drop index CONSTRAINTS_PARENT_TABLE_ID_INDEX on KEY_CONSTRAINTS;
drop index PCS_STATS_IDX on PART_COL_STATS;
drop index HL_TXNID_IDX on HIVE_LOCKS; 

3) Add "IF NOT EXISTS" in the following tables by editing hive-txn-schema-2.1.0.mysql.sql file:

grep 'CREATE TABLE' hive-*schema-2.1.0.mysql.sql | grep -v 'IF NOT EXISTS'
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE TXNS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE TXN_COMPONENTS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE COMPLETED_TXN_COMPONENTS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE NEXT_TXN_ID (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE HIVE_LOCKS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE NEXT_LOCK_ID (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE COMPACTION_QUEUE (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE COMPLETED_COMPACTIONS (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE NEXT_COMPACTION_QUEUE_ID (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE AUX_TABLE (
hive-txn-schema-2.1.0.mysql.sql:CREATE TABLE WRITE_SET ( 

For example:

sed -i.bak 's/^CREATE TABLE \([^I][^F]\)/CREATE TABLE IF NOT EXISTS \1/g' hive-txn-schema-2.1.0.mysql.sql 

4) Starting Hive Metastore from Ambari

5) After starting the metastore, if the following error happens, remove the conflicting row and start again.

0: jdbc:mysql://sandbox.hortonworks.com/hive> INSERT INTO VERSION (VER_ID, SCHEMA 
_VERSION, VERSION_COMMENT) VALUES (1, '2.1.0', 'Hive release version 2.1.0')
Error: Duplicate entry '1' for key 'PRIMARY' (state=23000,code=1062)

avatar
New Contributor

I had to follow each of the step you mentioned and thanks for the sed command. Cant believe this hasn't been fixed this as yet 🙂