Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-3249

[tools] Instrumentation log parser

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0.0
    • 5.2.0
    • tools
    • None

    Description

      Oozie instrumentation logs contain a lot of information, but are difficult to parse, because per instrumentation log entry there is always one header line in plain text format (containing timestamp), and multiple other lines in JSON format (not containing timestamp). Those lines of course belong together.

      2018-05-02 02:48:13,426  INFO oozieinstrumentation:520 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] 
      {
      ...
        "counters" : {
      ...
          "callablequeue.executed" : {
            "count" : 5954144
          },
      ...
          "callablequeue.queued" : {
            "count" : 10596129
          },
      ...
        },
      ...
      }
      

      There should be a simple script in tools/bin that takes as parameters:

      • input file name (-i), e.g. -i /path/to/oozie-instrumentation.log
      • output file name (-o), e.g. -o /path/to/oozie-instrumentation.log.out
      • parameters to extract (-p) in the format of path/to/json/value1,path/to/json/value2, in this case -p counters/callablequeue.executed/count,counters/callablequeue.queued/count

      The output file should contain in CSV format:

      • a header line containing column names for
      • one line per parsed input header / JSON lines, containing:
        • first cell is the minutes part of the timestamp
        • consecutive cells are parsed JSON values given each parameter to extract

      Attachments

        1. oozie-instrumentation-localhost.log.2018-05-09.out
          6 kB
          Andras Piros
        2. oozie-instrumentation-localhost.log.2018-05-09
          15.84 MB
          Andras Piros
        3. OOZIE-3249.004.patch
          6 kB
          Andras Piros
        4. OOZIE-3249.003.patch
          6 kB
          Andras Piros
        5. OOZIE-3249.002.patch
          6 kB
          Andras Piros
        6. OOZIE-3249.001.patch
          4 kB
          Andras Piros

        Activity

          People

            andras.piros Andras Piros
            andras.piros Andras Piros
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: