Hello!
I'm very new to the world Hadoop and Hive so I cannot solve a problem that I
encountered.
Hadoop has been deployed on a single-node in a pseudo-distributed mode.
I'm trying to copy data from one table to another. Source table created by
Sqoop, destination table created by query
create table if not exists rev0.operation_list (
id bigint,
id_paper bigint,
lgot_code int,
id_region int,
id_tarif_type int,
id_annulate int,
id_from int,
id_to int,
id_train int,
id_emitent int,
id_carriage int,
id_place int,
id_ticket_type int,
sell_date string,
trip_date string,
amount int,
cash int,
ticket_count int,
price_tarif_place int,
price_tarif_transfer int,
km float,
passengers int,
pkm float)
PARTITIONED BY(id_sell_date string)
stored as RCFILE;
Source table contains about 23 000 000 rows. When I try to execute
set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;
from rev0.operation_list_temp
insert overwrite table rev0.operation_list PARTITION(id_sell_date)
select
id,
id_paper,
lgot_code,
id_region,
id_tarif_type,
id_annulate,
id_from,
id_to,
id_train,
id_emitent,
id_carriage,
id_place,
id_ticket_type,
sell_date,
trip_date,
amount,
cash,
ticket_count,
price_tarif_place,
price_tarif_transfer,
km,
passengers,
pkm,
to_date(sell_date) id_sell_date;
I see strange progress report:
Hive history file=/tmp/user/hive_job_log_user_201205221419_1856534995.txt
Total MapReduce jobs = 2
Launching Job 1 out of 2
Number of reduce tasks is set to 0 since there's no reduce operator
Starting Job = job_201205191141_0110, Tracking URL =
http://localhost:50030/jobdetails.jsp?jobid=job_201205191141_0110
Kill Command = /usr/lib/hadoop/bin/hadoop job
-Dmapred.job.tracker=localhost:8021 -kill job_201205191141_0110
2012-05-22 14:19:59,092 Stage-1 map = 0%, reduce = 0%
2012-05-22 14:21:00,000 Stage-1 map = 0%, reduce = 0%
2012-05-22 14:21:46,527 Stage-1 map = 13%, reduce = 0%
2012-05-22 14:21:52,664 Stage-1 map = 41%, reduce = 0%
2012-05-22 14:22:53,357 Stage-1 map = 41%, reduce = 0%
2012-05-22 14:23:06,747 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:23:28,409 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:24:29,322 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:25:28,276 Stage-1 map = 88%, reduce = 0%
2012-05-22 14:25:31,397 Stage-1 map = 50%, reduce = 0% <-- my comment: 88%
downs to 50%!
2012-05-22 14:26:32,332 Stage-1 map = 50%, reduce = 0%
2012-05-22 14:27:02,701 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:28:03,314 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:28:21,919 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:29:22,023 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:30:22,081 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:30:32,182 Stage-1 map = 88%, reduce = 0%
2012-05-22 14:30:34,227 Stage-1 map = 50%, reduce = 0% <-- my comment: again!
2012-05-22 14:31:34,948 Stage-1 map = 50%, reduce = 0%
2012-05-22 14:32:01,198 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:33:01,904 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:33:20,150 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:34:21,127 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:35:22,018 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:35:33,295 Stage-1 map = 88%, reduce = 0%
2012-05-22 14:35:43,137 Stage-1 map = 50%, reduce = 0% <-- my comment: and
again!
2012-05-22 14:36:44,057 Stage-1 map = 50%, reduce = 0%
2012-05-22 14:37:17,486 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:38:18,116 Stage-1 map = 63%, reduce = 0%
2012-05-22 14:38:36,327 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:39:36,936 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:40:37,660 Stage-1 map = 75%, reduce = 0%
2012-05-22 14:40:41,731 Stage-1 map = 88%, reduce = 0%
2012-05-22 14:40:43,759 Stage-1 map = 50%, reduce = 0% <-- my comment: last
one!
2012-05-22 14:40:47,815 Stage-1 map = 100%, reduce = 100%
Ended Job = job_201205191141_0110 with errors
FAILED: Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.MapRedTask
I can not understand why the process was completed with an error and why the
progress of the MAP procedure is so strange.
I have found 2 'workarounds':
1) divide original query for two by adding 'WHERE to_date(sell_date) <
to_date(border_date)' and 'WHERE to_date(sell_date) >= to_date(border_date)'.
As a result each query contains 11 500 000 rows and the copying process is
completed without errors.
2) In other hand, change 'stored by rcfile' to 'stored by sequencefile' without
WHERE predicate. Again, the query will complete without errors.
I have no idea about this behavior. Maybe I have not enough knowledge to
understand the differencies between RCFile and SequenceFile, so can someone
explain to me my mistakes?
PS. Sorry for bad English. Natural languages are my Achilles' heel.
Vyacheslav