hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject [41/50] [abbrv] hadoop git commit: MAPREDUCE-6676. NNBench should Throw IOException when rename and delete fails. Contributed by Brahma Reddy Battula.
Date Thu, 08 Jun 2017 20:06:23 GMT
MAPREDUCE-6676. NNBench should Throw IOException when rename and delete fails. Contributed
by Brahma Reddy Battula.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/bea02d22
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/bea02d22
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/bea02d22

Branch: refs/heads/HDFS-7240
Commit: bea02d229cfdc54a29db3d9689c07fe5b5447e80
Parents: 0887355
Author: Brahma Reddy Battula <brahma@apache.org>
Authored: Wed Jun 7 16:34:47 2017 +0800
Committer: Xiaoyu Yao <xyao@apache.org>
Committed: Thu Jun 8 10:44:52 2017 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/hadoop/hdfs/NNBench.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/bea02d22/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBench.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBench.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBench.java
index ee3cc00..29eac43 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBench.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBench.java
@@ -868,7 +868,10 @@ public class NNBench extends Configured implements Tool {
           try {
             // Set up timer for measuring AL
             startTimeAL = System.currentTimeMillis();
-            filesystem.rename(filePath, filePathR);
+            boolean result = filesystem.rename(filePath, filePathR);
+            if (!result) {
+              throw new IOException("rename failed for " + filePath);
+            }
             totalTimeAL1 += (System.currentTimeMillis() - startTimeAL);
             
             successfulOp = true;
@@ -901,7 +904,10 @@ public class NNBench extends Configured implements Tool {
           try {
             // Set up timer for measuring AL
             startTimeAL = System.currentTimeMillis();
-            filesystem.delete(filePath, true);
+            boolean result = filesystem.delete(filePath, true);
+            if (!result) {
+              throw new IOException("delete failed for " + filePath);
+            }
             totalTimeAL1 += (System.currentTimeMillis() - startTimeAL);
             
             successfulOp = true;


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message