htran1 commented on a change in pull request #2722: GOBBLIN-865: Add feature that enables PK-chunking in partition URL: https://github.com/apache/incubator-gobblin/pull/2722#discussion_r325264698
########## File path: gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceExtractor.java ########## @@ -144,28 +142,18 @@ private final boolean pkChunkingSkipCountCheck; private final boolean bulkApiUseQueryAll; + private WorkUnitState workUnitState; + public SalesforceExtractor(WorkUnitState state) { super(state); - this.sfConnector = (SalesforceConnector) this.connector; - - // don't allow pk chunking if max partitions too high or have user specified partitions - if (state.getPropAsBoolean(Partitioner.HAS_USER_SPECIFIED_PARTITIONS, false) - || state.getPropAsInt(ConfigurationKeys.SOURCE_MAX_NUMBER_OF_PARTITIONS, - ConfigurationKeys.DEFAULT_MAX_NUMBER_OF_PARTITIONS) > PK_CHUNKING_MAX_PARTITIONS_LIMIT) { - if (state.getPropAsBoolean(ENABLE_PK_CHUNKING_KEY, false)) { - log.warn("Max partitions too high, so PK chunking is not enabled"); - } - - this.pkChunking = false; - } else { - this.pkChunking = state.getPropAsBoolean(ENABLE_PK_CHUNKING_KEY, false); - } + this.workUnitState = state; + this.sfConnector = (SalesforceConnector) this.connector; this.pkChunkingSize = Math.max(MIN_PK_CHUNKING_SIZE, - Math.min(MAX_PK_CHUNKING_SIZE, state.getPropAsInt(PK_CHUNKING_SIZE_KEY, DEFAULT_PK_CHUNKING_SIZE))); + Math.min(MAX_PK_CHUNKING_SIZE, state.getPropAsInt(PARTITION_PK_CHUNKING_SIZE, DEFAULT_PK_CHUNKING_SIZE))); - this.pkChunkingSkipCountCheck = state.getPropAsBoolean(PK_CHUNKING_SKIP_COUNT_CHECK, DEFAULT_PK_CHUNKING_SKIP_COUNT_CHECK); + this.pkChunkingSkipCountCheck = true;// won't be able to get count Review comment: Should remove this since the config is no longer used. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services