Member since
06-24-2017
4
Posts
0
Kudos Received
0
Solutions
02-20-2018
11:48 AM
hi, grovy code below to get flow file:-
attrMap = ['myAttr1': '1', 'myAttr2': Integer.toString(2)]
flowFile = session.get()
if(!flowFile) return
flowFile = session.putAllAttributes(flowFile, attrMap)
grovy code below to run java jar def command = "java -jar UpdateAppIdXMLRequest.jar file.xml" def process = command.execute() process.waitFor() def output = process.in.text log.info output my question is how to pass flow file to java jar command. Shall i deserilized to disk and pass as file to java command as input file?
... View more
07-24-2017
11:38 AM
I have start ,end time named attribute as show below data . I am trying to add 5 minute using date format but keep getting exceptions due to illegal format exception. tried all options EndTime
2017-04-15T10:10:00.666Z StartTime
2017-04-15T10:05:00.666Z {
"StartTime": "${StartTime:toDate("yyyy-mm-ddTHH:mm:ss.SSSZ"):toNumber():plus(300000):format("yyyy-mm-ddTHH:mm:ss.SSSZ")}",
"EndTime": "${EndTime:toDate("yyyy-mm-ddTHH:mm:ss.SSSZ"):toNumber():plus(300000):format("yyyy-mm-ddTHH:mm:ss.SSSZ")}"
} {
"StartTime": "${StartTime:toDate("yyyy-mm-ddTHH:mm:ss.SSS'Z'"):toNumber():plus(300000):format("yyyy-mm-ddTHH:mm:ss.SSSZ")}",
"EndTime": "${EndTime:toDate("yyyy-mm-ddTHH:mm:ss.SSSZ"):toNumber():plus(300000):format("yyyy-mm-ddTHH:mm:ss.SSSZ")}"
} getting exception .
... View more
Labels:
- Labels:
-
Apache NiFi