GetGroupsBase (Hadoop 0.20.2-cdh3u3 API)
Date: 2012-03-20

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.tools
Class GetGroupsBase

    java.lang.Object
      org.apache.hadoop.conf.Configured
          org.apache.hadoop.tools.GetGroupsBase

All Implemented Interfaces:
  Configurable, Tool

Direct Known Subclasses:
  GetGroups

    public abstract class GetGroupsBase

extends Configured
implements Tool

Base class for the HDFS and MR implementations of tools which fetch and display the groups that users belong to.

Constructor Summary
`protected` | `GetGroupsBase(Configuration conf)` Create an instance of this tool using the given configuration.
`protected` | `GetGroupsBase(Configuration conf, PrintStream out)` Used exclusively for testing.

Method Summary
`protected abstract InetSocketAddress` | `getProtocolAddress(Configuration conf)` Must be overridden by subclasses to get the address where the `GetUserMappingsProtocol` implementation is running.
`int` | `run(String[] args)` Get the groups for the users given and print formatted output to the `PrintStream` configured earlier.

Methods inherited from class org.apache.hadoop.conf.Configured
`getConf, setConf`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.apache.hadoop.conf.Configurable
`getConf, setConf`

Constructor Detail

### GetGroupsBase

    protected GetGroupsBase(Configuration conf)

  Create an instance of this tool using the given configuration.

  Parameters:
    `conf` -

### GetGroupsBase

    protected GetGroupsBase(Configuration conf,
                            PrintStream out)

  Used exclusively for testing.

  Parameters:
    `conf` - The configuration to use.
    `out` - The PrintStream to write to, instead of System.out

Method Detail

### run

    public int run(String[] args)
            throws Exception

  Get the groups for the users given and print formatted output to the `PrintStream` configured earlier.

  Specified by:
    `run` in interface `Tool`
  Parameters:
    `args` - command specific arguments.
  Returns:
    exit code.
  Throws:
    `Exception`

### getProtocolAddress

    protected abstract InetSocketAddress getProtocolAddress(Configuration conf)
                                                     throws IOException

  Must be overridden by subclasses to get the address where the `GetUserMappingsProtocol` implementation is running.

  Parameters:
    `conf` - The configuration to use.
  Returns:
    The address where the service is listening.
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation