hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-16411 BackupDistCp#execute() should throw exception if the distcp job fails
Date Tue, 16 Aug 2016 20:11:44 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 8c3d4be22 -> 5ab7d3bd6


HBASE-16411 BackupDistCp#execute() should throw exception if the distcp job fails


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

Branch: refs/heads/HBASE-7912
Commit: 5ab7d3bd67d0ab62adb64e7bc07e92d27eb32694
Parents: 8c3d4be
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Aug 16 13:11:19 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Aug 16 13:11:19 2016 -0700

----------------------------------------------------------------------
 .../hbase/backup/mapreduce/MapReduceBackupCopyService.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/5ab7d3bd/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyService.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyService.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyService.java
index 5dbfa77..f4fc438 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyService.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceBackupCopyService.java
@@ -260,6 +260,10 @@ public class MapReduceBackupCopyService implements BackupCopyService
{
       job.getConfiguration().set(DistCpConstants.CONF_LABEL_DISTCP_JOB_ID, jobID);
 
       LOG.debug("DistCp job-id: " + jobID);
+      if (job.isComplete() && !job.isSuccessful()) {
+        throw new Exception("DistCp job-id: " + jobID + " failed");
+      }
+
       return job;
     }
 


Mime
View raw message