@Ignore @Test public void testDeserialize1() throws StreamSerDeException, IOException { SimpleSerDe deser = new SimpleSerDe(); deser.setSchema(schema); String s = "0,USER4,1379927089198,,USER4,RETL0,TERM_RETL0,2,RETL0,,CN,GZ,XA,02," + "29539.825183043013,29539.825183043013,CNY,4923.304197173836," + "2759854263445,null,null,false,,6,10,002,0210,000,,,903,,,,,,,,,,,,,," + "710076,,00,20164.96066506037,0,,,,,,,0,0,,,,null,0,,0.0,,,,"; int len = deser.deSerialize(s).get(0).length; assertTrue(len == I_68); }
@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; }