Skip to content

Commit

Permalink
Bug fixes in HdfsFetcher revealed by HdfsFetcherTest (NPE and hiding …
Browse files Browse the repository at this point in the history
…the VoldemortSerializationException)
  • Loading branch information
Chinmay Soman committed Jan 14, 2013
1 parent f97699b commit 3b6c282
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -149,7 +149,11 @@ public HdfsFetcher(DynamicThrottleLimit dynThrottleLimit,
}

public File fetch(String sourceFileUrl, String destinationFile) throws IOException {
return fetch(sourceFileUrl, destinationFile, this.voldemortConfig.getHadoopConfigPath());
String hadoopConfigPath = "";
if(this.voldemortConfig != null) {
hadoopConfigPath = this.voldemortConfig.getHadoopConfigPath();
}
return fetch(sourceFileUrl, destinationFile, hadoopConfigPath);
}

public File fetch(String sourceFileUrl, String destinationFile, String hadoopConfigPath)
Expand Down Expand Up @@ -274,7 +278,7 @@ public FileSystem run() throws Exception {
} else {
return null;
}
} catch(Exception e) {
} catch(IOException e) {
logger.error("Error while getting Hadoop filesystem : " + e);
return null;
} finally {
Expand Down

0 comments on commit 3b6c282

Please sign in to comment.