org.apache.hadoop.mapred.gridmix
Class SubmitterUserResolver

java.lang.Object
  extended by org.apache.hadoop.mapred.gridmix.SubmitterUserResolver
All Implemented Interfaces:
org.apache.hadoop.mapred.gridmix.UserResolver

public class SubmitterUserResolver
extends Object
implements org.apache.hadoop.mapred.gridmix.UserResolver

Resolves all UGIs to the submitting user.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
SubmitterUserResolver()
           
 
Method Summary
 org.apache.hadoop.security.UserGroupInformation getTargetUgi(org.apache.hadoop.security.UserGroupInformation ugi)
          Map the given UGI to another per the subclass contract.
 boolean needsTargetUsersList()
          Indicates whether this user resolver needs a list of target users to be provided.
 boolean setTargetUsers(URI userdesc, org.apache.hadoop.conf.Configuration conf)
          Configure the user map given the URI and configuration.
 
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.apache.commons.logging.Log LOG
Constructor Detail

SubmitterUserResolver

public SubmitterUserResolver()
                      throws IOException
Throws:
IOException
Method Detail

setTargetUsers

public boolean setTargetUsers(URI userdesc,
                              org.apache.hadoop.conf.Configuration conf)
                       throws IOException
Description copied from interface: org.apache.hadoop.mapred.gridmix.UserResolver
Configure the user map given the URI and configuration. The resolver's contract will define how the resource will be interpreted, but the default will typically interpret the URI as a Path listing target users. This method should be called only if UserResolver.needsTargetUsersList() returns true.

Specified by:
setTargetUsers in interface org.apache.hadoop.mapred.gridmix.UserResolver
Parameters:
userdesc - URI from which user information may be loaded per the subclass contract.
conf - The tool configuration.
Returns:
true if the resource provided was used in building the list of target users
Throws:
IOException

getTargetUgi

public org.apache.hadoop.security.UserGroupInformation getTargetUgi(org.apache.hadoop.security.UserGroupInformation ugi)
Description copied from interface: org.apache.hadoop.mapred.gridmix.UserResolver
Map the given UGI to another per the subclass contract.

Specified by:
getTargetUgi in interface org.apache.hadoop.mapred.gridmix.UserResolver
Parameters:
ugi - User information from the trace.

needsTargetUsersList

public boolean needsTargetUsersList()
Indicates whether this user resolver needs a list of target users to be provided.

Since SubmitterUserResolver returns the user name who is running gridmix, it doesn't need a target list of users.

Specified by:
needsTargetUsersList in interface org.apache.hadoop.mapred.gridmix.UserResolver
Returns:
true if a list of target users is to be provided for this user resolver


Copyright © 2009 The Apache Software Foundation