diff --git a/presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaConnectorConfig.java b/presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaConnectorConfig.java index 25c098e64cd6..6a1c2e07f740 100644 --- a/presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaConnectorConfig.java +++ b/presto-kafka/src/main/java/com/facebook/presto/kafka/KafkaConnectorConfig.java @@ -14,21 +14,13 @@ package com.facebook.presto.kafka; import com.facebook.airlift.configuration.Config; -import com.facebook.airlift.configuration.ConfigDescription; import com.facebook.presto.kafka.schema.file.FileTableDescriptionSupplier; import com.facebook.presto.kafka.server.file.FileKafkaClusterMetadataSupplier; -import com.google.common.base.Splitter; -import com.google.common.collect.ImmutableList; import io.airlift.units.Duration; import io.airlift.units.MinDuration; import javax.validation.constraints.NotNull; -import java.io.File; -import java.util.List; - -import static com.google.common.collect.ImmutableList.toImmutableList; - public class KafkaConnectorConfig { /** @@ -66,8 +58,6 @@ public class KafkaConnectorConfig */ private String clusterMetadataSupplier = FileKafkaClusterMetadataSupplier.NAME; - private List resourceConfigFiles = ImmutableList.of(); - @NotNull public String getDefaultSchema() { @@ -155,20 +145,4 @@ public KafkaConnectorConfig setHideInternalColumns(boolean hideInternalColumns) this.hideInternalColumns = hideInternalColumns; return this; } - - @NotNull - public List getResourceConfigFiles() - { - return resourceConfigFiles; - } - - @Config("kafka.config.resources") - @ConfigDescription("Optional config files") - public KafkaConnectorConfig setResourceConfigFiles(String files) - { - this.resourceConfigFiles = Splitter.on(',').trimResults().omitEmptyStrings().splitToList(files).stream() - .map(File::new) - .collect(toImmutableList()); - return this; - } } diff --git a/presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaConnectorConfig.java b/presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaConnectorConfig.java index 2a1e4b115727..248a8898d1a5 100644 --- a/presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaConnectorConfig.java +++ b/presto-kafka/src/test/java/com/facebook/presto/kafka/TestKafkaConnectorConfig.java @@ -32,8 +32,7 @@ public void testDefaults() .setTableDescriptionSupplier(FileTableDescriptionSupplier.NAME) .setHideInternalColumns(true) .setMaxPartitionFetchBytes(1048576) - .setMaxPollRecords(500) - .setResourceConfigFiles("")); + .setMaxPollRecords(500)); } @Test @@ -47,7 +46,6 @@ public void testExplicitPropertyMappings() .put("kafka.hide-internal-columns", "false") .put("kafka.max-partition-fetch-bytes", "1024") .put("kafka.max-poll-records", "1000") - .put("kafka.config.resources", "test-config.file") .build(); KafkaConnectorConfig expected = new KafkaConnectorConfig() @@ -57,8 +55,7 @@ public void testExplicitPropertyMappings() .setKafkaConnectTimeout("1h") .setHideInternalColumns(false) .setMaxPartitionFetchBytes(1024) - .setMaxPollRecords(1000) - .setResourceConfigFiles("test-config.file"); + .setMaxPollRecords(1000); ConfigAssertions.assertFullMapping(properties, expected); }