hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peyton Peng" <pengp...@yunyou.tv>
Subject How to execute query with timestamp type (Hbase/Hive integeration)
Date Wed, 30 May 2012 08:53:40 GMT
Hi,

I build the hive table mapped with hbase table,

CREATE TABLE http_access(key string, client_ip string, client_port int, request_method string,
event_time timestamp) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,client:ip,client:port,request:method,request:event_time"
);

The data  is store with hbase client.

I get an issue while query with hive for (hbase/hive integration), while I execute sql: select
ip, port, request_method from http_access, it works well with no problem, 

but while I execute below sql: select ip, port, event_time from http_access, I got below exception.

The only difference between two sqls is: the event_time is timestamp type, I can scan the
corresponding hbase table and see the value of event_time is: 
 1338365792142                          column=request:event_time, timestamp=1338365739818,
value=Wed May 30 16:15:06 CST 2012                             

Anyone who know what the issue is? (Not sure if I made a wrong mapping or should I just store
the timestamp value as long in hbase? currently I store the value as java.util.Date)

Thank you very much....

Regards,
Peyton

Exception tracking:

Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks is set to 0 since there's no reduce operator
****hdfs://Server:9000/user/hive/warehouse/http_access
Starting Job = job_201205291421_0008, Tracking URL = http://Server:50030/jobdetails.jsp?jobid=job_201205291421_0008
Kill Command = /<here is the hadoop_home>/libexec/../bin/hadoop job  -Dmapred.job.tracker=Server:9001
ĘCkill job_201205291421_0008
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 0
2012-05-30 16:28:01,572 Stage-1 map = 0%,  reduce = 0%
2012-05-30 16:28:34,707 Stage-1 map = 100%,  reduce = 100%
Ended Job = job_201205291421_0008 with errors
Error during job, obtaining debugging information...
Examining task ID: task_201205291421_0008_m_000002 (and more) from job job_201205291421_0008
Exception in thread "Thread-211" java.lang.RuntimeException: Error while reading from task
log url
        at org.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getErrors(TaskLogProcessor.java:130)
        at org.apache.hadoop.hive.ql.exec.JobDebugger.showJobFailDebugInfo(JobDebugger.java:211)
        at org.apache.hadoop.hive.ql.exec.JobDebugger.run(JobDebugger.java:81)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: http://Server:50060/tasklog?taskid=attempt_201205291421_0008_m_000000_1&start=-8193
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1305)
        at java.net.URL.openStream(URL.java:1009)
        at org.apache.hadoop.hive.ql.exec.errors.TaskLogProcessor.getErrors(TaskLogProcessor.java:120)
        ... 3 more
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



Mime
View raw message