You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ac...@apache.org on 2017/04/17 19:06:13 UTC
git commit: updated refs/heads/trunk to 4f9c6c2
Repository: giraph
Updated Branches:
refs/heads/trunk c9621e30b -> 4f9c6c24a
GIRAPH-1143
closes 35
Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/4f9c6c24
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/4f9c6c24
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/4f9c6c24
Branch: refs/heads/trunk
Commit: 4f9c6c24a8b4b03e2836c77fe2e53e38b6519420
Parents: c9621e3
Author: Avery Ching <ac...@fb.com>
Authored: Mon Apr 17 12:05:50 2017 -0700
Committer: Avery Ching <ac...@fb.com>
Committed: Mon Apr 17 12:05:50 2017 -0700
----------------------------------------------------------------------
.../apache/giraph/master/BspServiceMaster.java | 64 +++++++++++---------
1 file changed, 35 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/giraph/blob/4f9c6c24/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
index 6c930cd..7c54678 100644
--- a/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
+++ b/giraph-core/src/main/java/org/apache/giraph/master/BspServiceMaster.java
@@ -18,26 +18,9 @@
package org.apache.giraph.master;
-import static org.apache.giraph.conf.GiraphConstants.INPUT_SPLIT_SAMPLE_PERCENT;
-import static org.apache.giraph.conf.GiraphConstants.KEEP_ZOOKEEPER_DATA;
-import static org.apache.giraph.conf.GiraphConstants.PARTITION_LONG_TAIL_MIN_PRINT;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.TimeUnit;
-
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
import net.iharder.Base64;
-
import org.apache.commons.io.FilenameUtils;
import org.apache.giraph.bsp.ApplicationState;
import org.apache.giraph.bsp.BspInputFormat;
@@ -62,9 +45,9 @@ import org.apache.giraph.graph.GraphState;
import org.apache.giraph.graph.GraphTaskManager;
import org.apache.giraph.io.EdgeInputFormat;
import org.apache.giraph.io.GiraphInputFormat;
+import org.apache.giraph.io.InputType;
import org.apache.giraph.io.MappingInputFormat;
import org.apache.giraph.io.VertexInputFormat;
-import org.apache.giraph.io.InputType;
import org.apache.giraph.master.input.MasterInputSplitsHandler;
import org.apache.giraph.metrics.AggregatedMetrics;
import org.apache.giraph.metrics.GiraphMetrics;
@@ -106,8 +89,23 @@ import org.apache.zookeeper.ZooDefs.Ids;
import org.json.JSONException;
import org.json.JSONObject;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Sets;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
+
+import static org.apache.giraph.conf.GiraphConstants.INPUT_SPLIT_SAMPLE_PERCENT;
+import static org.apache.giraph.conf.GiraphConstants.KEEP_ZOOKEEPER_DATA;
+import static org.apache.giraph.conf.GiraphConstants.PARTITION_LONG_TAIL_MIN_PRINT;
/**
* ZooKeeper-based implementation of {@link CentralizedServiceMaster}.
@@ -370,13 +368,21 @@ public class BspServiceMaster<I extends WritableComparable,
new org.apache.hadoop.mapred.JobClient(
(org.apache.hadoop.mapred.JobConf)
getContext().getConfiguration());
- @SuppressWarnings("deprecation")
- JobID jobId = JobID.forName(getJobId());
- RunningJob job = jobClient.getJob(jobId);
- if (job != null) {
- job.killJob();
- } else {
- LOG.error("Jon not found for jobId=" + getJobId());
+ try {
+ @SuppressWarnings("deprecation")
+ JobID jobId = JobID.forName(getJobId());
+ RunningJob job = jobClient.getJob(jobId);
+ if (job != null) {
+ job.killJob();
+ } else {
+ LOG.error("Job not found for jobId=" + getJobId());
+ }
+ } catch (IllegalArgumentException iae) {
+ LOG.info("This job (" + getJobId() +
+ ") is not a legacy Hadoop job and will " +
+ "continue with failure cleanup." +
+ e.getMessage(),
+ e);
}
}
} catch (IOException ioe) {