Search in sources :

Example 1 with RuntimeIOException

use of org.apache.parquet.cli.util.RuntimeIOException in project parquet-mr by apache.

the class AvroJson method parser.

public static Iterator<JsonNode> parser(final InputStream stream) {
    try {
        JsonParser parser = FACTORY.createParser(stream);
        parser.setCodec(new ObjectMapper());
        return parser.readValuesAs(JsonNode.class);
    } catch (IOException e) {
        throw new RuntimeIOException("Cannot read from stream", e);
    }
}
Also used : RuntimeIOException(org.apache.parquet.cli.util.RuntimeIOException) RuntimeIOException(org.apache.parquet.cli.util.RuntimeIOException) IOException(java.io.IOException) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) JsonParser(com.fasterxml.jackson.core.JsonParser)

Aggregations

JsonParser (com.fasterxml.jackson.core.JsonParser)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 IOException (java.io.IOException)1 RuntimeIOException (org.apache.parquet.cli.util.RuntimeIOException)1