Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
62 views
in Technique[技术] by (71.8m points)

How to get a better performance to load ElasticSearch data into Hive?

We created the Hive external table using ElasticSearch StorageHandler as shown below:

CREATE EXTERNAL TABLE DEFAULT.ES_TEST (
  REG_DATE STRING
, STR1     STRING
, STR2     STRING
, STR3     STRING
, STR4     STRING
, STR5     STRING
)
ROW FORMAT SERDE 'org.elasticsearch.hadoop.hive.EsSerDe'
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES (
  'es.resource'          = 'log-22-20210120'
, 'es.nodes'             = '1.2.3.4'
, 'es.port'              = '9201'
, 'es.mapping.date.rich' = 'false'
);

And then we tried to load the ES data into Hive managed table as like:

insert overwrite table elastic.es_log_tab partition(part_log_date)
select *
,      current_timestamp()
,      from_unixtime(unix_timestamp(reg_date), 'yyyyMMdd')
from   DEFAULT.ES_TEST;

When the ES data for given date is volumed to about 65GB, it was approximated taken 10 hours or 1.1M rows per minute (670M rows in total).

In order to get a better loading performance for this case, are there any further recommendation or checkpoints? How about increasing the number of mappers? Currently, it is running with 16 mappers. Expecting to get it faster with more mappers?

Please share your thoughts and previous experience with me.

question from:https://stackoverflow.com/questions/65838266/how-to-get-a-better-performance-to-load-elasticsearch-data-into-hive

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...