tags = ImmutableMap.of(
+ STREAM_EXPIRE_TAG,
+ Long.toString(DateTimes.nowUtc().plusMinutes(30).getMillis())
+ );
streamAdminClient.createStream(streamName, STREAM_SHARD_COUNT, tags);
ITRetryUtil.retryUntil(
() -> streamAdminClient.isStreamActive(streamName),
@@ -413,7 +555,13 @@ private class GeneratedTestConfig
"Wait for stream active"
);
fullDatasourceName = datasource + config.getExtraDatasourceNameSuffix();
- streamIngestionPropsTransform = generateStreamIngestionPropsTransform(streamName, fullDatasourceName, config);
+ streamIngestionPropsTransform = generateStreamIngestionPropsTransform(
+ streamName,
+ fullDatasourceName,
+ parserType,
+ parserOrInputFormat,
+ config
+ );
streamQueryPropsTransform = generateStreamQueryPropsTransform(streamName, fullDatasourceName);
}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceNonTransactionalSerializedTest.java b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceNonTransactionalSerializedTest.java
index 99713a729847..a3b845b87004 100644
--- a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceNonTransactionalSerializedTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceNonTransactionalSerializedTest.java
@@ -21,7 +21,6 @@
import org.apache.druid.testing.guice.DruidTestModuleFactory;
import org.apache.druid.tests.TestNGGroup;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -30,12 +29,6 @@
@Guice(moduleFactory = DruidTestModuleFactory.class)
public class ITKafkaIndexingServiceNonTransactionalSerializedTest extends AbstractKafkaIndexingServiceTest
{
- @Override
- protected boolean isKafkaWriterTransactionalEnabled()
- {
- return false;
- }
-
@Override
public String getTestNamePrefix()
{
@@ -48,19 +41,13 @@ public void beforeClass() throws Exception
doBeforeClass();
}
- @AfterClass
- public void tearDown()
- {
- doClassTeardown();
- }
-
/**
* This test must be run individually since the test affect and modify the state of the Druid cluster
*/
@Test
public void testKafkaIndexDataWithLosingCoordinator() throws Exception
{
- doTestIndexDataWithLosingCoordinator();
+ doTestIndexDataWithLosingCoordinator(false);
}
/**
@@ -69,7 +56,7 @@ public void testKafkaIndexDataWithLosingCoordinator() throws Exception
@Test
public void testKafkaIndexDataWithLosingOverlord() throws Exception
{
- doTestIndexDataWithLosingOverlord();
+ doTestIndexDataWithLosingOverlord(false);
}
/**
@@ -78,6 +65,6 @@ public void testKafkaIndexDataWithLosingOverlord() throws Exception
@Test
public void testKafkaIndexDataWithLosingHistorical() throws Exception
{
- doTestIndexDataWithLosingHistorical();
+ doTestIndexDataWithLosingHistorical(false);
}
}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceTransactionalSerializedTest.java b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceTransactionalSerializedTest.java
index 06bcf050d678..fdd06ff4f883 100644
--- a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceTransactionalSerializedTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKafkaIndexingServiceTransactionalSerializedTest.java
@@ -21,7 +21,6 @@
import org.apache.druid.testing.guice.DruidTestModuleFactory;
import org.apache.druid.tests.TestNGGroup;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -30,12 +29,6 @@
@Guice(moduleFactory = DruidTestModuleFactory.class)
public class ITKafkaIndexingServiceTransactionalSerializedTest extends AbstractKafkaIndexingServiceTest
{
- @Override
- protected boolean isKafkaWriterTransactionalEnabled()
- {
- return true;
- }
-
@Override
public String getTestNamePrefix()
{
@@ -48,19 +41,13 @@ public void beforeClass() throws Exception
doBeforeClass();
}
- @AfterClass
- public void tearDown()
- {
- doClassTeardown();
- }
-
/**
* This test must be run individually since the test affect and modify the state of the Druid cluster
*/
@Test
public void testKafkaIndexDataWithLosingCoordinator() throws Exception
{
- doTestIndexDataWithLosingCoordinator();
+ doTestIndexDataWithLosingCoordinator(true);
}
/**
@@ -69,7 +56,7 @@ public void testKafkaIndexDataWithLosingCoordinator() throws Exception
@Test
public void testKafkaIndexDataWithLosingOverlord() throws Exception
{
- doTestIndexDataWithLosingOverlord();
+ doTestIndexDataWithLosingOverlord(true);
}
/**
@@ -78,6 +65,6 @@ public void testKafkaIndexDataWithLosingOverlord() throws Exception
@Test
public void testKafkaIndexDataWithLosingHistorical() throws Exception
{
- doTestIndexDataWithLosingHistorical();
+ doTestIndexDataWithLosingHistorical(true);
}
}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKinesisIndexingServiceSerializedTest.java b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKinesisIndexingServiceSerializedTest.java
index 8e64abb65560..fed13619dc06 100644
--- a/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKinesisIndexingServiceSerializedTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/indexer/ITKinesisIndexingServiceSerializedTest.java
@@ -21,7 +21,6 @@
import org.apache.druid.testing.guice.DruidTestModuleFactory;
import org.apache.druid.tests.TestNGGroup;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -42,19 +41,13 @@ public void beforeClass() throws Exception
doBeforeClass();
}
- @AfterClass
- public void tearDown()
- {
- doClassTeardown();
- }
-
/**
* This test must be run individually since the test affect and modify the state of the Druid cluster
*/
@Test
public void testKinesisIndexDataWithLosingCoordinator() throws Exception
{
- doTestIndexDataWithLosingCoordinator();
+ doTestIndexDataWithLosingCoordinator(false);
}
/**
@@ -63,7 +56,7 @@ public void testKinesisIndexDataWithLosingCoordinator() throws Exception
@Test
public void testKinesisIndexDataWithLosingOverlord() throws Exception
{
- doTestIndexDataWithLosingOverlord();
+ doTestIndexDataWithLosingOverlord(false);
}
/**
@@ -72,6 +65,6 @@ public void testKinesisIndexDataWithLosingOverlord() throws Exception
@Test
public void testKinesisIndexDataWithLosingHistorical() throws Exception
{
- doTestIndexDataWithLosingHistorical();
+ doTestIndexDataWithLosingHistorical(false);
}
}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceDataFormatTest.java b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceDataFormatTest.java
new file mode 100644
index 000000000000..9143d9b38b76
--- /dev/null
+++ b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceDataFormatTest.java
@@ -0,0 +1,99 @@
+/*
+ * 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.tests.parallelized;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.inject.Inject;
+import org.apache.druid.guice.annotations.Json;
+import org.apache.druid.testing.guice.DruidTestModuleFactory;
+import org.apache.druid.tests.TestNGGroup;
+import org.apache.druid.tests.indexer.AbstractKafkaIndexingServiceTest;
+import org.apache.druid.tests.indexer.AbstractStreamIndexingTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Guice;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Test(groups = TestNGGroup.KAFKA_DATA_FORMAT)
+@Guice(moduleFactory = DruidTestModuleFactory.class)
+public class ITKafkaIndexingServiceDataFormatTest extends AbstractKafkaIndexingServiceTest
+{
+ private static final boolean TRANSACTION_DISABLED = false;
+ private static final boolean TRANSACTION_ENABLED = true;
+
+ /**
+ * Generates test parameters based on the given resources. The resources should be structured as
+ *
+ * {@code
+ * {RESOURCES_ROOT}/stream/data/{DATA_FORMAT}/serializer
+ * /input_format
+ * /parser
+ * }
+ *
+ * The {@code serializer} directory contains the spec of {@link org.apache.druid.testing.utils.EventSerializer} and
+ * must be present. Either {@code input_format} or {@code parser} directory should be present if {@code serializer}
+ * is present.
+ */
+ @DataProvider(parallel = true)
+ public static Object[][] resources() throws IOException
+ {
+ final List resources = new ArrayList<>();
+ final List dataFormats = listDataFormatResources();
+ for (String eachFormat : dataFormats) {
+ final Map spec = findTestSpecs(String.join("/", DATA_RESOURCE_ROOT, eachFormat));
+ final String serializerPath = spec.get(AbstractStreamIndexingTest.SERIALIZER);
+ spec.forEach((k, path) -> {
+ if (!AbstractStreamIndexingTest.SERIALIZER.equals(k)) {
+ resources.add(new Object[]{TRANSACTION_DISABLED, serializerPath, k, path});
+ resources.add(new Object[]{TRANSACTION_ENABLED, serializerPath, k, path});
+ }
+ });
+ }
+
+ return resources.toArray(new Object[0][]);
+ }
+
+ @Inject
+ private @Json ObjectMapper jsonMapper;
+
+ @BeforeClass
+ public void beforeClass() throws Exception
+ {
+ doBeforeClass();
+ }
+
+ @Test(dataProvider = "resources")
+ public void testIndexData(boolean transactionEnabled, String serializerPath, String parserType, String specPath)
+ throws Exception
+ {
+ doTestIndexDataStableState(transactionEnabled, serializerPath, parserType, specPath);
+ }
+
+ @Override
+ public String getTestNamePrefix()
+ {
+ return "kafka_data_format";
+ }
+}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceNonTransactionalParallelizedTest.java b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceNonTransactionalParallelizedTest.java
index 199530e0a32a..2c648ea630b2 100644
--- a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceNonTransactionalParallelizedTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceNonTransactionalParallelizedTest.java
@@ -22,7 +22,6 @@
import org.apache.druid.testing.guice.DruidTestModuleFactory;
import org.apache.druid.tests.TestNGGroup;
import org.apache.druid.tests.indexer.AbstractKafkaIndexingServiceTest;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -31,12 +30,6 @@
@Guice(moduleFactory = DruidTestModuleFactory.class)
public class ITKafkaIndexingServiceNonTransactionalParallelizedTest extends AbstractKafkaIndexingServiceTest
{
- @Override
- protected boolean isKafkaWriterTransactionalEnabled()
- {
- return false;
- }
-
@Override
public String getTestNamePrefix()
{
@@ -49,32 +42,6 @@ public void beforeClass() throws Exception
doBeforeClass();
}
- @AfterClass
- public void tearDown()
- {
- doClassTeardown();
- }
-
- /**
- * This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
- * and supervisor maintained and scoped within this test only
- */
- @Test
- public void testKafkaIndexDataWithLegacyParserStableState() throws Exception
- {
- doTestIndexDataWithLegacyParserStableState();
- }
-
- /**
- * This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
- * and supervisor maintained and scoped within this test only
- */
- @Test
- public void testKafkaIndexDataWithInputFormatStableState() throws Exception
- {
- doTestIndexDataWithInputFormatStableState();
- }
-
/**
* This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
* and supervisor maintained and scoped within this test only
@@ -82,7 +49,7 @@ public void testKafkaIndexDataWithInputFormatStableState() throws Exception
@Test
public void testKafkaIndexDataWithStartStopSupervisor() throws Exception
{
- doTestIndexDataWithStartStopSupervisor();
+ doTestIndexDataWithStartStopSupervisor(false);
}
/**
@@ -92,6 +59,6 @@ public void testKafkaIndexDataWithStartStopSupervisor() throws Exception
@Test
public void testKafkaIndexDataWithKafkaReshardSplit() throws Exception
{
- doTestIndexDataWithStreamReshardSplit();
+ doTestIndexDataWithStreamReshardSplit(false);
}
}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceTransactionalParallelizedTest.java b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceTransactionalParallelizedTest.java
index 7db3a7fd832c..d61e977a7081 100644
--- a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceTransactionalParallelizedTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKafkaIndexingServiceTransactionalParallelizedTest.java
@@ -22,7 +22,6 @@
import org.apache.druid.testing.guice.DruidTestModuleFactory;
import org.apache.druid.tests.TestNGGroup;
import org.apache.druid.tests.indexer.AbstractKafkaIndexingServiceTest;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -31,12 +30,6 @@
@Guice(moduleFactory = DruidTestModuleFactory.class)
public class ITKafkaIndexingServiceTransactionalParallelizedTest extends AbstractKafkaIndexingServiceTest
{
- @Override
- protected boolean isKafkaWriterTransactionalEnabled()
- {
- return true;
- }
-
@Override
public String getTestNamePrefix()
{
@@ -49,32 +42,6 @@ public void beforeClass() throws Exception
doBeforeClass();
}
- @AfterClass
- public void tearDown()
- {
- doClassTeardown();
- }
-
- /**
- * This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
- * and supervisor maintained and scoped within this test only
- */
- @Test
- public void testKafkaIndexDataWithLegacyParserStableState() throws Exception
- {
- doTestIndexDataWithLegacyParserStableState();
- }
-
- /**
- * This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
- * and supervisor maintained and scoped within this test only
- */
- @Test
- public void testKafkaIndexDataWithInputFormatStableState() throws Exception
- {
- doTestIndexDataWithInputFormatStableState();
- }
-
/**
* This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
* and supervisor maintained and scoped within this test only
@@ -82,7 +49,7 @@ public void testKafkaIndexDataWithInputFormatStableState() throws Exception
@Test
public void testKafkaIndexDataWithStartStopSupervisor() throws Exception
{
- doTestIndexDataWithStartStopSupervisor();
+ doTestIndexDataWithStartStopSupervisor(true);
}
/**
@@ -92,6 +59,6 @@ public void testKafkaIndexDataWithStartStopSupervisor() throws Exception
@Test
public void testKafkaIndexDataWithKafkaReshardSplit() throws Exception
{
- doTestIndexDataWithStreamReshardSplit();
+ doTestIndexDataWithStreamReshardSplit(true);
}
}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceDataFormatTest.java b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceDataFormatTest.java
new file mode 100644
index 000000000000..c302cd1a9224
--- /dev/null
+++ b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceDataFormatTest.java
@@ -0,0 +1,96 @@
+/*
+ * 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.tests.parallelized;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.inject.Inject;
+import org.apache.druid.guice.annotations.Json;
+import org.apache.druid.testing.guice.DruidTestModuleFactory;
+import org.apache.druid.tests.TestNGGroup;
+import org.apache.druid.tests.indexer.AbstractKinesisIndexingServiceTest;
+import org.apache.druid.tests.indexer.AbstractStreamIndexingTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Guice;
+import org.testng.annotations.Test;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+@Test(groups = TestNGGroup.KINESIS_DATA_FORMAT)
+@Guice(moduleFactory = DruidTestModuleFactory.class)
+public class ITKinesisIndexingServiceDataFormatTest extends AbstractKinesisIndexingServiceTest
+{
+ /**
+ * Generates test parameters based on the given resources. The resources should be structured as
+ *
+ * {@code
+ * {RESOURCES_ROOT}/stream/data/{DATA_FORMAT}/serializer
+ * /input_format
+ * /parser
+ * }
+ *
+ * The {@code serializer} directory contains the spec of {@link org.apache.druid.testing.utils.EventSerializer} and
+ * must be present. Either {@code input_format} or {@code parser} directory should be present if {@code serializer}
+ * is present.
+ */
+ @DataProvider(parallel = true)
+ public static Object[][] resources() throws IOException
+ {
+ final List resources = new ArrayList<>();
+ final List dataFormats = listDataFormatResources();
+ for (String eachFormat : dataFormats) {
+ final Map spec = findTestSpecs(String.join("/", DATA_RESOURCE_ROOT, eachFormat));
+ final String serializerPath = spec.get(AbstractStreamIndexingTest.SERIALIZER);
+ spec.forEach((k, path) -> {
+ if (!AbstractStreamIndexingTest.SERIALIZER.equals(k)) {
+ resources.add(new Object[]{serializerPath, k, path});
+ }
+ });
+ }
+
+ return resources.toArray(new Object[0][]);
+ }
+
+ @Inject
+ private @Json
+ ObjectMapper jsonMapper;
+
+ @BeforeClass
+ public void beforeClass() throws Exception
+ {
+ doBeforeClass();
+ }
+
+ @Test(dataProvider = "resources")
+ public void testIndexData(String serializerPath, String parserType, String specPath)
+ throws Exception
+ {
+ doTestIndexDataStableState(false, serializerPath, parserType, specPath);
+ }
+
+ @Override
+ public String getTestNamePrefix()
+ {
+ return "kinesis_data_format";
+ }
+}
diff --git a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceParallelizedTest.java b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceParallelizedTest.java
index 38816dc1328f..efd107fa1aa2 100644
--- a/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceParallelizedTest.java
+++ b/integration-tests/src/test/java/org/apache/druid/tests/parallelized/ITKinesisIndexingServiceParallelizedTest.java
@@ -22,7 +22,6 @@
import org.apache.druid.testing.guice.DruidTestModuleFactory;
import org.apache.druid.tests.TestNGGroup;
import org.apache.druid.tests.indexer.AbstractKinesisIndexingServiceTest;
-import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -43,32 +42,6 @@ public void beforeClass() throws Exception
doBeforeClass();
}
- @AfterClass
- public void tearDown()
- {
- doClassTeardown();
- }
-
- /**
- * This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
- * and supervisor maintained and scoped within this test only
- */
- @Test
- public void testKinesisIndexDataWithLegacyParserStableState() throws Exception
- {
- doTestIndexDataWithLegacyParserStableState();
- }
-
- /**
- * This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
- * and supervisor maintained and scoped within this test only
- */
- @Test
- public void testKinesisIndexDataWithInputFormatStableState() throws Exception
- {
- doTestIndexDataWithInputFormatStableState();
- }
-
/**
* This test can be run concurrently with other tests as it creates/modifies/teardowns a unique datasource
* and supervisor maintained and scoped within this test only
@@ -76,7 +49,7 @@ public void testKinesisIndexDataWithInputFormatStableState() throws Exception
@Test
public void testKinesisIndexDataWithStartStopSupervisor() throws Exception
{
- doTestIndexDataWithStartStopSupervisor();
+ doTestIndexDataWithStartStopSupervisor(false);
}
/**
@@ -86,7 +59,7 @@ public void testKinesisIndexDataWithStartStopSupervisor() throws Exception
@Test
public void testKinesisIndexDataWithKinesisReshardSplit() throws Exception
{
- doTestIndexDataWithStreamReshardSplit();
+ doTestIndexDataWithStreamReshardSplit(false);
}
/**
@@ -96,6 +69,6 @@ public void testKinesisIndexDataWithKinesisReshardSplit() throws Exception
@Test
public void testKinesisIndexDataWithKinesisReshardMerge() throws Exception
{
- doTestIndexDataWithStreamReshardMerge();
+ doTestIndexDataWithStreamReshardMerge(false);
}
}
diff --git a/integration-tests/src/test/resources/indexer/stream_supervisor_spec_legacy_parser.json b/integration-tests/src/test/resources/indexer/stream_supervisor_spec_legacy_parser.json
deleted file mode 100644
index 623aadf6583b..000000000000
--- a/integration-tests/src/test/resources/indexer/stream_supervisor_spec_legacy_parser.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "type": "%%STREAM_TYPE%%",
- "dataSchema": {
- "dataSource": "%%DATASOURCE%%",
- "parser": {
- "type": "string",
- "parseSpec": {
- "format": "json",
- "timestampSpec": {
- "column": "timestamp",
- "format": "auto"
- },
- "dimensionsSpec": {
- "dimensions": ["page", "language", "user", "unpatrolled", "newPage", "robot", "anonymous", "namespace", "continent", "country", "region", "city"],
- "dimensionExclusions": [],
- "spatialDimensions": []
- }
- }
- },
- "metricsSpec": [
- {
- "type": "count",
- "name": "count"
- },
- {
- "type": "doubleSum",
- "name": "added",
- "fieldName": "added"
- },
- {
- "type": "doubleSum",
- "name": "deleted",
- "fieldName": "deleted"
- },
- {
- "type": "doubleSum",
- "name": "delta",
- "fieldName": "delta"
- }
- ],
- "granularitySpec": {
- "type": "uniform",
- "segmentGranularity": "MINUTE",
- "queryGranularity": "NONE"
- }
- },
- "tuningConfig": {
- "type": "%%STREAM_TYPE%%",
- "intermediatePersistPeriod": "PT30S",
- "maxRowsPerSegment": 5000000,
- "maxRowsInMemory": 500000
- },
- "ioConfig": {
- "%%TOPIC_KEY%%": "%%TOPIC_VALUE%%",
- "%%STREAM_PROPERTIES_KEY%%": %%STREAM_PROPERTIES_VALUE%%,
- "taskCount": 2,
- "replicas": 1,
- "taskDuration": "PT5M",
- "%%USE_EARLIEST_KEY%%": true
- }
-}
diff --git a/integration-tests/src/test/resources/stream/data/avro/parser/input_row_parser.json b/integration-tests/src/test/resources/stream/data/avro/parser/input_row_parser.json
new file mode 100644
index 000000000000..4feea54b39f9
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/avro/parser/input_row_parser.json
@@ -0,0 +1,39 @@
+{
+ "type": "avro_stream",
+ "avroBytesDecoder" : {
+ "type": "schema_inline",
+ "schema": {
+ "namespace": "org.apache.druid",
+ "name": "wikipedia",
+ "type": "record",
+ "fields": [
+ { "name": "timestamp", "type": "string" },
+ { "name": "page", "type": "string" },
+ { "name": "language", "type": "string" },
+ { "name": "user", "type": "string" },
+ { "name": "unpatrolled", "type": "string" },
+ { "name": "newPage", "type": "string" },
+ { "name": "robot", "type": "string" },
+ { "name": "anonymous", "type": "string" },
+ { "name": "namespace", "type": "string" },
+ { "name": "continent", "type": "string" },
+ { "name": "country", "type": "string" },
+ { "name": "region", "type": "string" },
+ { "name": "city", "type": "string" },
+ { "name": "added", "type": "long" },
+ { "name": "deleted", "type": "long" },
+ { "name": "delta", "type": "long" }
+ ]
+ }
+ },
+ "parseSpec": {
+ "format": "avro",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "auto"
+ },
+ "dimensionsSpec": {
+ "dimensions": ["page", "language", "user", "unpatrolled", "newPage", "robot", "anonymous", "namespace", "continent", "country", "region", "city"]
+ }
+ }
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/avro/serializer/serializer.json b/integration-tests/src/test/resources/stream/data/avro/serializer/serializer.json
new file mode 100644
index 000000000000..20b3462c2747
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/avro/serializer/serializer.json
@@ -0,0 +1,3 @@
+{
+ "type": "avro"
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/csv/input_format/input_format.json b/integration-tests/src/test/resources/stream/data/csv/input_format/input_format.json
new file mode 100644
index 000000000000..914306976e33
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/csv/input_format/input_format.json
@@ -0,0 +1,4 @@
+{
+ "type" : "csv",
+ "columns": ["timestamp","page","language","user","unpatrolled","newPage","robot","anonymous","namespace","continent","country","region","city","added","deleted","delta"]
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/csv/parser/input_row_parser.json b/integration-tests/src/test/resources/stream/data/csv/parser/input_row_parser.json
new file mode 100644
index 000000000000..11fa718a9346
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/csv/parser/input_row_parser.json
@@ -0,0 +1,16 @@
+{
+ "type": "string",
+ "parseSpec": {
+ "format": "csv",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "auto"
+ },
+ "columns" : ["timestamp","page","language","user","unpatrolled","newPage","robot","anonymous","namespace","continent","country","region","city","added","deleted","delta"],
+ "dimensionsSpec": {
+ "dimensions": ["page", "language", "user", "unpatrolled", "newPage", "robot", "anonymous", "namespace", "continent", "country", "region", "city"],
+ "dimensionExclusions": [],
+ "spatialDimensions": []
+ }
+ }
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/csv/serializer/serializer.json b/integration-tests/src/test/resources/stream/data/csv/serializer/serializer.json
new file mode 100644
index 000000000000..b7dd0d8a0785
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/csv/serializer/serializer.json
@@ -0,0 +1,3 @@
+{
+ "type": "csv"
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/json/input_format/input_format.json b/integration-tests/src/test/resources/stream/data/json/input_format/input_format.json
new file mode 100644
index 000000000000..cfb17e2dd200
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/json/input_format/input_format.json
@@ -0,0 +1,3 @@
+{
+ "type" : "json"
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/json/parser/input_row_parser.json b/integration-tests/src/test/resources/stream/data/json/parser/input_row_parser.json
new file mode 100644
index 000000000000..b5fa892dee2e
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/json/parser/input_row_parser.json
@@ -0,0 +1,15 @@
+{
+ "type": "string",
+ "parseSpec": {
+ "format": "json",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "auto"
+ },
+ "dimensionsSpec": {
+ "dimensions": ["page", "language", "user", "unpatrolled", "newPage", "robot", "anonymous", "namespace", "continent", "country", "region", "city"],
+ "dimensionExclusions": [],
+ "spatialDimensions": []
+ }
+ }
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/json/serializer/serializer.json b/integration-tests/src/test/resources/stream/data/json/serializer/serializer.json
new file mode 100644
index 000000000000..126d77baca55
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/json/serializer/serializer.json
@@ -0,0 +1,3 @@
+{
+ "type": "json"
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/indexer/stream_supervisor_spec_input_format.json b/integration-tests/src/test/resources/stream/data/supervisor_spec_template.json
similarity index 95%
rename from integration-tests/src/test/resources/indexer/stream_supervisor_spec_input_format.json
rename to integration-tests/src/test/resources/stream/data/supervisor_spec_template.json
index ce9bedc84431..9943431a05a4 100644
--- a/integration-tests/src/test/resources/indexer/stream_supervisor_spec_input_format.json
+++ b/integration-tests/src/test/resources/stream/data/supervisor_spec_template.json
@@ -2,6 +2,7 @@
"type": "%%STREAM_TYPE%%",
"dataSchema": {
"dataSource": "%%DATASOURCE%%",
+ "parser": %%PARSER%%,
"timestampSpec": {
"column": "timestamp",
"format": "auto"
@@ -51,8 +52,6 @@
"replicas": 1,
"taskDuration": "PT5M",
"%%USE_EARLIEST_KEY%%": true,
- "inputFormat" : {
- "type" : "json"
- }
+ "inputFormat" : %%INPUT_FORMAT%%
}
}
diff --git a/integration-tests/src/test/resources/stream/data/tsv/input_format/input_format.json b/integration-tests/src/test/resources/stream/data/tsv/input_format/input_format.json
new file mode 100644
index 000000000000..ece2968001ca
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/tsv/input_format/input_format.json
@@ -0,0 +1,4 @@
+{
+ "type" : "tsv",
+ "columns": ["timestamp","page","language","user","unpatrolled","newPage","robot","anonymous","namespace","continent","country","region","city","added","deleted","delta"]
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/tsv/parser/input_row_parser.json b/integration-tests/src/test/resources/stream/data/tsv/parser/input_row_parser.json
new file mode 100644
index 000000000000..c60a0c162b19
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/tsv/parser/input_row_parser.json
@@ -0,0 +1,16 @@
+{
+ "type": "string",
+ "parseSpec": {
+ "format": "tsv",
+ "timestampSpec": {
+ "column": "timestamp",
+ "format": "auto"
+ },
+ "columns" : ["timestamp","page","language","user","unpatrolled","newPage","robot","anonymous","namespace","continent","country","region","city","added","deleted","delta"],
+ "dimensionsSpec": {
+ "dimensions": ["page", "language", "user", "unpatrolled", "newPage", "robot", "anonymous", "namespace", "continent", "country", "region", "city"],
+ "dimensionExclusions": [],
+ "spatialDimensions": []
+ }
+ }
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/stream/data/tsv/serializer/serializer.json b/integration-tests/src/test/resources/stream/data/tsv/serializer/serializer.json
new file mode 100644
index 000000000000..731ad412a028
--- /dev/null
+++ b/integration-tests/src/test/resources/stream/data/tsv/serializer/serializer.json
@@ -0,0 +1,3 @@
+{
+ "type": "tsv"
+}
\ No newline at end of file
diff --git a/integration-tests/src/test/resources/indexer/stream_index_queries.json b/integration-tests/src/test/resources/stream/queries/stream_index_queries.json
similarity index 100%
rename from integration-tests/src/test/resources/indexer/stream_index_queries.json
rename to integration-tests/src/test/resources/stream/queries/stream_index_queries.json
diff --git a/integration-tests/src/test/resources/testng.xml b/integration-tests/src/test/resources/testng.xml
index 5a0735a05782..88c64158978b 100644
--- a/integration-tests/src/test/resources/testng.xml
+++ b/integration-tests/src/test/resources/testng.xml
@@ -20,7 +20,7 @@
-
+