2016-11-16 7 views
0

私はCDH5.5、ElasticSearch-2.4.1を使用しています。 私はハイブテーブルを作成し、以下のクエリを使用してハイブテーブルデータをElasticSearchにプッシュしようとしました。
ApacheハイブからElasticSearchにデータを読み込むことができません -

CREATE EXTERNAL TABLE test1_es(
    id string, 
    timestamp string, 
    dept string)<br> 
ROW FORMAT SERDE 'org.elasticsearch.hadoop.hive.EsSerDe' 
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' 
LOCATION 
    'hdfs://quickstart.cloudera:8020/user/cloudera/elasticsearch/test1_es' 
TBLPROPERTIES ( 'es.nodes'='localhost', 
'es.resource'='sample/test1', 
'es.mapping.names' = 'timestamp:@timestamp', 
'es.port' = '9200', 
'es.input.json' = 'false', 
'es.write.operation' = 'index', 
'es.index.auto.create' = 'yes' 
);<br> 
INSERT INTO TABLE default.test1_es select id,timestamp,dept from test1_hive; 

私は仕事トラッカーURLに以下のエラーを取得しています 「

Failed while trying to construct the redirect url to the log server. Log Server url may not be configured. <br> 
java.lang.Exception: Unknown container. Container either has not started or has already completed or doesn't belong to this node at all. " 

これは、ハイブの端末で"FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask"をスローします。

私のようなフォーラムで述べたすべての手順を試してみましたhive-site.xmlに/usr/lib/hive/bin/elasticsearch-hadoop-2.0.2.jarを含め、ES-hadoop jarをHIVEAUXJARS_PATHに追加し、糸ジャーを/usr/lib/hadoop/elasticsearch-yarn-2.1にコピーしました.0.Beta3.jarまた、修正方法を教えてくださいエラー。事前に


おかげで、 スリーナス

答えて

0

私は同じ問題を扱っている、と私はハイブによってスローされた実行エラーを解析できなかった文字列型のタイムスタンプフィールドによって引き起こされました。私は、文字列型のタイムスタンプフィールドがesに適切にマッピングできるかどうか疑問に思っています。そうでない場合、根本原因になる可能性があります。

ところで、エラーの詳細については、hadoop MRログにアクセスする必要があります。

0
REATE EXTERNAL TABLE test1_es(
    id string, 
    timestamp string, 
    dept string)<br> 
ROW FORMAT SERDE 'org.elasticsearch.hadoop.hive.EsSerDe' 
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' 
TBLPROPERTIES ........... 

は場所

を必要としない
関連する問題