Эх сурвалжийг харах

HUE-4657 [indexer] A failed grok match attempt will stop indexing

peddle 9 жил өмнө
parent
commit
65a713cdba

+ 25 - 5
desktop/libs/indexer/src/data/oozie_workspace/grok_operation.conf

@@ -18,10 +18,30 @@
 # field
 # operation
 {
-  grok {
-    dictionaryFiles : ["grok_dictionaries"]
-    expressions : {
-      ${field['name']}: """${operation['settings']['regexp']}"""
-    }
+  if{
+    conditions : [
+      # check if grok will match
+      {
+        grok {
+          dictionaryFiles : ["grok_dictionaries"]
+          expressions : {
+            ${field['name']}: """${operation['settings']['regexp']}"""
+          }
+        }
+      }
+    ]
+    then : [
+      {
+        grok {
+          dictionaryFiles : ["grok_dictionaries"]
+          expressions : {
+            ${field['name']}: """${operation['settings']['regexp']}"""
+          }
+        }
+      }
+    ]
+    else : [
+      { logDebug { format : "Grok failed to match: {}", args : ["@{}"] } }
+    ]
   }
 }