diff --git a/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGenerator.java b/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGenerator.java index ae74bc8ca91..d289ccf01c0 100644 --- a/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGenerator.java +++ b/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGenerator.java @@ -90,10 +90,6 @@ public List generateTasks(List tableConfigs) { String taskType = MinionConstants.UpsertCompactionTask.TASK_TYPE; List pinotTaskConfigs = new ArrayList<>(); for (TableConfig tableConfig : tableConfigs) { - if (!validate(tableConfig)) { - LOGGER.warn("Validation failed for table {}. Skipping..", tableConfig.getTableName()); - continue; - } String tableNameWithType = tableConfig.getTableName(); LOGGER.info("Start generating task configs for table: {}", tableNameWithType); @@ -150,21 +146,6 @@ public List generateTasks(List tableConfigs) { taskConfigs.getOrDefault(UpsertCompactionTask.NUM_SEGMENTS_BATCH_PER_SERVER_REQUEST, String.valueOf(DEFAULT_NUM_SEGMENTS_BATCH_PER_SERVER_REQUEST))); - // Validate that the snapshot is enabled if validDocIdsType is validDocIdsSnapshot - if (validDocIdsType == ValidDocIdsType.SNAPSHOT) { - UpsertConfig upsertConfig = tableConfig.getUpsertConfig(); - Preconditions.checkNotNull(upsertConfig, "UpsertConfig must be provided for UpsertCompactionTask"); - Preconditions.checkState(upsertConfig.isEnableSnapshot(), String.format( - "'enableSnapshot' from UpsertConfig must be enabled for UpsertCompactionTask with validDocIdsType = %s", - validDocIdsType)); - } else if (validDocIdsType == ValidDocIdsType.IN_MEMORY_WITH_DELETE) { - UpsertConfig upsertConfig = tableConfig.getUpsertConfig(); - Preconditions.checkNotNull(upsertConfig, "UpsertConfig must be provided for UpsertCompactionTask"); - Preconditions.checkNotNull(upsertConfig.getDeleteRecordColumn(), - String.format("deleteRecordColumn must be provided for " + "UpsertCompactionTask with validDocIdsType = %s", - validDocIdsType)); - } - Map> validDocIdsMetadataList = serverSegmentMetadataReader.getSegmentToValidDocIdsMetadataFromServer(tableNameWithType, serverToSegments, serverToEndpoints, null, 60_000, validDocIdsType.toString(), numSegmentsBatchPerServerRequest); @@ -288,23 +269,6 @@ public static int getMaxTasks(String taskType, String tableNameWithType, Map taskConfigs) { // check table is realtime diff --git a/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/test/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGeneratorTest.java b/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/test/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGeneratorTest.java index 604c1aa4760..1204c5ae5f3 100644 --- a/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/test/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGeneratorTest.java +++ b/pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/test/java/org/apache/pinot/plugin/minion/tasks/upsertcompaction/UpsertCompactionTaskGeneratorTest.java @@ -50,7 +50,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; @@ -98,21 +97,6 @@ public void setUp() { _completedSegmentsMap.put(_completedSegment2.getSegmentName(), _completedSegment2); } - @Test - public void testValidate() { - TableConfig tableConfig = - new TableConfigBuilder(TableType.OFFLINE).setTableName(RAW_TABLE_NAME).setTimeColumnName(TIME_COLUMN_NAME) - .build(); - assertFalse(UpsertCompactionTaskGenerator.validate(tableConfig)); - - TableConfigBuilder tableConfigBuilder = - new TableConfigBuilder(TableType.REALTIME).setTableName(RAW_TABLE_NAME).setTimeColumnName(TIME_COLUMN_NAME); - assertFalse(UpsertCompactionTaskGenerator.validate(tableConfigBuilder.build())); - - tableConfigBuilder = tableConfigBuilder.setUpsertConfig(new UpsertConfig(UpsertConfig.Mode.FULL)); - assertTrue(UpsertCompactionTaskGenerator.validate(tableConfigBuilder.build())); - } - @Test public void testGenerateTasksValidatesTableConfigs() { UpsertCompactionTaskGenerator taskGenerator = new UpsertCompactionTaskGenerator();