private NumberType convertNumberType(JsonParser.NumberType numberType) { switch (numberType) { case INT: return NumberType.INT; case LONG: return NumberType.LONG; case FLOAT: return NumberType.FLOAT; case DOUBLE: return NumberType.DOUBLE; case BIG_INTEGER: return NumberType.DOUBLE; case BIG_DECIMAL: return NumberType.DOUBLE; } throw new EsHadoopSerializationException("No matching token for number_type [" + numberType + "]"); }
throw new UnsupportedOperationException(); throw new EsHadoopSerializationException("No matching token for json_token [" + token + "]");
@Override public void skipChildren() { try { parser.skipChildren(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public double doubleValue() { try { return parser.getDoubleValue(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public byte[] binaryValue() { try { return parser.getBinaryValue(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeString(String text) { try { generator.writeString(text); return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeNumber(int i) { try { generator.writeNumber(i); return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeNull() { try { generator.writeNull(); return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public String currentName() { try { return parser.getCurrentName(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public long longValue() { try { return parser.getLongValue(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public void close() { try { parser.close(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeEndObject() { try { generator.writeEndObject(); currentName = currentPath.pollLast(); currentPathCached = null; return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public short shortValue() { try { return parser.getShortValue(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public int intValue() { try { return parser.getIntValue(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeNumber(float f) { try { generator.writeNumber(f); return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public void close() { try { generator.close(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
public JacksonJsonParser(InputStream in) { try { this.parser = JSON_FACTORY.createJsonParser(in); richerParser = (parser instanceof JsonParserBase ? (JsonParserBase) parser : null); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public float floatValue() { try { return parser.getFloatValue(); } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeBeginArray() { try { generator.writeStartArray(); return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }
@Override public Generator writeEndArray() { try { generator.writeEndArray(); return this; } catch (IOException ex) { throw new EsHadoopSerializationException(ex); } }