NIFI-1124, NIFI-1062 addressed PR comments

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Oleg Zhurakousky 2015-11-10 19:57:01 -05:00 committed by Bryan Bende
parent 62e3cfc629
commit 70cc61bb53
2 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,7 @@ public class PutHDFS extends AbstractHadoopProcessor {
} }
} }
getLogger().error("Failed to write to HDFS due to {}", t); getLogger().error("Failed to write to HDFS due to {}", t);
session.transfer(flowFile, REL_FAILURE); session.transfer(session.penalize(flowFile), REL_FAILURE);
context.yield(); context.yield();
} }
} }

View File

@ -208,6 +208,7 @@ public class PutHDFSTest {
List<MockFlowFile> failedFlowFiles = runner List<MockFlowFile> failedFlowFiles = runner
.getFlowFilesForRelationship(new Relationship.Builder().name("failure").build()); .getFlowFilesForRelationship(new Relationship.Builder().name("failure").build());
assertFalse(failedFlowFiles.isEmpty()); assertFalse(failedFlowFiles.isEmpty());
assertTrue(failedFlowFiles.get(0).isPenalized());
fs.setPermission(p, new FsPermission(FsAction.EXECUTE, FsAction.EXECUTE, FsAction.EXECUTE)); fs.setPermission(p, new FsPermission(FsAction.EXECUTE, FsAction.EXECUTE, FsAction.EXECUTE));
fs.delete(p, true); fs.delete(p, true);