Source:
public DatabaseChunkedReaderConfig(Properties properties) { Properties props = new VerifiableProperties(properties).getDomainProperties(DBREADER_DOMAIN_CONFIG); VerifiableProperties verifiableProperties = new VerifiableProperties(props); _queryTimeout = verifiableProperties.getInt(QUERY_TIMEOUT_SECS, DEFAULT_QUERY_TIMEOUT_SECS); _fetchSize = verifiableProperties.getInt(FETCH_SIZE, DEFAULT_FETCH_SIZE); _chunkSize = verifiableProperties.getLong(CHUNK_SIZE, DEFAULT_CHUNK_SIZE); if (!verifiableProperties.containsKey(NUM_CHUNK_BUCKETS)) { String msg = "Number of buckets to use for chunking not specified. Cannot default this config"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _numChunkBuckets = verifiableProperties.getLong(NUM_CHUNK_BUCKETS); if (!verifiableProperties.containsKey(CHUNK_INDEX)) { String msg = "Current chunking index not specified. Cannot default this config"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _chunkIndex = verifiableProperties.getLong(CHUNK_INDEX); if (!verifiableProperties.containsKey(HASH_FUNCTION)) { String msg = "Hash function not specified. Cannot default this config"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _hashFunction = verifiableProperties.getString(HASH_FUNCTION); if (!verifiableProperties.containsKey(CONCAT_FUNCTION)) { String msg = "Concatenation function not specified. Cannot default this config"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _concatFunction = verifiableProperties.getString(CONCAT_FUNCTION); String tableReader = verifiableProperties.getString(DATABASE_INTERPRETER_CLASS_NAME); if (StringUtils.isBlank(tableReader)) { String msg = "Database type interpreter class name is not set or is blank"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _interpreter = ReflectionUtils.createInstance(tableReader); verifiableProperties.verify(); }

Target:
public DatabaseChunkedReaderConfig(Properties properties) { Properties props = new VerifiableProperties(properties).getDomainProperties(DB_READER_DOMAIN_CONFIG); VerifiableProperties verifiableProperties = new VerifiableProperties(props); _queryTimeout = verifiableProperties.getInt(QUERY_TIMEOUT_SECS, DEFAULT_QUERY_TIMEOUT_SECS); Validate.inclusiveBetween(0, Integer.MAX_VALUE, _queryTimeout); _fetchSize = verifiableProperties.getInt(FETCH_SIZE, DEFAULT_FETCH_SIZE); Validate.inclusiveBetween(0, Integer.MAX_VALUE, _fetchSize); _chunkSize = verifiableProperties.getLong(CHUNK_SIZE, DEFAULT_CHUNK_SIZE); Validate.inclusiveBetween(100, Long.MAX_VALUE, _fetchSize); _numChunkBuckets = verifiableProperties.getLong(NUM_CHUNK_BUCKETS); Validate.inclusiveBetween(0, Long.MAX_VALUE, _fetchSize); _chunkIndex = verifiableProperties.getLong(CHUNK_INDEX); Validate.inclusiveBetween(0, Long.MAX_VALUE, _fetchSize); String tableReader = verifiableProperties.getString(DATABASE_INTERPRETER_CLASS_NAME); if (StringUtils.isBlank(tableReader)) { String msg = "Database type interpreter class name is not set or is blank"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _interpreter = ReflectionUtils.createInstance(tableReader); String queryManagerClass = verifiableProperties.getString(DATABASE_QUERY_MANAGER_CLASS_NAME); if (StringUtils.isBlank(queryManagerClass)) { String msg = "Database query manager class name is not set or is blank"; LOG.error(msg); throw new DatastreamRuntimeException(msg); } _chunkedQueryManager = ReflectionUtils.createInstance(queryManagerClass); verifiableProperties.verify(); }