Class HttpdUtils

java.lang.Object
org.apache.drill.exec.store.httpd.HttpdUtils

public class HttpdUtils extends Object
  • Field Details

  • Constructor Details

    • HttpdUtils

      public HttpdUtils()
  • Method Details

    • drillFormattedFieldName

      public static String drillFormattedFieldName(String parserFieldName)
      Drill cannot deal with fields with dots in them like request.referer. For the sake of simplicity we are going ensure the field name is cleansed. The resultant output field will look like: request_referer.
      Additionally, wild cards will get replaced with _$
      Parameters:
      parserFieldName - name to be cleansed.
      Returns:
      The field name formatted for Drill
    • isWildcard

      public static boolean isWildcard(String fieldName)
      Returns true if the field is a wildcard AKA map field, false if not.
      Parameters:
      fieldName - The target field name
      Returns:
      True if the field is a wildcard, false if not
    • getFieldNameFromMap

      public static String getFieldNameFromMap(String mapField)
      The HTTPD parser formats fields using the format HTTP.URI:request.firstline.uri.query. For maps, we only want the last part of this, so this function returns the last bit of the field name.
      Parameters:
      mapField - The unformatted field name
      Returns:
      The last part of the field name