You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by GitBox <gi...@apache.org> on 2021/10/19 11:31:51 UTC
[GitHub] [carbondata] akashrn5 opened a new pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
akashrn5 opened a new pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235
### Why is this PR needed?
### What changes were proposed in this PR?
### Does this PR introduce any user interface change?
- No
- Yes. (please explain the change and update document)
### Is any new testcase added?
- No
- Yes
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737166798
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala
##########
@@ -0,0 +1,282 @@
+/*
+ * 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.carbondata.streamer
+
+import com.beust.jcommander.Parameter
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * The config class to parse the program arguments, validate and prepare the required configuration.
+ */
+class CarbonStreamerConfig() extends Serializable {
+
+ @Parameter(names = Array("--master"), description = "Spark master")
Review comment:
If you check the `Parameter` class, the names field is an array type, so we have wrap in array and initialize
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947535439
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/456/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] jackylk commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
jackylk commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-968892059
LGTM
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979133292
Build Success with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/529/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973756881
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734958343
##########
File path: examples/spark/src/main/scala/org/apache/carbondata/examples/SparkStreamingExample.scala
##########
@@ -169,14 +169,21 @@ object SparkStreamingExample {
println(System.currentTimeMillis().toString() +
" at batch time: " + time.toString() +
" the count of received data: " + df.count())
+ print("********************** rdd is: " + rdd.toString())
+ throw new Exception("test")
CarbonSparkStreamingFactory.getStreamSparkStreamingWriter(spark, "default", tableName)
.mode(SaveMode.Append)
.writeStreamData(df, time)
+ print("x")
Review comment:
is this needed?
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737178613
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonDStream.scala
##########
@@ -0,0 +1,59 @@
+/*
+ * 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.carbondata.streamer
+
+import org.apache.spark.sql.{Dataset, Row, SparkSession}
+import org.apache.spark.sql.CarbonSession._
+import org.apache.spark.sql.execution.command.mutation.merge.MergeOperationType
+import org.apache.spark.streaming.dstream.DStream
+
+/**
+ * Wrapper class to hold the spark's DStream object as Dstream can be of different types based on
+ * the different input sources like text, avro, kafka etc.
+ * @param sparkSession Spark Session
+ * @param inputDStream Spark's DStream object
+ */
+case class CarbonDStream(
+ @transient sparkSession: SparkSession,
Review comment:
done
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737215696
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
Review comment:
The existing comment is not very clear I feel and as a best practice, it is always recommended to assign a proper unique value to group id when consuming from kafka. So we can remove the existing comment and update with above.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-969062419
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6119/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-969368619
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4376/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979110389
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6138/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947064890
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/452/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] ydvpankaj99 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
ydvpankaj99 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973839519
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734957498
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
Review comment:
I think mentioning "absolute path to file" is a bit misleading since we support entire folder of schema files as well.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734957203
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
Review comment:
may be we can mention here about the spark streaming checkpoint that we are using. That would make it more clear as to why we want to keep it as false.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737169929
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/AvroKafkaSource.scala
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.carbondata.streamer
+
+import scala.collection.JavaConverters._
+
+import org.apache.avro.generic.GenericRecord
+import org.apache.spark.sql.SparkSession
+import org.apache.spark.streaming.StreamingContext
+import org.apache.spark.streaming.dstream.DStream
+import org.apache.spark.streaming.kafka010.ConsumerStrategies.Subscribe
+import org.apache.spark.streaming.kafka010.KafkaUtils
+import org.apache.spark.streaming.kafka010.LocationStrategies.PreferConsistent
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.schema.table.CarbonTable
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * This class handles of preparing the Dstream and merging the data onto target carbondata table
+ * for the kafka Source containing avro data.
+ * @param carbonTable target carbondata table.
+ */
+class AvroKafkaSource(carbonTable: CarbonTable) extends Source with Serializable {
+
+ override
+ def getStream(
+ ssc: StreamingContext,
+ sparkSession: SparkSession): CarbonDStream = {
+ // separate out the non carbon properties and prepare the kafka param
+ val kafkaParams = CarbonProperties.getInstance()
+ .getAllPropertiesInstance
+ .asScala
+ .filter { prop => !prop._1.startsWith("carbon") }
Review comment:
there are only some 4 to 5 properties with that and if you send unwanted configs, kafka will take care to ignore it unless used, so it's fine I guess.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737180374
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
Review comment:
updated
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-976192940
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] ydvpankaj99 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
ydvpankaj99 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977735479
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978916696
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6136/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947526289
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4323/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-976644016
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/520/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978917187
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4393/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979354884
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6139/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-976273279
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6130/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973832915
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6123/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977553422
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737180179
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
Review comment:
done
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-946948565
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6062/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734957286
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
Review comment:
We can simply mention kafka consumer group id carbon streamer tool is a part of in case of kafka ingestion source?
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] kunal642 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
kunal642 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r748061079
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/SchemaSource.scala
##########
@@ -0,0 +1,104 @@
+/*
+ * 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.carbondata.streamer
+
+import java.io.FileInputStream
+import java.net.URL
+
+import com.fasterxml.jackson.databind.{JsonNode, ObjectMapper}
+import org.apache.avro.Schema
+
+import org.apache.carbondata.common.logging.LogServiceFactory
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.datastore.filesystem.CarbonFile
+import org.apache.carbondata.core.datastore.impl.FileFactory
+import org.apache.carbondata.core.util.{CarbonProperties, CarbonUtil}
+
+/**
+ * The Schema Source class to read the schema files.
+ */
+abstract class SchemaSource {
+
+ val LOGGER = LogServiceFactory.getLogService(this.getClass.getName)
+
+ def getSchema: Schema
+
+}
+
+/**
+ * Reads schema from the Schema Registry when the schema provider type is SchemaRegistry.
+ */
+case class SchemaRegistry() extends SchemaSource {
+ override
+ def getSchema: Schema = {
+ var schemaRegistryURL = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_SCHEMA_REGISTRY_URL)
+ val topicName = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_KAFKA_INPUT_TOPIC)
+ val topics = topicName.split(CarbonCommonConstants.COMMA).map(_.trim)
+ val topicToConsider = if (topics.length > 0) {
+ topics(0)
+ } else {
+ topicName
+ }
+ schemaRegistryURL = s"$schemaRegistryURL/subjects/$topicToConsider-value/versions/latest"
+ val registry = new URL(schemaRegistryURL)
+ val connection = registry.openConnection
+ val mapper = new ObjectMapper
+ val node = mapper.readTree(connection.getInputStream)
+ if (!node.elements().hasNext) {
+ throw new CarbonDataStreamerException(
+ "The Schema registry URL is not valid, please check and retry.")
+ }
+ new Schema.Parser().parse(node.get("schema").asText)
+ }
+}
+
+/**
+ * Reads schema from the directory or filepath provider by user when the schema provider type is
+ * FileSchema.
+ */
+case class FileSchema() extends SchemaSource {
+ override
+ def getSchema: Schema = {
+ val schemaPath = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_SOURCE_SCHEMA_PATH)
+ LOGGER.info(s"Reading the schema file from the path: $schemaPath")
+ val updatedSchemaFilePath = if (FileFactory.getCarbonFile(schemaPath).isDirectory) {
+ val files = FileFactory.getCarbonFile(schemaPath)
+ .listFiles().toList.filter { file =>
Review comment:
better to use FileFilter to filter the files while listing
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-946900585
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/449/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734964791
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala
##########
@@ -0,0 +1,282 @@
+/*
+ * 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.carbondata.streamer
+
+import com.beust.jcommander.Parameter
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * The config class to parse the program arguments, validate and prepare the required configuration.
+ */
+class CarbonStreamerConfig() extends Serializable {
+
+ @Parameter(names = Array("--master"), description = "Spark master")
Review comment:
names parameter expects the alues in the form of Array? Can we supply single value without using Array keyword?
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973834743
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4380/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973994108
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4381/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-975139290
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-975540047
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/517/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977846131
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6134/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977857748
Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4391/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977890167
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978029018
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4392/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947064216
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4319/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734964917
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala
##########
@@ -0,0 +1,282 @@
+/*
+ * 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.carbondata.streamer
+
+import com.beust.jcommander.Parameter
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * The config class to parse the program arguments, validate and prepare the required configuration.
+ */
+class CarbonStreamerConfig() extends Serializable {
+
+ @Parameter(names = Array("--master"), description = "Spark master")
+ var sparkMaster: String = "local[2]"
+
+ @Parameter(names = Array("--target-table"),
+ description = "The target carbondata table where the data has to be merged. If this is not " +
+ "configured by user, the operation will fail.",
+ required = true)
+ var targetTableName: String = ""
+
+ @Parameter(names = Array("--database-name"),
+ description = "The database name where the target table is present to merge the incoming data" +
+ ". If not given by user, system will take the current database in the spark " +
+ "session.",
+ required = false)
Review comment:
I guess false is default value of required parameter. We can omit the parameter itself wherever the value is false.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737212541
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated in case of INSERT
+ * operation type. If set to true, the incoming batch will be deduplicated against the existing
+ * data in the target carbondata table.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE =
+ "carbon.streamer.insert.deduplicate";
+
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE_DEFAULT = "false";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated (when multiple updates
+ * for the same record key are present in the incoming batch) in case of UPSERT/UPDATE operation
+ * type. If set to true, the user needs to provide proper value for the source ordering field as
+ * well.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE =
+ "carbon.streamer.upsert.deduplicate";
+
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE_DEFAULT = "true";
+
+ /**
+ * Minimum batch interval time between 2 continuous ingestion in continuous mode. Should be
+ * specified in seconds.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_BATCH_INTERVAL = "carbon.streamer.batch.interval";
+
+ // TODO: check and then decide the default
+ public static final String CARBON_STREAMER_BATCH_INTERVAL_DEFAULT = "10";
+
+ /**
+ * The metadata columns coming from the source stream data, which should not be included in the
+ * target data.
Review comment:
yeah I have already created a new jira for that - https://issues.apache.org/jira/browse/CARBONDATA-4308
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-953059369
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/493/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973932774
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6124/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973993951
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/514/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973796825
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-970349301
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/510/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979370595
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979144281
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4395/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977629894
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977888888
Build Success with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/524/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978014269
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6135/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979024984
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] kunal642 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
kunal642 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979712032
LGTM
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] asfgit closed pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973785286
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4379/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737215047
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
Review comment:
In the java doc, we can mention - "kafka consumer group id carbon streamer tool is a part of in case of kafka ingestion source"
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737180069
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated in case of INSERT
+ * operation type. If set to true, the incoming batch will be deduplicated against the existing
+ * data in the target carbondata table.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE =
+ "carbon.streamer.insert.deduplicate";
+
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE_DEFAULT = "false";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated (when multiple updates
+ * for the same record key are present in the incoming batch) in case of UPSERT/UPDATE operation
+ * type. If set to true, the user needs to provide proper value for the source ordering field as
+ * well.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE =
+ "carbon.streamer.upsert.deduplicate";
+
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE_DEFAULT = "true";
+
+ /**
+ * Minimum batch interval time between 2 continuous ingestion in continuous mode. Should be
+ * specified in seconds.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_BATCH_INTERVAL = "carbon.streamer.batch.interval";
+
+ // TODO: check and then decide the default
+ public static final String CARBON_STREAMER_BATCH_INTERVAL_DEFAULT = "10";
Review comment:
removed TODO. 10seconds i have give default, but usually user will give the batch duration based on his incoming data, as we cannot decide the default value as every user will have different use cases
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-969961314
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4377/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-946666244
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6059/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947455180
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6063/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734957799
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
Review comment:
"carbon.streamer.merge.operation.field" is already defined. Let us change this to "carbon.streamer.record.key.field"
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-953057941
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4360/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737178902
##########
File path: examples/spark/src/main/scala/org/apache/carbondata/examples/SparkStreamingExample.scala
##########
@@ -169,14 +169,21 @@ object SparkStreamingExample {
println(System.currentTimeMillis().toString() +
" at batch time: " + time.toString() +
" the count of received data: " + df.count())
+ print("********************** rdd is: " + rdd.toString())
+ throw new Exception("test")
CarbonSparkStreamingFactory.getStreamSparkStreamingWriter(spark, "default", tableName)
.mode(SaveMode.Append)
.writeStreamData(df, time)
+ print("x")
Review comment:
unwanted changes, reverted
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977624482
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6131/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] ydvpankaj99 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
ydvpankaj99 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978944358
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978872877
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/526/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978315690
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/525/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-973836962
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/513/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
Indhumathi27 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r735270044
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonDStream.scala
##########
@@ -0,0 +1,59 @@
+/*
+ * 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.carbondata.streamer
+
+import org.apache.spark.sql.{Dataset, Row, SparkSession}
+import org.apache.spark.sql.CarbonSession._
+import org.apache.spark.sql.execution.command.mutation.merge.MergeOperationType
+import org.apache.spark.streaming.dstream.DStream
+
+/**
+ * Wrapper class to hold the spark's DStream object as Dstream can be of different types based on
+ * the different input sources like text, avro, kafka etc.
+ * @param sparkSession Spark Session
+ * @param inputDStream Spark's DStream object
+ */
+case class CarbonDStream(
+ @transient sparkSession: SparkSession,
Review comment:
looks like sparksession is not used anywhere. please remove if not needed
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/AvroKafkaSource.scala
##########
@@ -0,0 +1,64 @@
+/*
+ * 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.carbondata.streamer
+
+import scala.collection.JavaConverters._
+
+import org.apache.avro.generic.GenericRecord
+import org.apache.spark.sql.SparkSession
+import org.apache.spark.streaming.StreamingContext
+import org.apache.spark.streaming.dstream.DStream
+import org.apache.spark.streaming.kafka010.ConsumerStrategies.Subscribe
+import org.apache.spark.streaming.kafka010.KafkaUtils
+import org.apache.spark.streaming.kafka010.LocationStrategies.PreferConsistent
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.schema.table.CarbonTable
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * This class handles of preparing the Dstream and merging the data onto target carbondata table
+ * for the kafka Source containing avro data.
+ * @param carbonTable target carbondata table.
+ */
+class AvroKafkaSource(carbonTable: CarbonTable) extends Source with Serializable {
+
+ override
+ def getStream(
+ ssc: StreamingContext,
+ sparkSession: SparkSession): CarbonDStream = {
+ // separate out the non carbon properties and prepare the kafka param
+ val kafkaParams = CarbonProperties.getInstance()
+ .getAllPropertiesInstance
+ .asScala
+ .filter { prop => !prop._1.startsWith("carbon") }
Review comment:
there are some carbon properties which starts with spark keyword, which also will be added to kafkaparams using this check. May be you can add new kafka-carbon properties preceeding with kafka keyword to identify as kafka params
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonDataStreamer.scala
##########
@@ -0,0 +1,135 @@
+/*
+ * 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.carbondata.streamer
+
+import com.beust.jcommander.JCommander
+import org.apache.spark.sql.{CarbonEnv, SparkSession}
+import org.apache.spark.sql.catalyst.TableIdentifier
+import org.apache.spark.sql.execution.strategy.CarbonPlanHelper
+import org.apache.spark.streaming.{Seconds, StreamingContext}
+
+import org.apache.carbondata.common.logging.LogServiceFactory
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.metadata.schema.table.CarbonTable
+import org.apache.carbondata.core.util.CarbonProperties
+import org.apache.carbondata.core.util.path.CarbonTablePath
+
+/**
+ * Carbondata streamer, which is a spark streaming application to pull data from different
+ * sources and merge onto target cabondata table.
+ */
+object CarbonDataStreamer {
+
+ val LOGGER = LogServiceFactory.getLogService(this.getClass.getName)
+
+ def createConfig(streamerConfig: CarbonStreamerConfig,
+ args: Array[String]): Unit = {
+ JCommander.newBuilder().addObject(streamerConfig).build().parse(args: _*)
+ }
+
+ /**
+ * This method creates streaming context for the first time if no checkpoint directory present for
+ * the table.
+ *
+ * @param sparkSession Spark Session.
+ * @param targetCarbonDataTable target carbondata table to merge.
+ * @return Spark StreamingContext
+ */
+ def createStreamingContext(sparkSession: SparkSession,
+ targetCarbonDataTable: CarbonTable): StreamingContext = {
+ val batchDuration = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_BATCH_INTERVAL,
+ CarbonCommonConstants.CARBON_STREAMER_BATCH_INTERVAL_DEFAULT).toLong
+ val ssc = new StreamingContext(sparkSession.sparkContext, Seconds(batchDuration))
+
+ // get the source Dstream based on source type
+ val sourceType = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_SOURCE_TYPE,
+ CarbonCommonConstants.CARBON_STREAMER_SOURCE_TYPE_DEFAULT)
+ val sourceCarbonDStream = SourceFactory.apply(sourceType,
+ ssc,
+ sparkSession,
+ targetCarbonDataTable)
+ // Perform merge on source stream
+ SourceFactory.source.prepareDFAndMerge(sourceCarbonDStream)
+ // set the checkpoint directory for spark streaming
+ ssc.checkpoint(CarbonTablePath.getStreamingCheckpointDir(targetCarbonDataTable.getTablePath))
+ ssc
+ }
+
+ def main(args: Array[String]): Unit = {
+ // parse the incoming arguments and prepare the configurations
+ val streamerConfigs = new CarbonStreamerConfig()
+ createConfig(streamerConfigs, args)
+ streamerConfigs.setConfigsToCarbonProperty(streamerConfigs)
+
+ val spark = SparkSession
+ .builder()
+ .master(streamerConfigs.sparkMaster)
+ .appName("CarbonData Streamer tool")
+ .config("spark.sql.extensions", "org.apache.spark.sql.CarbonExtensions")
+ .config("spark.streaming.driver.writeAheadLog.allowBatching", "true")
+ .config("spark.streaming.driver.writeAheadLog.batchingTimeout", 15000)
+ .enableHiveSupport()
+ .getOrCreate()
+ CarbonEnv.getInstance(spark)
+
+ SparkSession.setActiveSession(spark)
+ SparkSession.setDefaultSession(spark)
+
+ val targetTableName = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_TABLE_NAME)
+
+ var databaseName = CarbonProperties.getInstance()
+ .getProperty(CarbonCommonConstants.CARBON_STREAMER_DATABASE_NAME)
+ databaseName = if (databaseName.equalsIgnoreCase("")) {
+ spark.sessionState.catalog.getCurrentDatabase
+ } else {
+ databaseName
+ }
+
+ // if the target table is non-carbondata table, throw exception
+ if (!CarbonPlanHelper.isCarbonTable(TableIdentifier(targetTableName, Some(databaseName)))) {
+ throw new UnsupportedOperationException("The merge operation using CarbonData Streamer tool" +
+ " for non carbondata table is not supported.")
+ }
+
+ val targetCarbonDataTable = CarbonEnv.getCarbonTable(Some(databaseName), targetTableName)(spark)
+ val dbAndTb = databaseName + CarbonCommonConstants.POINT + targetTableName
Review comment:
can directly use targetCarbonDataTable.getqualifiedname
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala
##########
@@ -0,0 +1,282 @@
+/*
+ * 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.carbondata.streamer
+
+import com.beust.jcommander.Parameter
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * The config class to parse the program arguments, validate and prepare the required configuration.
+ */
+class CarbonStreamerConfig() extends Serializable {
+
+ @Parameter(names = Array("--master"), description = "Spark master")
+ var sparkMaster: String = "local[2]"
+
+ @Parameter(names = Array("--target-table"),
+ description = "The target carbondata table where the data has to be merged. If this is not " +
+ "configured by user, the operation will fail.",
+ required = true)
+ var targetTableName: String = ""
+
+ @Parameter(names = Array("--database-name"),
+ description = "The database name where the target table is present to merge the incoming data" +
+ ". If not given by user, system will take the current database in the spark " +
+ "session.",
+ required = false)
+ var databaseName: String = ""
+
+ @Parameter(names = Array("--source-type"),
+ description = "Source type to ingest data from. It can be kafka or DFS",
+ required = false)
+ var sourceType: String = CarbonCommonConstants.CARBON_STREAMER_SOURCE_TYPE_DEFAULT
+
+ @Parameter(names = Array("--dfs-source-input-path"),
+ description = "An absolute path on a given file system from where data needs to be read to " +
+ "ingest into the target carbondata table. Mandatory if the ingestion source " +
+ "type is DFS.",
+ required = false)
+ var dfsSourceInputPth: String = ""
+
+ // ----------- kafka properties ----------------------
+ @Parameter(names = Array("--input-kafka-topic"),
+ description = "Kafka topics to consume data from. Mandatory if Kafka is selected as the " +
+ "ingestion source. If multiple topic are present, the varue of the property can" +
+ " be comma separated topic names. If not present in case of kafka source, " +
+ "operation will fail.",
+ required = false)
+ var inputKafkaTopic: String = ""
+
+ @Parameter(names = Array("--brokers"),
+ description = "Kafka brokers to connect to in case Kafka is selected as an ingestion source. " +
+ "If not present in case of kafka source, operation will fail.",
+ required = false)
+ var kafkaBrokerList: String = ""
+
+ @Parameter(names = Array("--kafka-initial-offset-type"),
+ description = "Kafka offset to fall back to in case no checkpoint is available for starting " +
+ "ingestion. Valid values - Latest and Earliest.",
+ required = false)
+ var kafkaInitialOffsetType: String = CarbonCommonConstants
+ .CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT
+
+ @Parameter(names = Array("--key-deserializer"),
+ description = "Key deserializer for kafka. Mandatory for Kafka source.",
+ required = false)
+ var keyDeserializer: String = CarbonCommonConstants.KAFKA_KEY_DESERIALIZER_DEFAULT
+
+ @Parameter(names = Array("--value-deserializer"),
+ description = "value deserializer for kafka. Mandatory for Kafka source.",
+ required = false)
+ var valueDeserializer: String = CarbonCommonConstants.KAFKA_VALUE_DESERIALIZER_DEFAULT
+
+ @Parameter(names = Array("--schema-registry-url"),
+ description = "Schema registry url, in case schema registry is selected as schema provider.",
+ required = false)
+ var schemaRegistryURL: String = ""
+
+ @Parameter(names = Array("--group-id"),
+ description = "This property is required if the consumer uses either the group management " +
+ "functionality by using subscribe(topic) or the Kafka-based offset management " +
+ "strategy.",
+ required = false)
+ var groupId: String = ""
+
+ // -------------------------------------------------------------------- //
+
+ @Parameter(names = Array("--input-payload-format"),
+ description = "Format of the incoming data/payload.",
+ required = false)
+ var inputPayloadFormat: String = CarbonCommonConstants
+ .CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT
+
+ @Parameter(names = Array("--schema-provider-type"),
+ description = "Schema provider for the incoming batch of data. Currently, 2 types of schema " +
+ "providers are supported - FileBasedProvider and SchemaRegistryProvider",
+ required = false)
+ var schemaProviderType: String = CarbonCommonConstants.CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT
+
+ @Parameter(names = Array("--source-schema-file-path"),
+ description = "Absolute Path to file containing the schema of incoming data. Mandatory if " +
+ "file-based schema provider is selected.",
+ required = false)
+ var sourceSchemaFilePath: String = ""
+
+ @Parameter(names = Array("--merge-operation-type"),
+ description = "Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT",
+ required = false)
+ var mergeOperationType: String = CarbonCommonConstants
+ .CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT
+
+ @Parameter(names = Array("--delete-operation-field"),
+ description = "Name of the field in source schema reflecting the IUD operation types on " +
+ "source data rows.",
+ required = false)
+ var deleteOperationField: String = ""
+
+ @Parameter(names = Array("--delete-field-value"),
+ description = "Name of the field in source schema reflecting the IUD operation types on " +
+ "source data rows.",
+ required = false)
+ var deleteFieldValue: String = ""
+
+ @Parameter(names = Array("--source-ordering-field"),
+ description = "Name of the field from source schema whose value can be used for picking the " +
+ "latest updates for a particular record in the incoming batch in case of " +
+ "duplicates record keys. Useful if the write operation type is UPDATE or UPSERT" +
+ ". This will be used only if carbon.streamer.upsert.deduplicate is enabled.",
+ required = true)
+ var sourceOrderingField: String = CarbonCommonConstants
+ .CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT
+
+ @Parameter(names = Array("--record-key-field"),
+ description = "Join key/record key for a particular record. Will be used for deduplication of" +
+ " the incoming batch. If not present operation will fail.",
+ required = true)
+ var keyColumn: String = ""
+
+ @Parameter(names = Array("--deduplicate"),
+ description = "This property specifies if the incoming batch needs to be deduplicated in case" +
+ " of INSERT operation type. If set to true, the incoming batch will be " +
+ "deduplicated against the existing data in the target carbondata table.",
+ required = false)
+ var deduplicateEnabled: String = CarbonCommonConstants.CARBON_STREAMER_INSERT_DEDUPLICATE_DEFAULT
+
+ @Parameter(names = Array("--combine-before-upsert"),
+ description = "This property specifies if the incoming batch needs to be deduplicated (when " +
+ "multiple updates for the same record key are present in the incoming batch) in" +
+ " case of UPSERT/UPDATE operation type. If set to true, the user needs to " +
+ "provide proper value for the source ordering field as well.",
+ required = false)
+ var isCombineBeforeUpsert: String = CarbonCommonConstants
+ .CARBON_STREAMER_UPSERT_DEDUPLICATE_DEFAULT
+
+ @Parameter(names = Array("--min-batch-interval"),
+ description = "Minimum batch interval time between 2 continuous ingestion in continuous mode." +
+ " Should be specified in seconds.",
+ required = false)
+ var batchInterval: String = CarbonCommonConstants.CARBON_STREAMER_BATCH_INTERVAL_DEFAULT
+
+ @Parameter(names = Array("--meta-columns"),
+ description = "Metadata columns added in source dataset. Please mention all the metadata" +
+ " columns as comma separated values which should not be written to the " +
+ "final carbondata table",
+ required = false)
+ var metaColumnsAdded: String = ""
+
+ /**
+ * This method set the configuration to carbonproperties which are passed as a arguments while
+ * starting the streamer application
+ */
+ def setConfigsToCarbonProperty(streamerConfig: CarbonStreamerConfig): Unit = {
+ val carbonPropertiesInstance = CarbonProperties.getInstance()
+
+ if (streamerConfig.targetTableName.equalsIgnoreCase("")) {
+ throw new CarbonDataStreamerException(
+ "Target carbondata table is not configured. Please configure and retry.")
+ }
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_TABLE_NAME,
+ streamerConfig.targetTableName)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_DATABASE_NAME,
+ streamerConfig.databaseName)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_SOURCE_TYPE,
+ streamerConfig.sourceType)
+ if (sourceType.equalsIgnoreCase(SourceFactory.DFS.toString) &&
+ dfsSourceInputPth.equalsIgnoreCase("")) {
+ throw new CarbonDataStreamerException(
+ "The DFS source path to read and ingest data onto target carbondata table is must in case" +
+ " of DFS source type.")
+ }
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_DFS_INPUT_PATH,
+ streamerConfig.dfsSourceInputPth)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_SCHEMA_PROVIDER,
+ streamerConfig.schemaProviderType)
+ if (schemaProviderType.equalsIgnoreCase(CarbonCommonConstants
+ .CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT) &&
+ streamerConfig.schemaRegistryURL.equalsIgnoreCase("")) {
+ throw new CarbonDataStreamerException(
+ "Schema registry URL is must when the schema provider is set as SchemaRegistry. Please " +
+ "configure and retry.")
+ } else if (schemaProviderType.equalsIgnoreCase(CarbonCommonConstants
+ .CARBON_STREAMER_FILE_SCHEMA_PROVIDER) &&
+ streamerConfig.sourceSchemaFilePath.equalsIgnoreCase("")) {
+ throw new CarbonDataStreamerException(
+ "Schema file path is must when the schema provider is set as FileSchema. Please " +
+ "configure and retry.")
+ }
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_SCHEMA_REGISTRY_URL,
+ streamerConfig.schemaRegistryURL)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_SOURCE_SCHEMA_PATH,
+ streamerConfig.sourceSchemaFilePath)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_INPUT_PAYLOAD_FORMAT,
+ streamerConfig.inputPayloadFormat)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_MERGE_OPERATION_TYPE,
+ streamerConfig.mergeOperationType)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants
+ .CARBON_STREAMER_MERGE_OPERATION_FIELD, streamerConfig.deleteOperationField)
+ if ((deleteOperationField.isEmpty && deleteFieldValue.nonEmpty) ||
+ (deleteOperationField.nonEmpty && deleteFieldValue.isEmpty)) {
+ throw new CarbonDataStreamerException(
+ "Either both the values of --delete-operation-field and --delete-field-value should not " +
+ "be configured or both must be configured. Please configure and retry.")
+ }
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants
+ .CARBON_STREAMER_SOURCE_ORDERING_FIELD, streamerConfig.sourceOrderingField)
+ if (streamerConfig.keyColumn.isEmpty) {
+ throw new CarbonDataStreamerException(
+ "The key column is must for the merge operation. Please configure and retry.")
+ }
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_KEY_FIELD,
+ streamerConfig.keyColumn)
+ carbonPropertiesInstance.addProperty(CarbonCommonConstants.CARBON_STREAMER_INSERT_DEDUPLICATE,
+ streamerConfig.deduplicateEnabled.toString)
Review comment:
streamerConfig.deduplicateEnabled and streamerConfig.isCombineBeforeUpsert are of type STRING only. no need to cast it to string
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-968735226
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6117/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979016375
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4394/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-977582879
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4388/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-979264283
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-969070831
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4374/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-970049384
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6120/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947526684
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6066/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737168684
##########
File path: integration/spark/src/main/scala/org/apache/carbondata/streamer/CarbonStreamerConfig.scala
##########
@@ -0,0 +1,282 @@
+/*
+ * 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.carbondata.streamer
+
+import com.beust.jcommander.Parameter
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+import org.apache.carbondata.core.util.CarbonProperties
+
+/**
+ * The config class to parse the program arguments, validate and prepare the required configuration.
+ */
+class CarbonStreamerConfig() extends Serializable {
+
+ @Parameter(names = Array("--master"), description = "Spark master")
+ var sparkMaster: String = "local[2]"
+
+ @Parameter(names = Array("--target-table"),
+ description = "The target carbondata table where the data has to be merged. If this is not " +
+ "configured by user, the operation will fail.",
+ required = true)
+ var targetTableName: String = ""
+
+ @Parameter(names = Array("--database-name"),
+ description = "The database name where the target table is present to merge the incoming data" +
+ ". If not given by user, system will take the current database in the spark " +
+ "session.",
+ required = false)
Review comment:
yeah, we can remove that, but for some it is true, so if we keep this parameter and mention it as false, its fine and looks cleaner, so I think it's ok to keep it.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737181123
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
Review comment:
the comment is not clear, can you please elaborate a bit
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-952708751
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6103/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734958045
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated in case of INSERT
+ * operation type. If set to true, the incoming batch will be deduplicated against the existing
+ * data in the target carbondata table.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE =
+ "carbon.streamer.insert.deduplicate";
+
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE_DEFAULT = "false";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated (when multiple updates
+ * for the same record key are present in the incoming batch) in case of UPSERT/UPDATE operation
+ * type. If set to true, the user needs to provide proper value for the source ordering field as
+ * well.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE =
+ "carbon.streamer.upsert.deduplicate";
+
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE_DEFAULT = "true";
+
+ /**
+ * Minimum batch interval time between 2 continuous ingestion in continuous mode. Should be
+ * specified in seconds.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_BATCH_INTERVAL = "carbon.streamer.batch.interval";
+
+ // TODO: check and then decide the default
+ public static final String CARBON_STREAMER_BATCH_INTERVAL_DEFAULT = "10";
+
+ /**
+ * The metadata columns coming from the source stream data, which should not be included in the
+ * target data.
Review comment:
We can add need to be given as comma separated strings.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734958004
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated in case of INSERT
+ * operation type. If set to true, the incoming batch will be deduplicated against the existing
+ * data in the target carbondata table.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE =
+ "carbon.streamer.insert.deduplicate";
+
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE_DEFAULT = "false";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated (when multiple updates
+ * for the same record key are present in the incoming batch) in case of UPSERT/UPDATE operation
+ * type. If set to true, the user needs to provide proper value for the source ordering field as
+ * well.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE =
+ "carbon.streamer.upsert.deduplicate";
+
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE_DEFAULT = "true";
+
+ /**
+ * Minimum batch interval time between 2 continuous ingestion in continuous mode. Should be
+ * specified in seconds.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_BATCH_INTERVAL = "carbon.streamer.batch.interval";
+
+ // TODO: check and then decide the default
+ public static final String CARBON_STREAMER_BATCH_INTERVAL_DEFAULT = "10";
Review comment:
How are we planning to decide the default value for this field?
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-969072786
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/507/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-969370188
Build Failed with Spark 3.1, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_3.1/509/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] ydvpankaj99 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
ydvpankaj99 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-947365364
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-946633056
This PR is dependent on #4227, first commit will be of #4227 and second commit will be of this PR
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r734956351
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -22,7 +22,7 @@
import org.apache.carbondata.common.annotations.InterfaceStability;
import org.apache.carbondata.core.util.annotations.CarbonProperty;
-public final class CarbonCommonConstants {
+public final class CarbonCommonConstants {
Review comment:
can remove the extra space here.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-946899443
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4316/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737179445
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
+ */
+ @CarbonProperty
+ public static final String KAFKA_GROUP_ID = "group.id";
+
+ // ***************************************************************
+
+ /**
+ * Format of the incoming data/payload.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT =
+ "carbon.streamer.input.payload.format";
+
+ public static final String CARBON_STREAMER_INPUT_PAYLOAD_FORMAT_DEFAULT = "avro";
+
+ /**
+ * Schema provider for the incoming batch of data. Currently, 2 types of schema providers are
+ * supported - FileBasedProvider and SchemaRegistryProvider
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER = "carbon.streamer.schema.provider";
+
+ public static final String CARBON_STREAMER_SCHEMA_PROVIDER_DEFAULT = "SchemaRegistry";
+
+ public static final String CARBON_STREAMER_FILE_SCHEMA_PROVIDER = "FileSchema";
+
+ /**
+ * Absolute Path to file containing the schema of incoming data. Mandatory if file-based schema
+ * provider is selected.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_SCHEMA_PATH =
+ "carbon.streamer.source.schema.path";
+
+ /**
+ * Different merge operations are supported - INSERT, UPDATE, DELETE, UPSERT
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE =
+ "carbon.streamer.merge.operation.type";
+
+ public static final String CARBON_STREAMER_MERGE_OPERATION_TYPE_DEFAULT = "upsert";
+
+ /**
+ * Name of the field in source schema reflecting the IUD operation types on source data rows.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_MERGE_OPERATION_FIELD =
+ "carbon.streamer.merge.operation.field";
+
+ /**
+ * Name of the field from source schema whose value can be used for picking the latest updates for
+ * a particular record in the incoming batch in case of duplicates record keys. Useful if the
+ * write operation type is UPDATE or UPSERT. This will be used only if
+ * carbon.streamer.upsert.deduplicate is enabled.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD =
+ "carbon.streamer.source.ordering.field";
+
+ public static final String CARBON_STREAMER_SOURCE_ORDERING_FIELD_DEFAULT = "";
+
+ /**
+ * Join key/record key for a particular record. Will be used for deduplication of the incoming
+ * batch. If not present operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KEY_FIELD = "carbon.streamer.merge.operation.field";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated in case of INSERT
+ * operation type. If set to true, the incoming batch will be deduplicated against the existing
+ * data in the target carbondata table.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE =
+ "carbon.streamer.insert.deduplicate";
+
+ public static final String CARBON_STREAMER_INSERT_DEDUPLICATE_DEFAULT = "false";
+
+ /**
+ * This property specifies if the incoming batch needs to be deduplicated (when multiple updates
+ * for the same record key are present in the incoming batch) in case of UPSERT/UPDATE operation
+ * type. If set to true, the user needs to provide proper value for the source ordering field as
+ * well.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE =
+ "carbon.streamer.upsert.deduplicate";
+
+ public static final String CARBON_STREAMER_UPSERT_DEDUPLICATE_DEFAULT = "true";
+
+ /**
+ * Minimum batch interval time between 2 continuous ingestion in continuous mode. Should be
+ * specified in seconds.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_BATCH_INTERVAL = "carbon.streamer.batch.interval";
+
+ // TODO: check and then decide the default
+ public static final String CARBON_STREAMER_BATCH_INTERVAL_DEFAULT = "10";
+
+ /**
+ * The metadata columns coming from the source stream data, which should not be included in the
+ * target data.
Review comment:
updated here, i also need to add the properties in document, I'm think of raising new PR just for documentation, else this PR will become huge
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] pratyakshsharma commented on a change in pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
pratyakshsharma commented on a change in pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#discussion_r737215696
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -2681,4 +2681,220 @@ private CarbonCommonConstants() {
public static final String CARBON_CDC_MINMAX_PRUNING_ENABLED_DEFAULT = "false";
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // CDC streamer configs start here
+ //////////////////////////////////////////////////////////////////////////////////////////
+ /**
+ * The database name where the target table is present to merge the incoming data. If not given by
+ * user, system will take the current database in the spark session.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DATABASE_NAME = "carbon.streamer.target.database";
+
+ /**
+ * The target carbondata table where the data has to be merged. If this is not configured by user,
+ * the operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_TABLE_NAME = "carbon.streamer.target.table";
+
+ /**
+ * Source type to ingest data from. It can be kafka or DFS
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SOURCE_TYPE = "carbon.streamer.source.type";
+
+ public static final String CARBON_STREAMER_SOURCE_TYPE_DEFAULT = "kafka";
+
+ /**
+ * An absolute path on a given file system from where data needs to be read to ingest into the
+ * target carbondata table. Mandatory if the ingestion source type is DFS.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_DFS_INPUT_PATH = "carbon.streamer.dfs.input.path";
+
+ /**
+ * Schema registry url in case schema registry is selected as schema provider.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_SCHEMA_REGISTRY_URL = "schema.registry.url";
+
+ // **************** kafka properties constants *********************
+ /**
+ * Kafka topics to consume data from. Mandatory if Kafka is selected as the ingestion source.
+ * If multiple topic are present, the value of the property can be comma separated topic names.
+ * If not present in case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String CARBON_STREAMER_KAFKA_INPUT_TOPIC =
+ "carbon.streamer.input.kafka.topic";
+
+ /**
+ * Kafka brokers to connect to in case Kafka is selected as an ingestion source. If not present in
+ * case of kafka source, operation will fail.
+ */
+ @CarbonProperty
+ public static final String KAFKA_BROKERS = "bootstrap.servers";
+
+ /**
+ * Kafka offset to fall back to in case no checkpoint is available for starting ingestion.
+ * Valid values - Latest and Earliest.
+ */
+ @CarbonProperty
+ public static final String KAFKA_INITIAL_OFFSET_TYPE = "auto.offset.reset";
+
+ public static final String CARBON_STREAMER_KAFKA_INITIAL_OFFSET_TYPE_DEFAULT = "earliest";
+
+ /**
+ * Key deserializer for kafka. Mandatory for Kafka source.
+ */
+ @CarbonProperty
+ public static final String KAFKA_KEY_DESERIALIZER = "key.deserializer";
+
+ // TODO: check how to take this value, class name or one wrapper above the deserializer
+ public static final String KAFKA_KEY_DESERIALIZER_DEFAULT =
+ "org.apache.kafka.common.serialization.StringDeserializer";
+
+ /**
+ * Value deserializer for Kafka. Mandatory for Kafka source
+ */
+ @CarbonProperty
+ public static final String KAFKA_VALUE_DESERIALIZER = "value.deserializer";
+
+ public static final String KAFKA_VALUE_DESERIALIZER_DEFAULT =
+ "io.confluent.kafka.serializers.KafkaAvroDeserializer";
+
+ public static final String AVRO_SCHEMA = "carbon.streamer.avro.schema.deserialize";
+
+ /**
+ * Auto commit to kafka. If enabled, kafka will blindly commit the offsets to offset topic whether
+ * the respective operation is failed or not. So default we will keep it false.
+ */
+ public static final String KAFKA_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+
+ public static final String KAFKA_ENABLE_AUTO_COMMIT_DEFAULT = "false";
+
+ /**
+ * This property is required if the consumer uses either the group management functionality by
+ * using subscribe(topic) or the Kafka-based offset management strategy.
Review comment:
The existing comment is not very clear I feel.
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] akashrn5 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
akashrn5 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-978843665
retest this please
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-975207386
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/6127/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-975538634
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4384/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [carbondata] CarbonDataQA2 commented on pull request #4235: [CARBONDATA-4305] Support Carbondata Streamer tool for incremental fetch and merge from kafka and DFS Sources
Posted by GitBox <gi...@apache.org>.
CarbonDataQA2 commented on pull request #4235:
URL: https://github.com/apache/carbondata/pull/4235#issuecomment-976219506
Build Failed with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/4387/
--
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: dev-unsubscribe@carbondata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org