Github user jagdeepsingh2 commented on a diff in the pull request:
https://github.com/apache/metron/pull/1245#discussion_r234872742
--- Diff:
metron-platform/metron-common/src/main/java/org/apache/metron/common/Constants.java
---
@@ -127,5 +127,48 @@ public String getType() {
}
}
+ public static enum ParserConfigConstants {
+ //@formatter:off
+ RECORD_TYPE("recordType"),
+ RECORD_TYPE_REGEX("recordTypeRegex"),
+ REGEX("regex"),
+ FIELDS("fields"),
+ MESSAGE_HEADER("messageHeaderRegex"),
+ ORIGINAL("original_string"),
+ TIMESTAMP("timestamp"),
+ CONVERT_CAMELCASE_TO_UNDERSCORE("convertCamelCaseToUnderScore");
+ //@formatter:on
+ private final String name;
+ private static Map<String, ParserConfigConstants> nameToField;
+
+ static {
+ nameToField = new HashMap<>();
+ for (final ParserConfigConstants f : ParserConfigConstants.values())
{
+ nameToField.put(f.getName(), f);
+ }
+ }
+
+
+ ParserConfigConstants(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ static {
--- End diff --
Removed the duplicate.
---