org.apache.hadoop.mapred.gridmix
Interface UserResolver

All Known Implementing Classes:
EchoUserResolver, RoundRobinUserResolver, SubmitterUserResolver

@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface UserResolver

Maps users in the trace to a set of valid target users on the test cluster.


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.
 

Method Detail

setTargetUsers

boolean setTargetUsers(URI userdesc,
                       org.apache.hadoop.conf.Configuration conf)
                       throws IOException
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 needsTargetUsersList() returns true.

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

org.apache.hadoop.security.UserGroupInformation getTargetUgi(org.apache.hadoop.security.UserGroupInformation ugi)
Map the given UGI to another per the subclass contract.

Parameters:
ugi - User information from the trace.

needsTargetUsersList

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

Returns:
true if a list of target users is to be provided for this user resolver


Copyright © 2012 Apache Software Foundation. All Rights Reserved.