public class JsonRecordReader extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JsonRecordReader.Handler
Implement this interface to stream records as and when one is found.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
consumeTillMatchingEnd(org.noggit.JSONParser parser,
int obj,
int arr) |
List<Map<String,Object>> |
getAllRecords(Reader r)
Uses
streamRecords to getInst the JSON source but with
a handler that collects all the emitted records into a single List which
is returned upon completion. |
static JsonRecordReader |
getInst(String split,
List<String> fieldMappings) |
static List<Object> |
parseArrayFieldValue(int ev,
org.noggit.JSONParser parser,
org.apache.solr.common.util.JsonRecordReader.MethodFrameWrapper runnable) |
static Object |
parseSingleFieldValue(int ev,
org.noggit.JSONParser parser,
org.apache.solr.common.util.JsonRecordReader.MethodFrameWrapper runnable) |
void |
streamRecords(org.noggit.JSONParser parser,
JsonRecordReader.Handler handler) |
void |
streamRecords(Reader r,
JsonRecordReader.Handler handler)
Creates an JSONParser on top of whatever reader has been
configured.
|
public static JsonRecordReader getInst(String split, List<String> fieldMappings)
public List<Map<String,Object>> getAllRecords(Reader r) throws IOException
streamRecords to getInst the JSON source but with
a handler that collects all the emitted records into a single List which
is returned upon completion.r - the stream readerIOExceptionpublic void streamRecords(Reader r, JsonRecordReader.Handler handler) throws IOException
r - the stream readerhandler - The callback instanceIOExceptionpublic void streamRecords(org.noggit.JSONParser parser,
JsonRecordReader.Handler handler)
throws IOException
IOExceptionpublic static Object parseSingleFieldValue(int ev, org.noggit.JSONParser parser, org.apache.solr.common.util.JsonRecordReader.MethodFrameWrapper runnable) throws IOException
IOExceptionpublic static List<Object> parseArrayFieldValue(int ev, org.noggit.JSONParser parser, org.apache.solr.common.util.JsonRecordReader.MethodFrameWrapper runnable) throws IOException
IOExceptionpublic static void consumeTillMatchingEnd(org.noggit.JSONParser parser,
int obj,
int arr)
throws IOException
IOExceptionCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.