phet commented on code in PR #3768: URL: https://github.com/apache/gobblin/pull/3768#discussion_r1323959612
########## gobblin-salesforce/src/main/java/org/apache/gobblin/salesforce/SalesforceHistogramService.java: ########## @@ -0,0 +1,373 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.gobblin.salesforce; + +import com.google.common.math.DoubleMath; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import lombok.RequiredArgsConstructor; +import lombok.SneakyThrows; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.text.StrSubstitutor; +import org.apache.gobblin.configuration.SourceState; +import org.apache.gobblin.source.extractor.DataRecordException; +import org.apache.gobblin.source.extractor.exception.RestApiClientException; +import org.apache.gobblin.source.extractor.exception.RestApiConnectionException; +import org.apache.gobblin.source.extractor.exception.RestApiProcessingException; +import org.apache.gobblin.source.extractor.extract.Command; +import org.apache.gobblin.source.extractor.extract.CommandOutput; +import org.apache.gobblin.source.extractor.extract.restapi.RestApiConnector; +import org.apache.gobblin.source.extractor.partition.Partition; +import org.apache.gobblin.source.extractor.partition.Partitioner; +import org.apache.gobblin.source.extractor.utils.Utils; + +import static org.apache.gobblin.configuration.ConfigurationKeys.*; + + +/** + * This class encapsulates everything related to histogram calculation for Salesforce. A histogram here refers to a + * mapping of number of records to be fetched by time intervals. Review Comment: is the histogram for per-record last modified time buckets? and is the sketch of the time distribution useful for guiding "multi partitioning"? while also worth describing via javadoc, probably best to clearly characterize the nature of the histogram within the class name. e .g. `gobblin.salesforce.RecordModTimeHistogramService` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
