public IHadoopJobSubmissionPocoClient Create(IJobSubmissionClientCredential credentials, IAbstractionContext context, bool ignoreSslErrors, string userAgentString) { var remoteCredentials = credentials as BasicAuthCredential; if (remoteCredentials == null) { throw new NotSupportedException(); } string clusterKey = remoteCredentials.Server.AbsoluteUri.ToUpperInvariant(); if (pocoSimulators.ContainsKey(clusterKey)) { var simulator = pocoSimulators[clusterKey]; simulator.credentials = remoteCredentials; simulator.context = context; return simulator; } else { var simulator = new HadoopJobSubmissionPocoSimulatorClient(remoteCredentials, context, userAgentString); pocoSimulators.Add(clusterKey, simulator); return simulator; } }
public IHadoopJobSubmissionPocoClient Create(IJobSubmissionClientCredential credentials, IAbstractionContext context, bool ignoreSslErrors, string userAgentString) { var remoteCredentials = credentials as BasicAuthCredential; if (remoteCredentials == null) { throw new NotSupportedException(); } string clusterKey = remoteCredentials.Server.AbsoluteUri.ToUpperInvariant(); if (pocoSimulators.ContainsKey(clusterKey)) { var simulator = pocoSimulators[clusterKey]; simulator.credentials = remoteCredentials; simulator.context = context; return(simulator); } else { var simulator = new HadoopJobSubmissionPocoSimulatorClient(remoteCredentials, context, userAgentString); pocoSimulators.Add(clusterKey, simulator); return(simulator); } }