Browse files

Catching Throwable during the creation of secured filesystem object

  • Loading branch information...
1 parent a825cec commit 8dcc833732ee8c5b4fb874f908ffc7a2a778ebac Chinmay Soman committed Feb 7, 2013
View
12 contrib/hadoop-store-builder/src/java/voldemort/store/readonly/fetcher/HdfsFetcher.java
@@ -253,7 +253,11 @@ public FileSystem run() throws Exception {
} catch(IOException e) {
e.printStackTrace();
- logger.error("Error in authenticating or getting the Filesystem object !!!");
+ logger.error("IOException in authenticating or getting the Filesystem object !!!");
+ return null;
+ } catch(Throwable te) {
+ te.printStackTrace();
+ logger.error("Error thrown while trying to get Hadoop filesystem");
return null;
}
@@ -665,7 +669,11 @@ public FileSystem run() throws Exception {
} catch(IOException e) {
e.printStackTrace();
- System.err.println("Error in getting Hadoop filesystem object !!! Exiting !!!");
+ System.err.println("IOException in getting Hadoop filesystem object !!! Exiting !!!");
+ System.exit(-1);
+ } catch(Throwable te) {
+ te.printStackTrace();
+ logger.error("Error thrown while trying to get Hadoop filesystem");
System.exit(-1);
}

0 comments on commit 8dcc833

Please sign in to comment.