KalyanHadoopRealTimeProjects-2 / project-batch2-team2

project-batch2-team2
0 stars 0 forks source link

hive task1 issue #3

Open Navnitha opened 6 years ago

Navnitha commented 6 years ago

hi., getting error while creating json table . can anyone look into this..

[orienit@quickstart ~]$ hive -f /home/orienit/emp1.sql SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/lib/phoenix/phoenix-4.10.0-HBase-1.2-client.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/usr/lib/zookeeper/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/usr/lib/phoenix/phoenix-4.10.0-HBase-1.2-client.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]

Logging initialized using configuration in file:/etc/hive/conf.dist/hive-log4j.properties FAILED: ParseException line 13:0 missing StringLiteral at ')' near '' WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked. WARN: Please see http://www.slf4j.org/codes.html#release for an explanation. [orienit@quickstart ~]$

Navnitha commented 6 years ago

this is the query i wrote create database kalyan; use kalyan;

CREATE EXTERNAL TABLE employee1_json ( empid BIGINT, name STRING, salary BIGINT, dept STRING ) ROW FORMAT SERDE "org.apache.hadoop.hive.contrib.serde2.JsonSerde" WITH SERDEPROPERTIES ( "empid"":""$.empid", "name"":""$.name", "salary"":""$.salary", "dept"":""$.dept" ) LOCATION '/home/orienit/workspace/hive.input/employee1.json';

Navnitha commented 6 years ago

Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.apache.hadoop.hive.contrib.serde2.JsonSerde WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked.