Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fixes in HdfsFetcher revealed by HdfsFetcherTest (NPE and hiding …

…the VoldemortSerializationException)
  • Loading branch information...
commit 3b6c28255127400cf8c79f788411b4c966e8926c 1 parent f97699b
Chinmay Soman authored
View
8 contrib/hadoop-store-builder/src/java/voldemort/store/readonly/fetcher/HdfsFetcher.java
@@ -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)
@@ -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 {
Please sign in to comment.
Something went wrong with that request. Please try again.