You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by ma...@apache.org on 2019/09/13 21:09:27 UTC
[giraph] branch trunk updated: JIRA-1224
This is an automated email from the ASF dual-hosted git repository.
maja pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/giraph.git
The following commit(s) were added to refs/heads/trunk by this push:
new 009603a JIRA-1224
009603a is described below
commit 009603ae2c8faeee7894941d718fd303cc823f9b
Author: Maja Kabiljo <ma...@fb.com>
AuthorDate: Fri Sep 13 14:08:56 2019 -0700
JIRA-1224
closes #108
---
.../src/main/java/org/apache/giraph/conf/GiraphConstants.java | 7 +++++++
.../src/main/java/org/apache/giraph/master/BspServiceMaster.java | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java b/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java
index 2a0d24d..401de77 100644
--- a/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java
+++ b/giraph-core/src/main/java/org/apache/giraph/conf/GiraphConstants.java
@@ -1317,5 +1317,12 @@ public interface GiraphConstants {
*/
StrConfOption JMAP_PATH = new StrConfOption("giraph.jmapPath", "jmap",
"Path to use for invoking jmap");
+
+ /**
+ * Whether to fail the job or just warn when input is empty
+ */
+ BooleanConfOption FAIL_ON_EMPTY_INPUT = new BooleanConfOption(
+ "giraph.failOnEmptyInput", true,
+ "Whether to fail the job or just warn when input is empty");
}
// CHECKSTYLE: resume InterfaceIsTypeCheck
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 dac898e..7e34b0e 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
@@ -629,7 +629,7 @@ public class BspServiceMaster<I extends WritableComparable,
List<InputSplit> splitList = generateInputSplits(inputFormat,
minSplitCountHint, inputSplitType);
- if (splitList.isEmpty()) {
+ if (splitList.isEmpty() && GiraphConstants.FAIL_ON_EMPTY_INPUT.get(conf)) {
LOG.fatal(logPrefix + ": Failing job due to 0 input splits, " +
"check input of " + inputFormat.getClass().getName() + "!");
getContext().setStatus("Failing job due to 0 input splits, " +