@Test public void testDeserialize4() throws StreamSerDeException, IOException { SimpleSerDe deser = new SimpleSerDe(); deser.setSchema(schema); String s = ""; assertTrue(deser.deSerialize(s).size() == SupportConst.I_ZERO); }
@Override public List<Object[]> deSerialize(Object data) throws StreamSerDeException { if (data == null) { LOG.info("Input raw data is null."); return nullResults; } String sData = data.toString(); if (Strings.isNullOrEmpty(sData)) { LOG.info("Input raw data is null."); return nullResults; } List<Object[]> splitResults = Lists.newArrayList(); Object[] values = StreamingUtils.splitByWholeSeparator(sData, separator, -1, true); splitResults.add(values); return createAllInstance(splitResults); }
SimpleSerDe extends BaseSerDe { @Override public List<Object[]> deSerialize(Object data) throws StreamSerDeException { if (data == null) { LOG.info("Input raw data is null."); return nullResults; } String sData = data.toString(); if (Strings.isNullOrEmpty(sData)) { LOG.info("Input raw data is null."); return nullResults; } List<Object[]> splitResults = Lists.newArrayList(); Object[] values = StreamingUtils.splitByWholeSeparator(sData, separator, -1, true); splitResults.add(values); return createAllInstance(splitResults); } }
SimpleSerDe extends BaseSerDe { @Override public List<Object[]> deSerialize(Object data) throws StreamSerDeException { if (data == null) { LOG.info("Input raw data is null."); return nullResults; } String sData = data.toString(); if (Strings.isNullOrEmpty(sData)) { LOG.info("Input raw data is null."); return nullResults; } List<Object[]> splitResults = Lists.newArrayList(); Object[] values = StreamingUtils.splitByWholeSeparator(sData, separator, -1, true); splitResults.add(values); return createAllInstance(splitResults); }  }
SimpleSerDe extends BaseSerDe { @Override public List<Object[]> deSerialize(Object data) throws StreamSerDeException { if (data == null) { LOG.info("Input raw data is null."); return nullResults; } String sData = data.toString(); if (Strings.isNullOrEmpty(sData)) { LOG.info("Input raw data is null."); return nullResults; } List<Object[]> splitResults = Lists.newArrayList(); Object[] values = StreamingUtils.splitByWholeSeparator(sData, separator, -1, true); splitResults.add(values); return createAllInstance(splitResults); }  @Override void setConfig(StreamingConfig conf); @Override void initialize(); @Override List<Object[]> deSerialize(Object data); @Override Object serialize(List<Object[]> event); }
SimpleSerDe extends BaseSerDe { @Override public List<Object[]> deSerialize(Object data) throws StreamSerDeException { if (data == null) { LOG.info("Input raw data is null."); return nullResults; } String sData = data.toString(); if (Strings.isNullOrEmpty(sData)) { LOG.info("Input raw data is null."); return nullResults; } List<Object[]> splitResults = Lists.newArrayList(); Object[] values = StreamingUtils.splitByWholeSeparator(sData, separator, -1, true); splitResults.add(values); return createAllInstance(splitResults); }  @Override void setConfig(StreamingConfig conf); @Override void initialize(); @Override List<Object[]> deSerialize(Object data); @Override Object serialize(List<Object[]> event); static final String LINE_SEPARATOR_UNIX; }