Skip to content
Permalink
Browse files
JIRA-1224
closes #108
  • Loading branch information
Maja Kabiljo committed Sep 13, 2019
1 parent 1c5a4e7 commit 009603ae2c8faeee7894941d718fd303cc823f9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
@@ -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
@@ -629,7 +629,7 @@ private int createInputSplits(GiraphInputFormat inputFormat,
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, " +

0 comments on commit 009603a

Please sign in to comment.