org.apache.hadoop.mapred.gridmix
Class RoundRobinUserResolver

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

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


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
RoundRobinUserResolver()
           
 
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 userloc, 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

RoundRobinUserResolver

public RoundRobinUserResolver()
Method Detail

setTargetUsers

public boolean setTargetUsers(URI userloc,
                              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:
userloc - 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.

RoundRobinUserResolver needs to map the users in the trace to the provided list of target users. So user list is needed.

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