Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

2 participants

@rjurney

Two line commit that tries the conf object if the hadoop cache config call misses.

Fixes https://issues.apache.org/jira/browse/PIG-2792 #5 #6 #7

@matpalm matpalm commented on the diff
...fochimps/elasticsearch/ElasticSearchOutputFormat.java
@@ -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));
@matpalm
matpalm added a note

use consts ES_CONFIG & ES_PLUGINS instead of "es.config" & "es.path.plugins" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rjurney rjurney closed this
@rjurney

I am going to use ES_CONFIG, etc. in the setter too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 7, 2012
  1. @rjurney
This page is out of date. Refresh to see the latest.
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));
@matpalm
matpalm added a note

use consts ES_CONFIG & ES_PLUGINS instead of "es.config" & "es.path.plugins" ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ System.setProperty("es.path.plugins",conf.get(ES_PLUGINS));
}
start_embedded_client();
Something went wrong with that request. Please try again.