@Test public void testMapperAnonymize_noPattern() { MapAnonymizeDescriptorImpl mapAnonymizeDescriptorImpl = new MapAnonymizeDescriptorImpl(); MapperAnonymize mapperAnonymize = new MapperAnonymize(); assertFalse("Was not able to initialize!", mapperAnonymize.init(null, null, "someField", null, mapAnonymizeDescriptorImpl)); }
@Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); pattern = ((MapAnonymizeDescriptor)mapFieldDescriptor).getPattern(); if (StringUtils.isEmpty(pattern)) { logger.fatal("pattern is empty."); return false; } patternParts = Splitter.on("<hide>").omitEmptyStrings().split(pattern); hideChar = CharUtils.toChar(((MapAnonymizeDescriptor)mapFieldDescriptor).getHideChar(), DEFAULT_HIDE_CHAR); return true; }
MapperAnonymize extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); pattern = ((MapAnonymizeDescriptor)mapFieldDescriptor).getPattern(); if (StringUtils.isEmpty(pattern)) { logger.fatal("pattern is empty."); return false; } patternParts = Splitter.on("<hide>").omitEmptyStrings().split(pattern); hideChar = CharUtils.toChar(((MapAnonymizeDescriptor)mapFieldDescriptor).getHideChar(), DEFAULT_HIDE_CHAR); return true; } }
MapperAnonymize extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); pattern = ((MapAnonymizeDescriptor)mapFieldDescriptor).getPattern(); if (StringUtils.isEmpty(pattern)) { logger.fatal("pattern is empty."); return false; } patternParts = Splitter.on("<hide>").omitEmptyStrings().split(pattern); hideChar = CharUtils.toChar(((MapAnonymizeDescriptor)mapFieldDescriptor).getHideChar(), DEFAULT_HIDE_CHAR); return true; }  }
MapperAnonymize extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); pattern = ((MapAnonymizeDescriptor)mapFieldDescriptor).getPattern(); if (StringUtils.isEmpty(pattern)) { logger.fatal("pattern is empty."); return false; } patternParts = Splitter.on("<hide>").omitEmptyStrings().split(pattern); hideChar = CharUtils.toChar(((MapAnonymizeDescriptor)mapFieldDescriptor).getHideChar(), DEFAULT_HIDE_CHAR); return true; }  @Override boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor); @Override Object apply(Map<String, Object> jsonObj, Object value); }
MapperAnonymize extends Mapper<LogFeederProps> { @Override public boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) { init(inputDesc, fieldName, mapClassCode); pattern = ((MapAnonymizeDescriptor)mapFieldDescriptor).getPattern(); if (StringUtils.isEmpty(pattern)) { logger.fatal("pattern is empty."); return false; } patternParts = Splitter.on("<hide>").omitEmptyStrings().split(pattern); hideChar = CharUtils.toChar(((MapAnonymizeDescriptor)mapFieldDescriptor).getHideChar(), DEFAULT_HIDE_CHAR); return true; }  @Override boolean init(LogFeederProps logFeederProps, String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor); @Override Object apply(Map<String, Object> jsonObj, Object value);  }