Uploaded image for project: 'Metron (Retired)'
  1. Metron (Retired)
  2. METRON-2284

Metron Profiler for Spark doesn't work as expected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • 0.7.1
    • Next + 1
    • None

    Description

      Used command:

      /usr/hdp/current/spark2-client/bin/spark-submit --class org.apache.metron.profiler.spark.cli.BatchProfilerCLI --properties-file /usr/hcp/current/metron/config/batch-profiler.properties ~/metron-profiler-spark-0.7.1.1.9.1.0-6.jar --config /usr/hcp/current/metron/config/batch-profiler.properties --profiles ~/profiler.json
      

       cat /usr/hcp/current/metron/config/batch-profiler.properties

      profiler.batch.input.path=/tmp/test_data.logs
      profiler.batch.input.format=json
      profiler.period.duration=15
      profiler.period.duration.units=MINUTES
      

       
      cat ~/profiler.json

      {
       "profiles":[
         {
           "profile":"batchtest5",
           "onlyif":"source.type == 'testsource' and devicehostname == 'windows9.something.com'",
           "foreach":"devicehostname",
           "init":{
             "val":"SET_INIT()"
           },
           "update":{
             "val":"SET_ADD(val, IS_EMPTY(devicehostname))"
           },
          "result":{
             "profile":"val"
          }
         }
       ],
       "timestampField":"timestamp"
      }
      

       cat test_data.logs

      {"devicehostname": "windows9.something.com", "timestamp": 1567241981000, "source.type": "testsource"}
      

      Stellar statement

      PROFILE_GET('batchtest5', 'windows9.something.com', PROFILE_FIXED(100, 'DAYS'))
      

      Returns:

      [[true]]
      

      Expected result:

      [[false]]
      

      Attachments

        Issue Links

          Activity

            People

              nickwallen Nick Allen
              dms1122 Maxim Dashenko
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h