@Test public void testConvertRecord() throws DataConversionException { TextToStringConverter textToStringConverter = (TextToStringConverter) new TextToStringConverter().init(new WorkUnitState()); Text text = new Text("test"); Iterator<String> iterator = textToStringConverter.convertRecord(null, text, new WorkUnitState()).iterator(); Assert.assertTrue(iterator.hasNext()); String textString = iterator.next(); Assert.assertEquals(textString, text.toString()); Assert.assertFalse(iterator.hasNext()); }
@Override public Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit) throws DataConversionException { return new SingleRecordIterable<String>(inputRecord.toString()); }
TextToStringConverter extends Converter<Object, Object, Text, String> { @Override public Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit) throws DataConversionException { return new SingleRecordIterable<String>(inputRecord.toString()); } }
TextToStringConverter extends Converter<Object, Object, Text, String> { @Override public Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit) throws DataConversionException { return new SingleRecordIterable<String>(inputRecord.toString()); }  }
TextToStringConverter extends Converter<Object, Object, Text, String> { @Override public Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit) throws DataConversionException { return new SingleRecordIterable<String>(inputRecord.toString()); }  @Override Converter<Object, Object, Text, String> init(WorkUnitState workUnit); @Override Object convertSchema(Object inputSchema, WorkUnitState workUnit); @Override Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit); }
TextToStringConverter extends Converter<Object, Object, Text, String> { @Override public Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit) throws DataConversionException { return new SingleRecordIterable<String>(inputRecord.toString()); }  @Override Converter<Object, Object, Text, String> init(WorkUnitState workUnit); @Override Object convertSchema(Object inputSchema, WorkUnitState workUnit); @Override Iterable<String> convertRecord(Object outputSchema, Text inputRecord, WorkUnitState workUnit);  }