kfaraz commented on code in PR #18402: URL: https://github.com/apache/druid/pull/18402#discussion_r2464599391
########## indexing-service/src/main/java/org/apache/druid/indexing/compact/CompactionJobParams.java: ########## @@ -0,0 +1,77 @@ +/* + * 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.druid.indexing.compact; + +import org.apache.druid.indexing.template.JobParams; +import org.apache.druid.server.compaction.CompactionSnapshotBuilder; +import org.apache.druid.server.coordinator.ClusterCompactionConfig; +import org.apache.druid.timeline.SegmentTimeline; +import org.joda.time.DateTime; + +/** + * Parameters used while creating a {@link CompactionJob} using a {@link CompactionJobTemplate}. + */ +public class CompactionJobParams implements JobParams +{ + private final DateTime scheduleStartTime; + private final TimelineProvider timelineProvider; + private final ClusterCompactionConfig clusterCompactionConfig; + private final CompactionSnapshotBuilder snapshotBuilder; + + public CompactionJobParams( + DateTime scheduleStartTime, + ClusterCompactionConfig clusterCompactionConfig, + TimelineProvider timelineProvider, + CompactionSnapshotBuilder snapshotBuilder + ) + { + this.scheduleStartTime = scheduleStartTime; + this.clusterCompactionConfig = clusterCompactionConfig; + this.timelineProvider = timelineProvider; + this.snapshotBuilder = snapshotBuilder; + } + + @Override + public DateTime getScheduleStartTime() + { + return scheduleStartTime; + } + + public ClusterCompactionConfig getClusterCompactionConfig() + { + return clusterCompactionConfig; + } + + public SegmentTimeline getTimeline(String dataSource) + { + return timelineProvider.getTimelineForDataSource(dataSource); + } + + public CompactionSnapshotBuilder getSnapshotBuilder() + { + return snapshotBuilder; + } Review Comment: Added javadocs for these methods. Please let me know if they do not seem adequate. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
