@Override
public void requestInstance(final JobID jobID, final Configuration conf,
final InstanceRequestMap instanceRequestMap, final List<String> splitAffinityList) throws InstanceException {
if (instanceRequestMap.size() != 1) {
throw new InstanceException(
"requestInstance of TestInstanceManager expected to receive request for a single instance type");
}
if (instanceRequestMap.getMinimumNumberOfInstances(INSTANCE_TYPE) != 1) {
throw new InstanceException(
"requestInstance of TestInstanceManager expected to receive request for one instance of type "
+ INSTANCE_TYPE.getIdentifier());
}
if (this.instanceListener == null) {
throw new InstanceException("instanceListener not registered with TestInstanceManager");
}
final InstanceListener il = this.instanceListener;
final Runnable runnable = new Runnable() {