Uploaded image for project: 'REEF'
  1. REEF
  2. REEF-1020

Improve OSUtils to support Windows and Mac

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: None
    • Fix Version/s: 0.14
    • Component/s: REEF-Common
    • Labels:
      None

      Description

      As of today, OSUtils in reef-common module only supports Linux in the following functions.

      • `getPID()`
      • `kill()`

      This issue improves OSUtils to support Windows and Mac by implementing the following items.

      • For `OSUtils.isLinux`, it returns true for both Linux and Mac. This enables `getPID()` and `kill()` on Mac.
      • For `OSUtils.getPID()`, it uses `powershell -Command wmic process where processid=$pid get parentprocessid` to get pid in Windows.
      • For `OSUtils.kill()`, it uses `taskkill /pid` for Windows.
      • Add OSUtilsTest.java

      Also, this issue fixes the followings.

      • Add No-Op `ActiveContextHandler` to EvaluatorFailureDuringAlarmDriver. `DefaultContextActiveHandler` suicides by closing itself.
      • `RunnableProcess` cleans up both linux and windows.
      • `RunnableProcess` catches `NumberFormatException` from `RunnableProcess.readPID()`.
      • Bind `PIDStoreStartHandler` to `LocalRuntimeConfiguration`.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dongjoon Dongjoon Hyun
                Reporter:
                dongjoon Dongjoon Hyun
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: