Fixes Wonderdog Pig 0.10 compatability issues and issues 5, 6, 7 and PIG-2792 #11

Merged
merged 1 commit into from Jul 10, 2012
@@ -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();