mirror of
https://github.com/apache/nifi.git
synced 2025-03-06 17:39:36 +00:00
NIFI-8437 RecordReader 'Infer Schema' for large records may throw BufferedInputStream error
This closes #5011. Signed-off-by: Mark Payne <markap14@hotmail.com>
This commit is contained in:
parent
92bdc23adb
commit
9f45b48866
@ -46,7 +46,6 @@ import org.apache.nifi.serialization.SchemaRegistryService;
|
||||
import org.apache.nifi.serialization.record.RecordSchema;
|
||||
import org.codehaus.jackson.JsonNode;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
@ -164,9 +163,8 @@ public class JsonPathReader extends SchemaRegistryService implements RecordReade
|
||||
@Override
|
||||
public RecordReader createRecordReader(final Map<String, String> variables, final InputStream in, final long inputLength, final ComponentLog logger)
|
||||
throws IOException, MalformedRecordException, SchemaNotFoundException {
|
||||
final InputStream bufferedIn = new BufferedInputStream(in);
|
||||
final RecordSchema schema = getSchema(variables, bufferedIn, null);
|
||||
return new JsonPathRowRecordReader(jsonPaths, schema, bufferedIn, logger, dateFormat, timeFormat, timestampFormat);
|
||||
final RecordSchema schema = getSchema(variables, in, null);
|
||||
return new JsonPathRowRecordReader(jsonPaths, schema, in, logger, dateFormat, timeFormat, timestampFormat);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user