if(coreThreads < 0)
throw new IllegalArgumentException("core.threads cannot be less than 1");
else if(coreThreads > maxThreads)
throw new IllegalArgumentException("core.threads cannot be greater than max.threads.");
if(maxThreads < 1)
throw new ConfigurationException("max.threads cannot be less than 1.");
if(slopFrequencyMs < 1)
throw new ConfigurationException("slop.frequency.ms cannot be less than 1.");
if(socketTimeoutMs < 0)
throw new ConfigurationException("socket.timeout.ms must be 0 or more ms.");
if(clientSelectors < 1)
throw new ConfigurationException("client.selectors must be 1 or more.");
if(clientRoutingTimeoutMs < 0)
throw new ConfigurationException("routing.timeout.ms must be 0 or more ms.");
if(schedulerThreads < 1)
throw new ConfigurationException("Must have at least 1 scheduler thread, "
+ this.schedulerThreads + " set.");
if(enableServerRouting && !enableSocketServer)
throw new ConfigurationException("Server-side routing is enabled, this requires the socket server to also be enabled.");
if(numRestServiceNettyBossThreads < 1)
throw new ConfigurationException("num.rest.service.netty.boss.threads cannot be less than 1");
if(numRestServiceNettyWorkerThreads < 1)
throw new ConfigurationException("num.rest.service.netty.worker.threads cannot be less than 1");
if(numRestServiceStorageThreads < 1)
throw new ConfigurationException("num.rest.service.storage.threads cannot be less than 1");
if(numRestServiceNettyServerBacklog < 0)
throw new ConfigurationException("num.rest.service.netty.server.backlog cannot be negative");
if(restServiceStorageThreadPoolQueueSize < 0)
throw new ConfigurationException("rest.service.storage.thread.pool.queue.size cannot be negative.");
if(maxHttpAggregatedContentLength <= 0)
throw new ConfigurationException("max.http.aggregated.content.length must be positive");
if(REST_HDFS_FETCHER_CLASS.equals(fileFetcherClass) && !enableReadOnlyRestHdfs
|| !REST_HDFS_FETCHER_CLASS.equals(fileFetcherClass) && enableReadOnlyRestHdfs)
throw new ConfigurationException("The values of \"file.fetcher.class\" and \"enable.readonly.rest.hdfs\" do not match: \n"
+ " file.fetcher.class="
+ fileFetcherClass
+ "\n enable.readonly.rest.hdfs="
+ enableReadOnlyRestHdfs);
}