public static String compatibleFieldName(String original){
  if (!original.matches("^[A-Za-z_].*")) {
    return "_" + original;
  }
 else {
    return original;
  }
}

public static String compatibleFieldName ( String original ) { if ( ! original . matches ( "^[A-Za-z_].*" ) ) { return "_" + original ; } else { return original ; } }
the original field name adjusted , if necessary , to conform to avro ' s field name requirements by prefixing it with an underscore .
