Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3143

Unnecessary inclusion of empty match result in Json

    XMLWordPrintableJSON

    Details

      Description

      `FindNMatches()` didn't correctly filter out empty match result in `substringSearch()` and hence send back an empty map to user. I don't know if this the desired behavior but a fix to current behavior will make metrics for logviewer easier to implement.

      An example of current behavior:

      {
          "fileOffset": 1,
          "searchString": "sdf",
          "matches": [
              {
                  "searchString": "sdf",
                  "fileName": "word-count-1-1530815972/6701/worker.log",
                  "matches": [],
                  "port": "6701",
                  "isDaemon": "no",
                  "startByteOffset": 0
              }
          ]
      }
      

      Desired behavior:

      {
          "fileOffset": 1,
          "searchString": "sdf",
          "matches": []
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zhengdai Zhengdai Hu
                Reporter:
                zhengdai Zhengdai Hu
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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