private void assertCorrectJobId ( Settings settings ) { SettingsUtils . ensureJobTransportPoolingKey ( settings ) ; String requestingJobKey = SettingsUtils . getJobTransportPoolingKey ( settings ) ; if ( ! jobKey . equals ( requestingJobKey ) ) { throw new EsHadoopIllegalArgumentException ( "Settings object passed does not have the same job " + "pooling key property as when this pool was created. Job key requested was [" + requestingJobKey + "] but this pool services job [" + jobKey + "]. This could be a " + "different job incorrectly polluting the TransportPool. Bailing out..." ) ; } }
Checks to ensure that the caller is using a settings object with the same job id that this pool is responsible for .