jackjlli commented on a change in pull request #4464: Delete extra refreshed segments after segment push URL: https://github.com/apache/incubator-pinot/pull/4464#discussion_r307052751
########## File path: pinot-hadoop/src/test/java/org/apache/pinot/hadoop/io/DeleteExtraPushedSegmentsTest.java ########## @@ -0,0 +1,95 @@ +/** + * 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.pinot.hadoop.io; + +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; +import org.apache.hadoop.fs.Path; +import org.apache.pinot.hadoop.job.JobConfigConstants; +import org.apache.pinot.hadoop.job.SegmentTarPushJob; +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + + +/** + * Tests logic to delete extra segments within the same time unit for APPEND or extra segments during REFRESH cases. + */ +public class DeleteExtraPushedSegmentsTest { + Properties _defaultProperties = new Properties(); + + @BeforeClass + private void setup() { + _defaultProperties.setProperty(JobConfigConstants.PUSH_TO_HOSTS, "sample_host"); + _defaultProperties.setProperty(JobConfigConstants.PUSH_TO_PORT, "1234"); + _defaultProperties.setProperty(JobConfigConstants.PATH_TO_OUTPUT, "sample_output_path"); + } + + @Test + public void checkDelete() { + List<String> allSegments = new ArrayList<>(); Review comment: rename the variable to sth like `allSegmentsInCluster` or sth like that? ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org