org.apache.storm.daemon.supervisor

## Class SupervisorUtils

- java.lang.Object
- - org.apache.storm.daemon.supervisor.SupervisorUtils

-     public class SupervisorUtils
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SupervisorUtils()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `blobNeedsWorkerRestart(Map<String,Object> blobInfo)` Given the blob information returns the value of the workerRestart field, handling it either being a string or a boolean value, or if it’s not specified then returns false.
    `static List<LocalResource>` | `blobstoreMapToLocalresources(Map<String,Map<String,Object>> blobstoreMap)` Returns a list of LocalResources based on the blobstore-map passed in
    `static boolean` | `isWorkerHbTimedOut(int now, LSWorkerHeartbeat whb, Map<String,Object> conf)`
    `protected LSWorkerHeartbeat` | `readWorkerHeartbeatImpl(Map<String,Object> conf, String workerId)`
    `static Map<String,LSWorkerHeartbeat>` | `readWorkerHeartbeats(Map<String,Object> conf)` map from worker id to heartbeat
    `Map<String,LSWorkerHeartbeat>` | `readWorkerHeartbeatsImpl(Map<String,Object> conf)`
    `static void` | `resetInstance()`
    `static void` | `rmrAsUser(Map<String,Object> conf, String id, String path)`
    `static void` | `setInstance(SupervisorUtils u)`
    `static boolean` | `shouldUncompressBlob(Map<String,Object> blobInfo)` Given the blob information returns the value of the uncompress field, handling it either being a string or a boolean value, or if it’s not specified then returns false
    `static Collection<String>` | `supervisorWorkerIds(Map<String,Object> conf)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SupervisorUtils

          public SupervisorUtils()

  - ### Method Detail

    - #### setInstance

          public static void setInstance(SupervisorUtils u)

    - #### resetInstance

          public static void resetInstance()

    - #### rmrAsUser

          public static void rmrAsUser(Map<String,Object> conf,
                                       String id,
                                       String path)
                                throws IOException

      Throws:
        `IOException`

    - #### shouldUncompressBlob

          public static boolean shouldUncompressBlob(Map<String,Object> blobInfo)

      Given the blob information returns the value of the uncompress field, handling it either being a string or a boolean value, or if it’s not specified then returns false

      Parameters:
        `blobInfo` -
      Returns:

    - #### blobNeedsWorkerRestart

          public static boolean blobNeedsWorkerRestart(Map<String,Object> blobInfo)

      Given the blob information returns the value of the workerRestart field, handling it either being a string or a boolean value, or if it’s not specified then returns false.

      Parameters:
        `blobInfo` - the info for the blob.
      Returns:
        true if the blob needs a worker restart by way of the callback else false.

    - #### blobstoreMapToLocalresources

          public static List<LocalResource> blobstoreMapToLocalresources(Map<String,Map<String,Object>> blobstoreMap)

      Returns a list of LocalResources based on the blobstore-map passed in

      Parameters:
        `blobstoreMap` -
      Returns:

    - #### supervisorWorkerIds

          public static Collection<String> supervisorWorkerIds(Map<String,Object> conf)

    - #### readWorkerHeartbeats

          public static Map<String,LSWorkerHeartbeat> readWorkerHeartbeats(Map<String,Object> conf)

      map from worker id to heartbeat

      Parameters:
        `conf` -
      Returns:

    - #### isWorkerHbTimedOut

          public static boolean isWorkerHbTimedOut(int now,
                                                   LSWorkerHeartbeat whb,
                                                   Map<String,Object> conf)

    - #### readWorkerHeartbeatsImpl

          public Map<String,LSWorkerHeartbeat> readWorkerHeartbeatsImpl(Map<String,Object> conf)

    - #### readWorkerHeartbeatImpl

          protected LSWorkerHeartbeat readWorkerHeartbeatImpl(Map<String,Object> conf,
                                                              String workerId)

Copyright © 2019 The Apache Software Foundation. All rights reserved.