Hcatelog table creation issue



0

I am trying to create Hcatelog table i am not getting any error but its not getting created i am trying to understand where things gone wrong but not not able to find anything my hive is running fine and able to create tables from there.

HCatelog Queary

./hcat –e "CREATE TABLE IF NOT EXISTS employee ( eid int, name String, 
   salary String, destination String) \
COMMENT 'Employee details' \
ROW FORMAT DELIMITED \
FIELDS TERMINATED BY ‘\t’ \
LINES TERMINATED BY ‘\n’ \
STORED AS TEXTFILE;"

I am expecting a result as below

OK
Time taken: 5.905 seconds

when trying below command on HCatelog, it gives OK

-----------------------------------------------------------------------------------------------------------

./hcat -e "show tables;"
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.6.2.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]
19/01/20 08:47:30 INFO conf.HiveConf: Found configuration file file:/usr/local/hive/conf/hive-site.xml
19/01/20 08:47:33 INFO session.SessionState: Created HDFS directory: /tmp/hive/hduser/1c258044-cf42-462b-8392-6729a9b829a1
19/01/20 08:47:33 INFO session.SessionState: Created local directory: /tmp/hive/java/hduser/1c258044-cf42-462b-8392-6729a9b829a1
19/01/20 08:47:33 INFO session.SessionState: Created HDFS directory: /tmp/hive/hduser/1c258044-cf42-462b-8392-6729a9b829a1/_tmp_space.db
19/01/20 08:47:33 INFO ql.Driver: Compiling command(queryId=hduser_20190120084733_c4f303df-cfd0-4708-9010-1db294953f0f): show tables
19/01/20 08:47:35 INFO hive.metastore: Trying to connect to metastore with URI thrift://localhost:9083
19/01/20 08:47:35 INFO hive.metastore: Opened a connection to metastore, current connections: 1
19/01/20 08:47:35 INFO hive.metastore: Connected to metastore.
19/01/20 08:47:35 INFO ql.Driver: Semantic Analysis Completed
19/01/20 08:47:35 INFO ql.Driver: Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
19/01/20 08:47:35 INFO exec.ListSinkOperator: Initializing operator LIST_SINK[0]
19/01/20 08:47:35 INFO ql.Driver: Completed compiling command(queryId=hduser_20190120084733_c4f303df-cfd0-4708-9010-1db294953f0f); Time taken: 1.864 seconds
19/01/20 08:47:35 INFO ql.Driver: Concurrency mode is disabled, not creating a lock manager
19/01/20 08:47:35 INFO ql.Driver: Executing command(queryId=hduser_20190120084733_c4f303df-cfd0-4708-9010-1db294953f0f): show tables
19/01/20 08:47:35 INFO sqlstd.SQLStdHiveAccessController: Created SQLStdHiveAccessController for session context : HiveAuthzSessionContext [sessionString=1c258044-cf42-462b-8392-6729a9b829a1, clientType=HIVECLI]
19/01/20 08:47:35 WARN session.SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
19/01/20 08:47:35 INFO hive.metastore: Mestastore configuration hive.metastore.filter.hook changed from org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl to org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook
19/01/20 08:47:35 INFO hive.metastore: Closed a connection to metastore, current connections: 0
19/01/20 08:47:35 INFO hive.metastore: Trying to connect to metastore with URI thrift://localhost:9083
19/01/20 08:47:35 INFO hive.metastore: Opened a connection to metastore, current connections: 1
19/01/20 08:47:35 INFO hive.metastore: Connected to metastore.
19/01/20 08:47:35 INFO ql.Driver: Starting task [Stage-0:DDL] in serial mode
19/01/20 08:47:35 INFO ql.Driver: Completed executing command(queryId=hduser_20190120084733_c4f303df-cfd0-4708-9010-1db294953f0f); Time taken: 0.107 seconds
OK
19/01/20 08:47:35 INFO ql.Driver: OK
19/01/20 08:47:35 INFO Configuration.deprecation: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir
19/01/20 08:47:35 INFO mapred.FileInputFormat: Total input files to process : 1
19/01/20 08:47:35 INFO exec.ListSinkOperator: Closing operator LIST_SINK[0]
demo
Time taken: 2.042 seconds
19/01/20 08:47:35 INFO session.SessionState: Deleted directory: /tmp/hive/hduser/1c258044-cf42-462b-8392-6729a9b829a1 on fs with scheme hdfs
19/01/20 08:47:35 INFO session.SessionState: Deleted directory: /tmp/hive/java/hduser/1c258044-cf42-462b-8392-6729a9b829a1 on fs with scheme file
19/01/20 08:47:35 INFO hive.metastore: Closed a connection to metastore, current connections: 0

----------------------------------------------------------------------------------------------------

and now trying to show table i am not getting employee table it gives a demo table name which is created in hive i am not sure where i am doing wrong if you can suggest please.

------------------------------------------------------------------------------------------------------

./hcat -e "show tables;"
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.6.2.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]
19/01/20 12:35:53 INFO conf.HiveConf: Found configuration file file:/usr/local/hive/conf/hive-site.xml
19/01/20 12:35:56 INFO session.SessionState: Created HDFS directory: /tmp/hive/hduser/51a26937-8d09-4e73-9c94-f49ed322636c
19/01/20 12:35:56 INFO session.SessionState: Created local directory: /tmp/hive/java/hduser/51a26937-8d09-4e73-9c94-f49ed322636c
19/01/20 12:35:56 INFO session.SessionState: Created HDFS directory: /tmp/hive/hduser/51a26937-8d09-4e73-9c94-f49ed322636c/_tmp_space.db
19/01/20 12:35:56 INFO ql.Driver: Compiling command(queryId=hduser_20190120123556_7b57538e-726a-426b-a3ce-540347b5df58): show tables
19/01/20 12:35:57 INFO hive.metastore: Trying to connect to metastore with URI thrift://localhost:9083
19/01/20 12:35:57 INFO hive.metastore: Opened a connection to metastore, current connections: 1
19/01/20 12:35:58 INFO hive.metastore: Connected to metastore.
19/01/20 12:35:58 INFO ql.Driver: Semantic Analysis Completed
19/01/20 12:35:58 INFO ql.Driver: Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:tab_name, type:string, comment:from deserializer)], properties:null)
19/01/20 12:35:58 INFO exec.ListSinkOperator: Initializing operator LIST_SINK[0]
19/01/20 12:35:58 INFO ql.Driver: Completed compiling command(queryId=hduser_20190120123556_7b57538e-726a-426b-a3ce-540347b5df58); Time taken: 1.905 seconds
19/01/20 12:35:58 INFO ql.Driver: Concurrency mode is disabled, not creating a lock manager
19/01/20 12:35:58 INFO ql.Driver: Executing command(queryId=hduser_20190120123556_7b57538e-726a-426b-a3ce-540347b5df58): show tables
19/01/20 12:35:58 INFO sqlstd.SQLStdHiveAccessController: Created SQLStdHiveAccessController for session context : HiveAuthzSessionContext [sessionString=51a26937-8d09-4e73-9c94-f49ed322636c, clientType=HIVECLI]
19/01/20 12:35:58 WARN session.SessionState: METASTORE_FILTER_HOOK will be ignored, since hive.security.authorization.manager is set to instance of HiveAuthorizerFactory.
19/01/20 12:35:58 INFO hive.metastore: Mestastore configuration hive.metastore.filter.hook changed from org.apache.hadoop.hive.metastore.DefaultMetaStoreFilterHookImpl to org.apache.hadoop.hive.ql.security.authorization.plugin.AuthorizationMetaStoreFilterHook
19/01/20 12:35:58 INFO hive.metastore: Closed a connection to metastore, current connections: 0
19/01/20 12:35:58 INFO hive.metastore: Trying to connect to metastore with URI thrift://localhost:9083
19/01/20 12:35:58 INFO hive.metastore: Opened a connection to metastore, current connections: 1
19/01/20 12:35:58 INFO hive.metastore: Connected to metastore.
19/01/20 12:35:58 INFO ql.Driver: Starting task [Stage-0:DDL] in serial mode
19/01/20 12:35:58 INFO ql.Driver: Completed executing command(queryId=hduser_20190120123556_7b57538e-726a-426b-a3ce-540347b5df58); Time taken: 0.116 seconds
OK
19/01/20 12:35:58 INFO ql.Driver: OK
19/01/20 12:35:58 INFO Configuration.deprecation: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inputdir
19/01/20 12:35:58 INFO mapred.FileInputFormat: Total input files to process : 1
19/01/20 12:35:58 INFO exec.ListSinkOperator: Closing operator LIST_SINK[0]
demo
Time taken: 2.096 seconds
19/01/20 12:35:58 INFO session.SessionState: Deleted directory: /tmp/hive/hduser/51a26937-8d09-4e73-9c94-f49ed322636c on fs with scheme hdfs
19/01/20 12:35:58 INFO session.SessionState: Deleted directory: /tmp/hive/java/hduser/51a26937-8d09-4e73-9c94-f49ed322636c on fs with scheme file
19/01/20 12:35:58 INFO hive.metastore: Closed a connection to metastore, current connections: 0

------------------------------------------------------------------------------------------------------------------------------------