class MapperAnonymize extends Mapper<LogFeederProps> {

  @Override
  public boolean init(String inputDesc, String fieldName, String mapClassCode, MapFieldDescriptor mapFieldDescriptor) {
    init(inputDesc, fieldName, mapClassCode);
    
    pattern = ((MapAnonymizeDescriptor)mapFieldDescriptor).getPattern();
    if (StringUtils.isEmpty(pattern)) {
      LOG.fatal("pattern is empty.");
      return false;
    }
    
    patternParts = Splitter.on("<hide>").omitEmptyStrings().split(pattern);
    hideChar = CharUtils.toChar(((MapAnonymizeDescriptor)mapFieldDescriptor).getHideChar(), DEFAULT_HIDE_CHAR);
    
    return true;
  }

}