@Test(expectedExceptions = IllegalArgumentException.class) public void testInit() { WorkUnitState workUnitState = new WorkUnitState(); StringSplitterConverter converter = new StringSplitterConverter(); converter.init(workUnitState); }
@Override public Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit) { String stringSplitterDelimiterKey = ForkOperatorUtils.getPropertyNameForBranch( workUnit, ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); Preconditions.checkArgument(workUnit.contains(stringSplitterDelimiterKey), "Cannot use " + this.getClass().getName() + " with out specifying " + ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); this.splitter = Splitter.on(workUnit.getProp(stringSplitterDelimiterKey)).omitEmptyStrings(); return this; }
StringSplitterConverter extends Converter<Class<String>, Class<String>, String, String> { @Override public Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit) { String stringSplitterDelimiterKey = ForkOperatorUtils.getPropertyNameForBranch( workUnit, ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); Preconditions.checkArgument(workUnit.contains(stringSplitterDelimiterKey), "Cannot use " + this.getClass().getName() + " with out specifying " + ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); this.splitter = Splitter.on(workUnit.getProp(stringSplitterDelimiterKey)).omitEmptyStrings(); return this; } }
StringSplitterConverter extends Converter<Class<String>, Class<String>, String, String> { @Override public Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit) { String stringSplitterDelimiterKey = ForkOperatorUtils.getPropertyNameForBranch( workUnit, ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); Preconditions.checkArgument(workUnit.contains(stringSplitterDelimiterKey), "Cannot use " + this.getClass().getName() + " with out specifying " + ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); this.splitter = Splitter.on(workUnit.getProp(stringSplitterDelimiterKey)).omitEmptyStrings(); return this; }  }
StringSplitterConverter extends Converter<Class<String>, Class<String>, String, String> { @Override public Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit) { String stringSplitterDelimiterKey = ForkOperatorUtils.getPropertyNameForBranch( workUnit, ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); Preconditions.checkArgument(workUnit.contains(stringSplitterDelimiterKey), "Cannot use " + this.getClass().getName() + " with out specifying " + ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); this.splitter = Splitter.on(workUnit.getProp(stringSplitterDelimiterKey)).omitEmptyStrings(); return this; }  @Override Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit); @Override Class<String> convertSchema(Class<String> inputSchema, WorkUnitState workUnit); @Override Iterable<String> convertRecord(Class<String> outputSchema, String inputRecord, WorkUnitState workUnit); }
StringSplitterConverter extends Converter<Class<String>, Class<String>, String, String> { @Override public Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit) { String stringSplitterDelimiterKey = ForkOperatorUtils.getPropertyNameForBranch( workUnit, ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); Preconditions.checkArgument(workUnit.contains(stringSplitterDelimiterKey), "Cannot use " + this.getClass().getName() + " with out specifying " + ConfigurationKeys.CONVERTER_STRING_SPLITTER_DELIMITER); this.splitter = Splitter.on(workUnit.getProp(stringSplitterDelimiterKey)).omitEmptyStrings(); return this; }  @Override Converter<Class<String>, Class<String>, String, String> init(WorkUnitState workUnit); @Override Class<String> convertSchema(Class<String> inputSchema, WorkUnitState workUnit); @Override Iterable<String> convertRecord(Class<String> outputSchema, String inputRecord, WorkUnitState workUnit);  }