Skip to content

Commit

Permalink
Fix MapReduceFSFetcherHadoop2 Fetcher filesystem to pick the configur…
Browse files Browse the repository at this point in the history
…ed URI (#292)
  • Loading branch information
skakker authored and akshayrai committed Nov 6, 2017
1 parent 37ad77f commit 83c1ef3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Properties;
import java.util.TimeZone;

Expand Down Expand Up @@ -86,9 +88,14 @@ public MapReduceFSFetcherHadoop2(FetcherConfigurationData fetcherConfData) throw
logger.info("Using timezone: " + _timeZone.getID());

Configuration conf = new Configuration();
this._fs = FileSystem.get(conf);
this._historyLocation = conf.get("mapreduce.jobhistory.done-dir");
this._intermediateHistoryLocation = conf.get("mapreduce.jobhistory.intermediate-done-dir");
try {
URI uri = new URI(this._historyLocation);
this._fs = FileSystem.get(uri, conf);
} catch( URISyntaxException ex) {
this._fs = FileSystem.get(conf);
}
logger.info("Intermediate history dir: " + _intermediateHistoryLocation);
logger.info("History done dir: " + _historyLocation);
}
Expand Down

0 comments on commit 83c1ef3

Please sign in to comment.