rcongiu / Hive-JSON-Serde

Read - Write JSON SerDe for Apache Hive.
Other
732 stars 391 forks source link

Seems to be installed correctly, but crashing on use #9

Closed ChuckConnell closed 11 years ago

ChuckConnell commented 12 years ago

I create a table using this SerDe. That works fine. I load a datafile with valid JSON on each line. That works fine. I type "select * from table1". That works fine and shows the parsed fields, indicating that the SerDe is being used correctly.

Then I type "select field2 from table1". The MR job starts, but crashes. Log files below. Any clue what is going on? I would really like to use this SerDe for a big JSON/Hive project.

Thanks very much, Chuck

++++++++++++++++++

hive.log

2012-09-06 09:20:24,264 WARN parse.SemanticAnalyzer (SemanticAnalyzer.java:genBodyPlan(5821)) - Common Gby keys:null 2012-09-06 09:20:31,244 WARN parse.SemanticAnalyzer (SemanticAnalyzer.java:genBodyPlan(5821)) - Common Gby keys:null 2012-09-06 09:20:31,420 WARN mapred.JobClient (JobClient.java:copyAndConfigureFiles(660)) - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 2012-09-06 09:20:34,627 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,751 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,755 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,756 ERROR exec.Task (SessionState.java:printError(380)) - Ended Job = job_201209041602_0009 with errors 2012-09-06 09:20:56,757 ERROR exec.Task (SessionState.java:printError(380)) - Error during job, obtaining debugging information... 2012-09-06 09:20:56,759 ERROR exec.Task (SessionState.java:printError(380)) - Examining task ID: task_201209041602_0009_m_000002 (and more) from job job_201209041602_0009 2012-09-06 09:20:56,760 ERROR exec.Task (SessionState.java:printError(380)) - null 2012-09-06 09:20:56,769 ERROR ql.Driver (SessionState.java:printError(380)) - FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

+++++++++++++++++++++++++++++++

hive_job_log_guest_NNNN_NNNNN.txt

SessionStart SESSION_ID="guest_201209051439" TIME="1346870375744" QueryStart QUERY_STRING="create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870426783" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870426790" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.DDLTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870426793" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870426795" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870430239" TaskEnd TASK_RET_CODE="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.DDLTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870430239" QueryEnd QUERY_STRING="create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870430239" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1346870430239" QueryStart QUERY_STRING="load data inpath '/tmp/simple1.json' into table t2" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445811" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870445811" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MoveTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445811" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870445812" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870445989" TaskEnd TASK_RET_CODE="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MoveTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445989" QueryEnd QUERY_STRING="load data inpath '/tmp/simple1.json' into table t2" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870445990" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1346870445990" QueryStart QUERY_STRING="select * from t2" QUERY_ID="guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9" TIME="1346870455696" Counters plan="{"queryId":"guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}" TIME="1346870455696" QueryEnd QUERY_STRING="select * from t2" QUERY_ID="guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870455696" Counters plan="{"queryId":"guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}" TIME="1346870455696" QueryStart QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TIME="1346870464100" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870464105" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TIME="1346870464106" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870464110" TaskProgress TASK_HADOOP_PROGRESS="2012-09-05 14:41:06,755 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Total time spent by all maps in occupied slots (ms):1607,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TASK_HADOOP_ID="job_201209041602_0008" TIME="1346870466761" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"0","CNTR_NAME_Stage-1_MAP_PROGRESS":"0"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870466762" TaskProgress TASK_HADOOP_PROGRESS="2012-09-05 14:41:31,959 Stage-1 map = 100%, reduce = 100%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Failed map tasks:1,Job Counters .Launched map tasks:4,Job Counters .Data-local map tasks:4,Job Counters .Total time spent by all maps in occupied slots (ms):22907,Job Counters .Total time spent by all reduces in occupied slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TASK_HADOOP_ID="job_201209041602_0008" TIME="1346870491960" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870491960" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870491965" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870491984" QueryEnd QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" QUERY_NUM_TASKS="1" TIME="1346870491984" QueryStart QUERY_STRING="select * from t2" QUERY_ID="guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409" TIME="1346937624275" Counters plan="{"queryId":"guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}" TIME="1346937624275" QueryEnd QUERY_STRING="select * from t2" QUERY_ID="guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346937624276" Counters plan="{"queryId":"guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}" TIME="1346937624276" QueryStart QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TIME="1346937631256" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346937631256" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TIME="1346937631257" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937631259" TaskProgress TASK_HADOOP_PROGRESS="2012-09-06 09:20:34,628 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Launched map tasks:1,Job Counters .Data-local map tasks:1,Job Counters .Total time spent by all maps in occupied slots (ms):1477,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TASK_HADOOP_ID="job_201209041602_0009" TIME="1346937634628" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"0","CNTR_NAME_Stage-1_MAP_PROGRESS":"0"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937634629" TaskProgress TASK_HADOOP_PROGRESS="2012-09-06 09:20:56,751 Stage-1 map = 100%, reduce = 100%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Failed map tasks:1,Job Counters .Launched map tasks:4,Job Counters .Data-local map tasks:4,Job Counters .Total time spent by all maps in occupied slots (ms):22551,Job Counters .Total time spent by all reduces in occupied slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TASK_HADOOP_ID="job_201209041602_0009" TIME="1346937656752" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937656752" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346937656756" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346937656769" QueryEnd QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" QUERY_NUM_TASKS="1" TIME="1346937656769"

rcongiu commented 12 years ago

Can you attach the table definition and the json you're loading ?

R.

 

"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Sent: Thursday, September 6, 2012 6:49 AM Subject: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

I create a table using this SerDe. That works fine. I load a datafile with valid JSON on each line. That works fine. I type "select * from table1". That works fine and shows the parsed fields, indicating that the SerDe is being used correctly. Then I type "select field2 from table1". The MR job starts, but crashes. Log files below. Any clue what is going on? I would really like to use this SerDe for a big JSON/Hive project. Thanks very much, Chuck ++++++++++++++++++ hive.log 2012-09-06 09:20:24,264 WARN parse.SemanticAnalyzer (SemanticAnalyzer.java:genBodyPlan(5821)) - Common Gby keys:null 2012-09-06 09:20:31,244 WARN parse.SemanticAnalyzer (SemanticAnalyzer.java:genBodyPlan(5821)) - Common Gby keys:null 2012-09-06 09:20:31,420 WARN mapred.JobClient (JobClient.java:copyAndConfigureFiles(660)) - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 2012-09-06 09:20:34,627 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,751 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,755 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,756 ERROR exec.Task (SessionState.java:printError(380)) - Ended Job = job_201209041602_0009 with errors 2012-09-06 09:20:56,757 ERROR exec.Task (SessionState.java:printError(380)) - Error during job, obtaining debugging information... 2012-09-06 09:20:56,759 ERROR exec.Task (SessionState.java:printError(380)) - Examining task ID: task_201209041602_0009_m_000002 (and more) from job job_201209041602_0009 2012-09-06 09:20:56,760 ERROR exec.Task (SessionState.java:printError(380)) - null 2012-09-06 09:20:56,769 ERROR ql.Driver (SessionState.java:printError(380)) - FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask +++++++++++++++++++++++++++++++ hive_job_log_guest_NNNN_NNNNN.txt SessionStart SESSION_ID="guest_201209051439" TIME="1346870375744" QueryStart QUERY_STRING="create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870426783" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870426790" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.DDLTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870426793" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870426795" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870430239" TaskEnd TASK_RET_CODE="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.DDLTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870430239" QueryEnd QUERY_STRING="create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870430239" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1346870430239" QueryStart QUERY_STRING="load data inpath '/tmp/simple1.json' into table t2" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445811" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870445811" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MoveTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445811" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870445812" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870445989" TaskEnd TASK_RET_CODE="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MoveTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445989" QueryEnd QUERY_STRING="load data inpath '/tmp/simple1.json' into table t2" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870445990" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1346870445990" QueryStart QUERY_STRING="select * from t2" QUERY_ID="guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9" TIME="1346870455696" Counters plan="{"queryId":"guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}" TIME="1346870455696" QueryEnd QUERY_STRING="select * from t2" QUERY_ID="guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870455696" Counters plan="{"queryId":"guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}" TIME="1346870455696" QueryStart QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TIME="1346870464100" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870464105" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TIME="1346870464106" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870464110" TaskProgress TASK_HADOOP_PROGRESS="2012-09-05 14:41:06,755 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Total time spent by all maps in occupied slots (ms):1607,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TASK_HADOOP_ID="job_201209041602_0008" TIME="1346870466761" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"0","CNTR_NAME_Stage-1_MAP_PROGRESS":"0"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870466762" TaskProgress TASK_HADOOP_PROGRESS="2012-09-05 14:41:31,959 Stage-1 map = 100%, reduce = 100%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Failed map tasks:1,Job Counters .Launched map tasks:4,Job Counters .Data-local map tasks:4,Job Counters .Total time spent by all maps in occupied slots (ms):22907,Job Counters .Total time spent by all reduces in occupied slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TASK_HADOOP_ID="job_201209041602_0008" TIME="1346870491960" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870491960" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870491965" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870491984" QueryEnd QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" QUERY_NUM_TASKS="1" TIME="1346870491984" QueryStart QUERY_STRING="select * from t2" QUERY_ID="guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409" TIME="1346937624275" Counters plan="{"queryId":"guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}" TIME="1346937624275" QueryEnd QUERY_STRING="select * from t2" QUERY_ID="guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346937624276" Counters plan="{"queryId":"guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}" TIME="1346937624276" QueryStart QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TIME="1346937631256" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"false"}],"done":"false","started":"true"}" TIME="1346937631256" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TIME="1346937631257" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937631259" TaskProgress TASK_HADOOP_PROGRESS="2012-09-06 09:20:34,628 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Launched map tasks:1,Job Counters .Data-local map tasks:1,Job Counters .Total time spent by all maps in occupied slots (ms):1477,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TASK_HADOOP_ID="job_201209041602_0009" TIME="1346937634628" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"0","CNTR_NAME_Stage-1_MAP_PROGRESS":"0"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937634629" TaskProgress TASK_HADOOP_PROGRESS="2012-09-06 09:20:56,751 Stage-1 map = 100%, reduce = 100%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Failed map tasks:1,Job Counters .Launched map tasks:4,Job Counters .Data-local map tasks:4,Job Counters .Total time spent by all maps in occupied slots (ms):22551,Job Counters .Total time spent by all reduces in occupied slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TASK_HADOOP_ID="job_201209041602_0009" TIME="1346937656752" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937656752" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346937656756" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346937656769" QueryEnd QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" QUERY_NUM_TASKS="1" TIME="1346937656769" — Reply to this email directly or view it on GitHub.

ChuckConnell commented 12 years ago

Roberto,

Thanks very much for your prompt response.

Chuck Connell

Input file ...

{"field1" : "Field 1 a", "field2" : "Field 2 a", "field3" : "This is field 3 a"} {"field1" : "Field 1 b", "field2" : "Field 2 b", "field3" : "This is field 3 b"} {"field1" : "Field 1 c", "field2" : "Field 2 c", "field3" : "This is field 3 c"} {"field1" : "Field 1 d", "field2" : "Field 2 d", "field3" : "This is field 3 d"}

Hive commands....

create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile;

describe table t2;

field1 string from deserializer field2 string from deserializer field3 string from deserializer

select * from t2;

Field 1 a Field 2 a This is field 3 a Field 1 b Field 2 b This is field 3 b Field 1 c Field 2 c This is field 3 c Field 1 d Field 2 d This is field 3 d

select field1 from t2;

Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201209041602_0011, Tracking URL = http://localhost.localdomain:50030/jobdetails.jsp?jobid=job_201209041602_0011 Kill Command = /usr/lib/hadoop/bin/hadoop job -Dmapred.job.tracker=localhost.localdomain:8021 -kill job_201209041602_0011 Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0 2012-09-06 11:30:24,346 Stage-1 map = 0%, reduce = 0% 2012-09-06 11:30:47,549 Stage-1 map = 100%, reduce = 100% Ended Job = job_201209041602_0011 with errors Error during job, obtaining debugging information... Examining task ID: task_201209041602_0011_m_000002 (and more) from job job_201209041602_0011 null FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask MapReduce Jobs Launched: Job 0: Map: 1 HDFS Read: 0 HDFS Write: 0 FAIL Total MapReduce CPU Time Spent: 0 msec

ChuckConnell commented 12 years ago

I don't see a button to "attach" files here, so I included them in my comment above. The formatting seems to be broken when reading the comment, but looks OK when editing it.

rcongiu commented 12 years ago

Oh, right, I forgot. You can use my email, rcongiu@yahoo.com. I will have a look over the weekend.   R.


"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Cc: Roberto Congiu rcongiu@yahoo.com Sent: Thursday, September 6, 2012 9:42 AM Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

I don't see a button to "attach" files here, so I included them in my comment above. The formatting seems to be broken when reading the comment, but looks OK when editing it. — Reply to this email directly or view it on GitHub.

rcongiu commented 12 years ago

I actually just had a quick look and the query ran without issues for me.

The difference between select * and select field is that for small data the latter triggers a map/reduce job while the former does not. You should look at the task log and see why it is failing. What version of hive are you using ? Older versions require the serde to actually be installed and in the classpath of all the nodes. 

R.

 

"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Cc: Roberto Congiu rcongiu@yahoo.com Sent: Thursday, September 6, 2012 8:35 AM Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Roberto,

Thanks very much for your prompt response.

Chuck Connell

Input file ...

{"field1" : "Field 1 a", "field2" : "Field 2 a", "field3" : "This is field 3 a"} {"field1" : "Field 1 b", "field2" : "Field 2 b", "field3" : "This is field 3 b"} {"field1" : "Field 1 c", "field2" : "Field 2 c", "field3" : "This is field 3 c"} {"field1" : "Field 1 d", "field2" : "Field 2 d", "field3" : "This is field 3 d"}

Hive commands....

create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile;

describe table t2;

field1 string from deserializer field2 string from deserializer field3 string from deserializer

select * from t2;

Field 1 a Field 2 a This is field 3 a Field 1 b Field 2 b This is field 3 b Field 1 c Field 2 c This is field 3 c Field 1 d Field 2 d This is field 3 d

select field1 from t2;

Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201209041602_0011, Tracking URL = http://localhost.localdomain:50030/jobdetails.jsp?jobid=job_201209041602_0011 Kill Command = /usr/lib/hadoop/bin/hadoop job -Dmapred.job.tracker=localhost.localdomain:8021 -kill job_201209041602_0011 Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0 2012-09-06 11:30:24,346 Stage-1 map = 0%, reduce = 0% 2012-09-06 11:30:47,549 Stage-1 map = 100%, reduce = 100% Ended Job = job_201209041602_0011 with errors Error during job, obtaining debugging information... Examining task ID: task_201209041602_0011_m_000002 (and more) from job job_201209041602_0011 null FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask MapReduce Jobs Launched: Job 0: Map: 1 HDFS Read: 0 HDFS Write: 0 FAIL Total MapReduce CPU Time Spent: 0 msec


From: Roberto Congiu [notifications@github.com] Sent: Thursday, September 06, 2012 11:14 AM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Can you attach the table definition and the json you're loading ?

R.


"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Sent: Thursday, September 6, 2012 6:49 AM Subject: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

I create a table using this SerDe. That works fine. I load a datafile with valid JSON on each line. That works fine. I type "select * from table1". That works fine and shows the parsed fields, indicating that the SerDe is being used correctly. Then I type "select field2 from table1". The MR job starts, but crashes. Log files below. Any clue what is going on? I would really like to use this SerDe for a big JSON/Hive project. Thanks very much, Chuck ++++++++++++++++++ hive.log 2012-09-06 09:20:24,264 WARN parse.SemanticAnalyzer (SemanticAnalyzer.java:genBodyPlan(5821)) - Common Gby keys:null 2012-09-06 09:20:31,244 WARN parse.SemanticAnalyzer (SemanticAnalyzer.java:genBodyPlan(5821)) - Common Gby keys:null 2012-09-06 09:20:31,420 WARN mapred.JobClient (JobClient.java:copyAndConfigureFiles(660)) - Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 2012-09-06 09:20:34,627 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,751 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,755 WARN mapreduce.Counters (AbstractCounters.java:getGroup(224)) - Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead 2012-09-06 09:20:56,756 ERROR exec.Task (SessionState.java:printError(380)) - Ended Job = job_201209041602_0009 with errors 2012-09-06 09:20:56,757 ERROR exec.Task (SessionState.java:printError(380)) - Error during job, obtaining debugging information... 2012-09-06 09:20:56,759 ERROR exec.Task (SessionState.java:printError(380)) - Examining task ID: task_201209041602_0009_m_000002 (and more) from job job_201209041602_0009 2012-09-06 09:20:56,760 ERROR exec.Task (SessionState.java:printError(380)) - null 2012-09-06 09:20:56,769 ERROR ql.Driver (SessionState.java:printError(380)) - FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask +++++++++++++++++++++++++++++++ hive_job_log_guest_NNNN_NNNNN.txt SessionStart SESSION_ID="guest_201209051439" TIME="1346870375744" QueryStart QUERY_STRING="create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870426783" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870426790" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.DDLTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870426793" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870426795" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870430239" TaskEnd TASK_RET_CODE="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.DDLTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" TIME="1346870430239" QueryEnd QUERY_STRING="create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile" QUERY_ID="guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870430239" Counters plan="{"queryId":"guest_20120905144040_e91da01b-fc7a-4f10-b335-7d35351c62d0","queryType":null,"queryAttributes":{"queryString":"create table t2 (field1 string, field2 string, field3 string) row format serde 'org.openx.data.jsonserde.JsonSerDe' stored as textfile"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"DDL","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1346870430239" QueryStart QUERY_STRING="load data inpath '/tmp/simple1.json' into table t2" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445811" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870445811" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MoveTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445811" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"false","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870445812" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870445989" TaskEnd TASK_RET_CODE="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MoveTask" TASK_ID="Stage-0" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" TIME="1346870445989" QueryEnd QUERY_STRING="load data inpath '/tmp/simple1.json' into table t2" QUERY_ID="guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870445990" Counters plan="{"queryId":"guest_20120905144040_e8316ce6-a3c0-4a8a-a2d4-83b8797d9f99","queryType":null,"queryAttributes":{"queryString":"load data inpath '/tmp/simple1.json' into table t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-0","stageType":"MOVE","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-0_OTHER","taskType":"OTHER","taskAttributes":"null","taskCounters":"null","operatorGraph":"null","operatorList":"]","done":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}" TIME="1346870445990" QueryStart QUERY_STRING="select * from t2" QUERY_ID="guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9" TIME="1346870455696" Counters plan="{"queryId":"guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}" TIME="1346870455696" QueryEnd QUERY_STRING="select * from t2" QUERY_ID="guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346870455696" Counters plan="{"queryId":"guest_20120905144040_6e652430-2650-435f-9585-0998386cfcf9","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}" TIME="1346870455696" QueryStart QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TIME="1346870464100" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"false"}],"done":"false","started":"true"}" TIME="1346870464105" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TIME="1346870464106" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870464110" TaskProgress TASK_HADOOP_PROGRESS="2012-09-05 14:41:06,755 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Total time spent by all maps in occupied slots (ms):1607,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TASK_HADOOP_ID="job_201209041602_0008" TIME="1346870466761" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"0","CNTR_NAME_Stage-1_MAP_PROGRESS":"0"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870466762" TaskProgress TASK_HADOOP_PROGRESS="2012-09-05 14:41:31,959 Stage-1 map = 100%, reduce = 100%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Failed map tasks:1,Job Counters .Launched map tasks:4,Job Counters .Data-local map tasks:4,Job Counters .Total time spent by all maps in occupied slots (ms):22907,Job Counters .Total time spent by all reduces in occupied slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" TASK_HADOOP_ID="job_201209041602_0008" TIME="1346870491960" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346870491960" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870491965" Counters plan="{"queryId":"guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346870491984" QueryEnd QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120905144141_09d44635-a05b-48c8-98d2-a35e4d235891" QUERY_NUM_TASKS="1" TIME="1346870491984" QueryStart QUERY_STRING="select * from t2" QUERY_ID="guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409" TIME="1346937624275" Counters plan="{"queryId":"guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}" TIME="1346937624275" QueryEnd QUERY_STRING="select * from t2" QUERY_ID="guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409" QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1346937624276" Counters plan="{"queryId":"guest_20120906092020_54687988-630d-40e0-99ca-e1ec97d64409","queryType":null,"queryAttributes":{"queryString":"select * from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}" TIME="1346937624276" QueryStart QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TIME="1346937631256" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"false"}],"done":"false","started":"true"}" TIME="1346937631256" TaskStart TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TIME="1346937631257" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":"}","taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"}],"done":"false","started":"false"}],"done" :"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937631259" TaskProgress TASK_HADOOP_PROGRESS="2012-09-06 09:20:34,628 Stage-1 map = 0%, reduce = 0%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Launched map tasks:1,Job Counters .Data-local map tasks:1,Job Counters .Total time spent by all maps in occupied slots (ms):1477,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TASK_HADOOP_ID="job_201209041602_0009" TIME="1346937634628" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"0","CNTR_NAME_Stage-1_MAP_PROGRESS":"0"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"false","started":"false"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"false","started":"false"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"false","started":"false"}],"done":"false","started":"false"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937634629" TaskProgress TASK_HADOOP_PROGRESS="2012-09-06 09:20:56,751 Stage-1 map = 100%, reduce = 100%" TASK_NUM_REDUCERS="0" TASK_NAME="org.apache.hadoop.hive.ql.exec.MapRedTask" TASK_NUM_MAPPERS="1" TASK_COUNTERS="Job Counters .Failed map tasks:1,Job Counters .Launched map tasks:4,Job Counters .Data-local map tasks:4,Job Counters .Total time spent by all maps in occupied slots (ms):22551,Job Counters .Total time spent by all reduces in occupied slots (ms):0,Job Counters .Total time spent by all maps waiting after reserving slots (ms):0,Job Counters .Total time spent by all reduces waiting after reserving slots (ms):0,Map-Reduce Framework.CPU time spent (ms):0,org.apache.hadoop.hive.ql.exec.Operator$ProgressCounter.CREATED_FILES:0" TASK_ID="Stage-1" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" TASK_HADOOP_ID="job_201209041602_0009" TIME="1346937656752" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}],"done":"false","started":"true"}" TIME="1346937656752" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346937656756" Counters plan="{"queryId":"guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748","queryType":null,"queryAttributes":{"queryString":"select field1 from t2"},"queryCounters":"null","stageGraph":{"nodeType":"STAGE","roots":"null","adjacencyList":"]"},"stageList":[{"stageId":"Stage-1","stageType":"MAPRED","stageAttributes":"null","stageCounters":{"CNTR_NAME_Stage-1_REDUCE_PROGRESS":"100","CNTR_NAME_Stage-1_MAP_PROGRESS":"100"},"taskList":[{"taskId":"Stage-1_MAP","taskType":"MAP","taskAttributes":"null","taskCounters":"null","operatorGraph":{"nodeType":"OPERATOR","roots":"null","adjacencyList":[{"node":"TS_0","children":["SEL_1"],"adjacencyType":"CONJUNCTIVE"},{"node":"SEL_1","children":["FS_2"],"adjacencyType":"CONJUNCTIVE"}]},"operatorList":[{"operatorId":"TS_0","operatorType":"TABLESCAN","operatorAttributes":"null","operatorCounters":"}","done":"true","started":"true"},{"operatorId":"SEL_1","operatorType":"SELECT","operatorAttributes":"null","operatorCounters":"null","done":"true","started":"true"},{"operatorId":"FS_2","operatorType":"FILESINK","operatorAttributes":"null","operatorCounters":"null","don e":"true","started":"true"}],"done":"true","started":"true"}],"done":"true","started":"true"}],"done":"false","started":"true"}" TIME="1346937656769"

QueryEnd QUERY_STRING="select field1 from t2" QUERY_ID="guest_20120906092020_3456aab7-c45d-4cea-b984-1489aff81748" QUERY_NUM_TASKS="1" TIME="1346937656769"

Reply to this email directly or view it on GitHub.

  • Reply to this email directly or view it on GitHubhttps://github.com/rcongiu/Hive-JSON-Serde/issues/9#issuecomment-8335680. — Reply to this email directly or view it on GitHub.

ChuckConnell commented 12 years ago

Yes, I agree that it is probably a simple install/config issue. I just don't know what.

I am using CentOS 5.8 and the CDH4 distro of Hadoop. All are plain vanilla install on one machine only, running client and server on localhost.

I installed your JAR in /usr/lib/hive/lib. I did not use any ADD JAR statement within Hive.

Thanks, Chuck

ChuckConnell commented 12 years ago

Since "select *" worked, so I assume that means your serde is being invoked??


From: Roberto Congiu [notifications@github.com] Sent: Thursday, September 06, 2012 1:34 PM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

I actually just had a quick look and the query ran without issues for me.

The difference between select * and select field is that for small data the latter triggers a map/reduce job while the former does not. You should look at the task log and see why it is failing. What version of hive are you using ? Older versions require the serde to actually be installed and in the classpath of all the nodes.

rcongiu commented 12 years ago

Yes, but the difference is that it's being invoked by hive and not by the mapper/reducer. What if you create a normal text table (with the built in serde) and you do the same, does that work ? R.

 

"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Cc: Roberto Congiu rcongiu@yahoo.com Sent: Thursday, September 6, 2012 10:54 AM Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Since "select *" worked, so I assume that means your serde is being invoked??


From: Roberto Congiu [notifications@github.com] Sent: Thursday, September 06, 2012 1:34 PM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

I actually just had a quick look and the query ran without issues for me.

The difference between select * and select field is that for small data the latter triggers a map/reduce job while the former does not. You should look at the task log and see why it is failing. What version of hive are you using ? Older versions require the serde to actually be installed and in the classpath of all the nodes. — Reply to this email directly or view it on GitHub.

ChuckConnell commented 12 years ago

I have used normal hive (tab separated text files) many times, but I will double check it with this exact configuration. Good idea to verify.

Chuck

From: Roberto Congiu [mailto:notifications@github.com] Sent: Thursday, September 06, 2012 2:33 PM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Yes, but the difference is that it's being invoked by hive and not by the mapper/reducer. What if you create a normal text table (with the built in serde) and you do the same, does that work ? R.

ChuckConnell commented 12 years ago

Yes, Hive queries of regular tables (tab separated, no custom serde) work correctly. This includes selecting specific fields and using a where-clause.

Idea… are you running your SerDe in your programming environment? I suspect some libraries/jars are not installed on my machine that you are assuming. Have you tried it on a plain fresh CDH4 machine?

Thanks, Chuck

From: Roberto Congiu [mailto:notifications@github.com] Sent: Thursday, September 06, 2012 2:33 PM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Yes, but the difference is that it's being invoked by hive and not by the mapper/reducer. What if you create a normal text table (with the built in serde) and you do the same, does that work ? R.

rcongiu commented 12 years ago

Hey Chuck, I will try that this weekend. Did you download the precompiled serde, or did you compile your own ?

R.

 

"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Cc: Roberto Congiu rcongiu@yahoo.com Sent: Thursday, September 6, 2012 1:41 PM Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Yes, Hive queries of regular tables (tab separated, no custom serde) work correctly. This includes selecting specific fields and using a where-clause.

Idea… are you running your SerDe in your programming environment? I suspect some libraries/jars are not installed on my machine that you are assuming. Have you tried it on a plain fresh CDH4 machine?

Thanks, Chuck

From: Roberto Congiu [mailto:notifications@github.com] Sent: Thursday, September 06, 2012 2:33 PM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Yes, but the difference is that it's being invoked by hive and not by the mapper/reducer. What if you create a normal text table (with the built in serde) and you do the same, does that work ? R.

— Reply to this email directly or view it on GitHub.

ChuckConnell commented 12 years ago

Thanks. I am using your precompiled jar. I am using precompiled of everything.

Chuck


From: Roberto Congiu [notifications@github.com] Sent: Friday, September 07, 2012 1:55 AM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Hey Chuck, I will try that this weekend. Did you download the precompiled serde, or did you compile your own ?

R.


"Good judgment comes from experience.

Experience comes from bad judgment"

Data Engineer - OpenX.org Pasadena, CA Skype: sardodazione Y! IM: rcongiu


From: Chuck Connell notifications@github.com To: rcongiu/Hive-JSON-Serde Hive-JSON-Serde@noreply.github.com Cc: Roberto Congiu rcongiu@yahoo.com Sent: Thursday, September 6, 2012 1:41 PM Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Yes, Hive queries of regular tables (tab separated, no custom serde) work correctly. This includes selecting specific fields and using a where-clause.

Idea… are you running your SerDe in your programming environment? I suspect some libraries/jars are not installed on my machine that you are assuming. Have you tried it on a plain fresh CDH4 machine?

Thanks, Chuck

From: Roberto Congiu [mailto:notifications@github.com] Sent: Thursday, September 06, 2012 2:33 PM To: rcongiu/Hive-JSON-Serde Cc: Connell, Chuck Subject: Re: [Hive-JSON-Serde] Seems to be installed correctly, but crashing on use (#9)

Yes, but the difference is that it's being invoked by hive and not by the mapper/reducer. What if you create a normal text table (with the built in serde) and you do the same, does that work ? R.

— Reply to this email directly or view it on GitHub.

— Reply to this email directly or view it on GitHubhttps://github.com/rcongiu/Hive-JSON-Serde/issues/9#issuecomment-8356713.

ChuckConnell commented 12 years ago

To clarify my environment... I downloaded the Cloudera Manager Free Edition, and let it do the complete Hadoop install/config for me. I told it to install the latest version of CDH4 distro.

https://ccp.cloudera.com/display/SUPPORT/Cloudera+Manager+Downloads

rcongiu commented 12 years ago

Hey Chuck, I was finally able to try in the same conditions - cloudera hive/hadoop CDH4 - and the SerDe appears to works fine for me. I did the following, with the serde in /home/rcongiu/hive-jars

file data.txt containing {"field1" : "Field 1 a", "field2" : "Field 2 a", "field3" : "This is field 3 a"} {"field1" : "Field 1 b", "field2" : "Field 2 b", "field3" : "This is field 3 b"} {"field1" : "Field 1 c", "field2" : "Field 2 c", "field3" : "This is field 3 c"} {"field1" : "Field 1 d", "field2" : "Field 2 d", "field3" : "This is field 3 d"}

hive --auxpath /home/rcongiu/hive-jars hive> create table jsontest2 (field1 string, field2 string, field3 string) ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'; hive> load data local inpath 'data.txt' into table jsontest2;

hive> select field1 from jsontest2; Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201209110754_0001, Tracking URL = http://localhost:50030/jobdetails.jsp?jobid=job_201209110754_0001 Kill Command = /usr/lib/hadoop/bin/hadoop job -Dmapred.job.tracker=localhost:9001 -kill job_201209110754_0001 Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0 2012-09-11 07:56:31,203 Stage-1 map = 0%, reduce = 0% 2012-09-11 07:56:33,252 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 0.54 sec 2012-09-11 07:56:34,265 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 0.54 sec MapReduce Total cumulative CPU time: 540 msec Ended Job = job_201209110754_0001 MapReduce Jobs Launched: Job 0: Map: 1 Accumulative CPU: 0.54 sec HDFS Read: 0 HDFS Write: 0 SUCESS Total MapReduce CPU Time Spent: 540 msec OK Field 1 a Field 1 b Field 1 c Field 1 d Time taken: 6.325 seconds

My thoughts are that using select * instead of select field1 does not trigger a map-reduce job. What does your hadoop task log say ? from hive.log it looks like the problem is in the mapreduce task.

ChuckConnell commented 12 years ago

Roberto -- thanks very much for your work on this. I agree that the problem only arises when I force Hive to run an MR job. Let me do some more tests. We are hoping to use your SerDe for some very large projects, so it is worth it to me to spend the time to solve this.

rcongiu commented 12 years ago

I think I found the issue... you said: "I installed your JAR in /usr/lib/hive/lib" That's not the right place where to put the SerDe. Hive libs are not sent to the tasktrackers and your map reduce job would fail, consistent with what you're seeing. You have to create a directory (I use /usr/lib/hive/extra_libs) and either start hive with --auxpath /usr/lib/hive/extra_libs or define the environment variable HIVE_AUX_JARS_PATH.

ChuckConnell commented 12 years ago

!! I am testing it now.

ChuckConnell commented 12 years ago

It all works. Thanks very much. I tested simple queries of top-level fields, and also querying on struct members. This will be very helpful to my team.

rcongiu commented 11 years ago

Cool!! You're welcome and...enjoy :)

ChuckConnell commented 11 years ago

Let me know if you need anything in the Boston area.