This is an automated email from the ASF dual-hosted git repository.

benyoka pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 2a98cea  AMBARI-25230 improve fast-hdfs tool exception handling 
(benyoka) (#2916)
2a98cea is described below

commit 2a98cea0baadcaaa1b653f8209ca308c739853fb
Author: benyoka <[email protected]>
AuthorDate: Thu Apr 11 13:36:02 2019 +0200

    AMBARI-25230 improve fast-hdfs tool exception handling (benyoka) (#2916)
---
 .../src/main/java/org/apache/ambari/fast_hdfs_resource/Runner.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Runner.java
 
b/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Runner.java
index 9cf0a73..03a995c 100644
--- 
a/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Runner.java
+++ 
b/contrib/fast-hdfs-resource/src/main/java/org/apache/ambari/fast_hdfs_resource/Runner.java
@@ -35,7 +35,7 @@ import com.google.gson.Gson;
 
 public class Runner {
   public static void main(String[] args)
-      throws IOException, URISyntaxException {
+      throws IOException, URISyntaxException, Exception  {
     // 1 - Check arguments
     if (args.length != 1) {
       System.err.println("Incorrect number of arguments. Please provide:\n"
@@ -64,7 +64,7 @@ public class Runner {
       // 3 - Load data from JSON
       resources = (Resource[]) gson.fromJson(new FileReader(jsonFilePath),
           Resource[].class);
-      
+
       Configuration conf = new Configuration();
       FileSystem dfs = null;
 
@@ -144,6 +144,7 @@ public class Runner {
     catch(Exception e) {
        System.out.println("Exception occurred, Reason: " + e.getMessage());
        e.printStackTrace();
+       throw e;
     }
     finally {
       for(FileSystem dfs:fileSystemNameToInstance.values()) {

Reply via email to