Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Spann committed Dec 21, 2016
1 parent f1e75b6 commit 7914833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void onTrigger(final ProcessContext context, final ProcessSession session

try {
//Output Flowfile
flowFile = session.putAttribute(flowFile, ATTRIBUTE_OUTPUT_NAME, outputJSON);
//flowFile = session.putAttribute(flowFile, ATTRIBUTE_OUTPUT_NAME, outputJSON);

flowFile = session.write(flowFile, new OutputStreamCallback() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.io.UnsupportedEncodingException;
import java.util.List;

import org.apache.nifi.provenance.ProvenanceEventRecord;
import org.apache.nifi.util.MockFlowFile;
import org.apache.nifi.util.TestRunner;
import org.apache.nifi.util.TestRunners;
Expand Down Expand Up @@ -51,14 +50,14 @@ public void testProcessor() {
testRunner.assertValid();
List<MockFlowFile> successFiles = testRunner.getFlowFilesForRelationship(LinkProcessor.REL_SUCCESS);

for (ProvenanceEventRecord events : testRunner.getProvenanceEvents()) {
System.out.println("Output: " + events.getAttributes().get(LinkProcessor.ATTRIBUTE_OUTPUT_NAME));
}
// for (ProvenanceEventRecord events : testRunner.getProvenanceEvents()) {
// System.out.println("Output: " + events.getAttributes().get(LinkProcessor.ATTRIBUTE_OUTPUT_NAME));
// }

for (MockFlowFile mockFile : successFiles) {
try {
System.out.println("FILE:" + new String(mockFile.toByteArray(), "UTF-8"));
System.out.println("Attribute: " + mockFile.getAttribute(LinkProcessor.ATTRIBUTE_OUTPUT_NAME));
//System.out.println("Attribute: " + mockFile.getAttribute(LinkProcessor.ATTRIBUTE_OUTPUT_NAME));

} catch (UnsupportedEncodingException e) {
e.printStackTrace();
Expand Down

0 comments on commit 7914833

Please sign in to comment.