Hello all,

Why I got out of memory during processing the file with ExecuteGroovyScript?
 
The size of file could be reach a maxsize to 190Mo
Error : ExecuteGroovyScript[id=07e5314d-b20a-1076-882b-54b44baca66d] java.lang.OutOfMemoryError: Java heap space: java.lang.OutOfMemoryError: Java heap space

The groovy is very simple : 

        // get data from flowfile
        text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)

        // add timestamp in each line in the text/flowfile
        text = text.replaceAll(/^/, "\"timestamp\":\"$timestamp\",")
        
        // write back to the flowfile
        outputStream.write(text.getBytes(StandardCharsets.UTF_8))

Could you help me to process if it is not the good way to do this thing ?

Thanks

Minh
 
 

Reply via email to