Package org.apache.storm.security.auth

## Class ShellBasedGroupsMapping

- java.lang.Object
- - org.apache.storm.security.auth.ShellBasedGroupsMapping

- All Implemented Interfaces:
    `IGroupMappingServiceProvider`

      public class ShellBasedGroupsMapping
      extends Object
      implements IGroupMappingServiceProvider

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `RotatingMap<String,​Set<String>>` | `cachedGroups` |
    `static org.slf4j.Logger` | `LOG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ShellBasedGroupsMapping()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Set<String>` | `getGroups​(String user)` | Returns list of groups for a user.
    `void` | `prepare​(Map<String,​Object> topoConf)` | Invoked once immediately after construction.

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

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

- - ### Field Detail

    - #### LOG

          public static final org.slf4j.Logger LOG

    - #### cachedGroups

          public RotatingMap<String,​Set<String>> cachedGroups

  - ### Constructor Detail

    - #### ShellBasedGroupsMapping

          public ShellBasedGroupsMapping()

  - ### Method Detail

    - #### prepare

          public void prepare​(Map<String,​Object> topoConf)

      Invoked once immediately after construction.
      Specified by:
        `prepare` in interface `IGroupMappingServiceProvider`
      Parameters:
        `topoConf` - Storm configuration

    - #### getGroups

          public Set<String> getGroups​(String user)
                                throws IOException

      Returns list of groups for a user.
      Specified by:
        `getGroups` in interface `IGroupMappingServiceProvider`
      Parameters:
        `user` - get groups for this user
      Returns:
        list of groups for a given user
      Throws:
        `IOException`