Apache nifi apachenifiexecutestream命令

Apache nifi apachenifiexecutestream命令,apache-nifi,processor,Apache Nifi,Processor,我的流程如下所述: GenerateFlowFile Processor that generate 1 byte ==> ReplaceText Processor that replaces everything with 1 ==> ExecuteStreamCommand that calls a java jar file that just additions the entry with 10 executestream命令具有以下参数: Command Argume

我的流程如下所述:

GenerateFlowFile Processor that generate 1 byte ==> ReplaceText Processor that replaces everything with 1 ==> ExecuteStreamCommand that calls a java jar file that just additions the entry with 10
executestream命令具有以下参数:

Command Argument: -jar MyAddition.jar
Command Path : java
jar读入stdin和addition 10并打印输出

在EXCUTESTREAM命令后的队列中,我在流文件中看到未读取参数:

execution.error
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at MyAddition.MyAddition.main(MyAddition.java:12)

如何在executestream命令中将上一个流文件正确传递到jar文件的条目?

您必须从
系统中读取流文件内容。在
中,可以,但如何才能做到这一点?因为当我手动启动时:java-jar MyAddition.jar 1==>它会像预期的那样给我11个,但是这里前面的流文件并不是作为您必须阅读的jar文件的输入。然后学习如何在java中读取InputStream…感谢您提供的线索,我已经使用InputStreamReader进行了尝试,并且效果良好