2016-05-16 5 views
1

私はElasticSearchハンドラによって保存されたハイブに外部表を作成すると、それはエラーなしで動作します。ハイブelasticsearch外部表の作成

*CREATE TABLE test (day STRING, idCust STRING) 
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' 
TBLPROPERTIES('es.resource' = 'test/test', 
'es.mapping.names' = 'day:@timestamp', 
'es.nodes' = 'localhost');* 

私はそれにデータを挿入すると、私がしようとすると、それは

を動作しますが、それを照会するとエラーが発生します:

java.io.IOExceptionを例外として失敗しました:org.elasticsearch.hadoop.EsHadoopIllegalArgumentException:インデックス[test/test]が見つかりません。[es.index.read.missing.as.empty ]がfalseに設定されている

私はインデックスのリストをチェックすると、 'テスト' は

curl 'localhost:9200/_cat/indices?v'

表示されないだけで追加真

答えて

1

「es.index.auto.createのデフォルトを助けてくださいこの

CREATE TABLE test (day STRING, idCust STRING) 
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' 
TBLPROPERTIES('es.resource' = 'test/test', 
'es.mapping.names' = 'day:@timestamp', 
'es.nodes' = 'localhost', **'es.index.auto.create' = 'true','es.index.read.missing.as.empty'='yes'**); 

私はそれがpホント

関連する問題