Skip to content

Commit

Permalink
Merge pull request #1636 from Dippatel98:gmk-templates
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 642304235
  • Loading branch information
cloud-teleport committed Jun 11, 2024
2 parents 74266d7 + 9418225 commit 7722344
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.google.cloud.teleport.metadata.TemplateParameter;
import com.google.cloud.teleport.v2.kafka.options.KafkaReadOptions;
import com.google.cloud.teleport.v2.kafka.options.SchemaRegistryOptions;
import com.google.cloud.teleport.v2.kafka.values.KafkaAuthenticationMethod;
import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
import org.apache.beam.sdk.options.Default;

Expand All @@ -43,23 +42,6 @@ public interface KafkaToBigQueryFlexOptions

void setReadBootstrapServerAndTopic(String value);

@TemplateParameter.Enum(
name = "kafkaReadAuthenticationMode",
order = 2,
groupName = "Source",
enumOptions = {
@TemplateParameter.TemplateEnumOption(KafkaAuthenticationMethod.SASL_PLAIN),
@TemplateParameter.TemplateEnumOption(KafkaAuthenticationMethod.NONE),
},
description = "Kafka Read Authentication Mode",
helpText =
"The mode of authentication to use with the Kafka cluster. "
+ "Use NONE for no authentication"
+ " or SASL_PLAIN for SASL/PLAIN username and password. "
+ " Apache Kafka for BigQuery only supports the SASL_PLAIN authentication mode.")
@Default.String(KafkaAuthenticationMethod.SASL_PLAIN)
String getKafkaReadAuthenticationMode();

@TemplateParameter.Boolean(
order = 3,
groupName = "Source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@
"The Apache Kafka broker server must be running and be reachable from the Dataflow worker machines.",
"The Apache Kafka topics must exist and the messages must be encoded in a valid JSON format."
},
skipOptions = {
"useStorageWriteApi",
"kafkaReadKeystoreLocation",
"kafkaReadTruststoreLocation",
"kafkaReadTruststorePasswordSecretId",
"kafkaReadKeystorePasswordSecretId",
"kafkaReadKeyPasswordSecretId"
})
skipOptions = {"useStorageWriteApi"})
public class KafkaToBigQueryFlex {

/* Logger for class. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.google.cloud.teleport.v2.kafka.transforms.KafkaTransform;
import com.google.cloud.teleport.v2.kafka.utils.KafkaConfig;
import com.google.cloud.teleport.v2.kafka.utils.KafkaTopicUtils;
import com.google.cloud.teleport.v2.kafka.values.KafkaAuthenticationMethod;
import com.google.cloud.teleport.v2.transforms.WriteTransform;
import java.util.HashMap;
import java.util.List;
Expand All @@ -48,14 +47,7 @@
optionsClass = KafkaToGcsFlex.KafkaToGcsOptions.class,
flexContainerName = "kafka-to-gcs-flex",
contactInformation = "https://cloud.google.com/support",
requirements = {"The output Google Cloud Storage directory must exist."},
skipOptions = {
"kafkaReadKeystoreLocation",
"kafkaReadTruststoreLocation",
"kafkaReadTruststorePasswordSecretId",
"kafkaReadKeystorePasswordSecretId",
"kafkaReadKeyPasswordSecretId"
})
requirements = {"The output Google Cloud Storage directory must exist."})
public class KafkaToGcsFlex {
public interface KafkaToGcsOptions
extends PipelineOptions, DataflowPipelineOptions, KafkaReadOptions, SchemaRegistryOptions {
Expand All @@ -72,23 +64,6 @@ public interface KafkaToGcsOptions

void setReadBootstrapServerAndTopic(String value);

@TemplateParameter.Enum(
name = "kafkaReadAuthenticationMode",
order = 19,
groupName = "Source",
enumOptions = {
@TemplateParameter.TemplateEnumOption(KafkaAuthenticationMethod.SASL_PLAIN),
@TemplateParameter.TemplateEnumOption(KafkaAuthenticationMethod.NONE),
},
description = "Kafka Read Authentication Mode",
helpText =
"The mode of authentication to use with the Kafka cluster. "
+ "Use NONE for no authentication and "
+ "SASL_PLAIN for SASL/PLAIN username and password. "
+ " Apache Kafka for BigQuery only supports the SASL_PLAIN authentication mode.")
@Default.String(KafkaAuthenticationMethod.SASL_PLAIN)
String getKafkaReadAuthenticationMode();

@TemplateParameter.Duration(
order = 20,
optional = true,
Expand Down

0 comments on commit 7722344

Please sign in to comment.