Example #1
0
 public void processFunctionArgs(LogMeta lm, String args) {
   args = args.trim();
   field = lm.getFieldMeta(args);
   if (field == null) {
     if (args.indexOf('(') > -1) {
       child = UtilMethods.processStringFunction(lm, args);
     } else {
       throw new IllegalArgumentException("Unknown field: " + args);
     }
   }
 }
Example #2
0
 public void processFunctionArgs(LogMeta lm, String args) {
   ArgumentsTokenizer at = new ArgumentsTokenizer(args);
   field = lm.getFieldMeta(at.nextToken());
   if (field == null) throw new IllegalArgumentException("Unknown field: " + args);
   switch (field.getActualType()) {
     case FieldMeta.FIELD_STRING:
       numberField = false;
       break;
     case FieldMeta.FIELD_INTEGER:
       numberField = true;
       break;
     default:
       throw new IllegalArgumentException(
           "inttoip function can only be used on int or string field");
   }
 }