Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Wonderdog for Pig 0.10 by checking the conf object if the call …

…to the hadoop cache misses
  • Loading branch information...
commit d061ee5fcbb366061f7ed0e48c971352b8bde644 1 parent 9db09cf
@rjurney authored
View
6 src/main/java/com/infochimps/elasticsearch/ElasticSearchOutputFormat.java
@@ -120,7 +120,8 @@ public ElasticSearchRecordWriter(TaskAttemptContext context) {
this.objType = conf.get(ES_OBJECT_TYPE);
//
- // Fetches elasticsearch.yml and the plugins directory from the distributed cache
+ // Fetches elasticsearch.yml and the plugins directory from the distributed cache, or
+ // from the local config.
//
try {
String taskConfigPath = HadoopUtils.fetchFileFromCache(ES_CONFIG_NAME, conf);
@@ -130,7 +131,8 @@ public ElasticSearchRecordWriter(TaskAttemptContext context) {
System.setProperty(ES_CONFIG, taskConfigPath);
System.setProperty(ES_PLUGINS, taskPluginsPath+SLASH+ES_PLUGINS_NAME);
} catch (Exception e) {
- throw new RuntimeException(e);
+ System.setProperty(ES_CONFIG,conf.get(ES_CONFIG));
+ System.setProperty(ES_PLUGINS,conf.get(ES_PLUGINS));
}
start_embedded_client();
Please sign in to comment.
Something went wrong with that request. Please try again.