[geode] branch develop updated (2dae396 -> b3d4458)
This is an automated email from the ASF dual-hosted git repository. mivanac pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from 2dae396 GEODE-7798: Ignore PubSubTest until the flakiness can be removed (#4721) add b3d4458 GEODE-7774: Remove addAll in ReflectionLuceneSerializer (#4718) No new revisions were added by this update. Summary of changes: .../internal/repository/serializer/ReflectionLuceneSerializer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
[geode-kafka-connector] branch master updated: Removed javadoc issues
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 9a62655 Removed javadoc issues 9a62655 is described below commit 9a62655aa43cdcadc0841eeab548d600f3daa884 Author: Naburun Nag AuthorDate: Wed Feb 19 14:58:15 2020 -0800 Removed javadoc issues --- src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java | 4 ++-- src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java index 65747e2..4dc0bb7 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java @@ -102,7 +102,7 @@ public class GeodeAsSinkDUnitTest { String sinkTopic = "SINK_TOPIC_" + testIdentifier; String sourceTopic = "SOURCE_TOPIC_" + testIdentifier; -/** +/* * Start the Apache Geode cluster and create the source and sink regions. * Create a Apache Geode client which inserts data into the source */ @@ -114,7 +114,7 @@ public class GeodeAsSinkDUnitTest { }); -/** +/* * Start the Kafka Cluster, workers and the topic to which the Apache Geode will connect as * a source */ diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java index 018a9b9..108d86a 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java @@ -114,7 +114,7 @@ public class GeodeAsSourceDUnitTest { String sinkTopic = "SINK_TOPIC_" + testIdentifier; String sourceTopic = "SOURCE_TOPIC_" + testIdentifier; -/** +/* * Start the Apache Geode cluster and create the source and sink regions. * Create a Apache Geode client which inserts data into the source */ @@ -129,7 +129,7 @@ public class GeodeAsSourceDUnitTest { .create(sourceRegion); }); -/** +/* * Start the Kafka Cluster, workers and the topic to which the Apache Geode will connect as * a source */
[geode-kafka-connector] branch master updated: Removal of unused variables
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new a4d0e0d Removal of unused variables a4d0e0d is described below commit a4d0e0d072ea36732d5f63ebc61cba7083d0a2af Author: Naburun Nag AuthorDate: Wed Feb 19 14:45:58 2020 -0800 Removal of unused variables --- src/main/java/org/apache/geode/kafka/sink/BatchRecords.java | 2 +- .../org/apache/geode/kafka/source/GeodeKafkaSourceTask.java | 1 - .../java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java| 4 +++- .../java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java | 4 +++- .../org/apache/geode/kafka/GeodeConnectorConfigTest.java | 2 +- .../java/org/apache/geode/kafka/sink/BatchRecordsTest.java | 3 +-- .../org/apache/geode/kafka/sink/GeodeKafkaSinkTaskTest.java | 8 +++- .../apache/geode/kafka/source/GeodeKafkaSourceTaskTest.java | 12 +++- 8 files changed, 15 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java b/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java index 073e5ea..9d64a03 100644 --- a/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java +++ b/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java @@ -72,7 +72,7 @@ public class BatchRecords { region.putAll(updateMap); region.removeAll(removeList); } else { - logger.info("Unable to locate proxy region: " + region); + logger.info("Unable to locate proxy region is null"); } } } diff --git a/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java b/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java index 2d5abe4..8f26c1e 100644 --- a/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java +++ b/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java @@ -76,7 +76,6 @@ public class GeodeKafkaSourceTask extends SourceTask { eventBufferSupplier = new SharedEventBufferSupplier(geodeConnectorConfig.getQueueSize()); regionToTopics = geodeConnectorConfig.getRegionToTopics(); - geodeConnectorConfig.getCqsToRegister(); sourcePartitions = createSourcePartitionsMap(regionToTopics.keySet()); String cqPrefix = geodeConnectorConfig.getCqPrefix(); diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java index 03b07aa..65747e2 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java @@ -152,7 +152,9 @@ public class GeodeAsSinkDUnitTest { if (workerAndHerderCluster != null) { workerAndHerderCluster.stop(); } - kafkaLocalCluster.stop(); + if (kafkaLocalCluster != null) { +kafkaLocalCluster.stop(); + } } } diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java index 44ef67b..018a9b9 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java @@ -163,7 +163,9 @@ public class GeodeAsSourceDUnitTest { if (workerAndHerderCluster != null) { workerAndHerderCluster.stop(); } - kafkaLocalCluster.stop(); + if (kafkaLocalCluster != null) { +kafkaLocalCluster.stop(); + } } } } diff --git a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java index 7c6adef..9e46478 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java @@ -52,7 +52,7 @@ public class GeodeConnectorConfigTest { List regionNames = config.parseStringByComma("region1, region2, region3,region4"); assertEquals(4, regionNames.size()); assertThat(true, -allOf(is(regionNames instanceof List), is(regionNames.contains("region1")), +allOf(is(regionNames.contains("region1")), is(regionNames.contains("region2")), is(regionNames.contains("region3")), is(regionNames.contains("region4"; } diff --git a/src/test/java/org/apache/geode/kafka/sink/BatchRecordsTest.java b/src/test/java/org/apache/geode/kafka/sink/BatchRecordsTest.java index f59ab7b..9471f48 100644 --- a/src/test/java/org/apache/geode/kafka/sink/BatchRecordsTest.java +++ b/src/test/java/org/apache/geode/kafka/sink/BatchRecordsTest.java @@ -53,13 +53,12 @@ public class BatchRecordsTest { @Test public void updatingARecordShouldNotRemoveFromTheRemoveListIfNullValuesIsNotSet() { -boolean nullValuesMeanRemove = false; Map updates = mock(Map.clas
[geode-kafka-connector] branch master updated: Static analyzer performance improvements.
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 5d1ac78 Static analyzer performance improvements. 5d1ac78 is described below commit 5d1ac78365074ab18c8f4683fcc01f099f15c7b0 Author: Naburun Nag AuthorDate: Wed Feb 19 14:33:09 2020 -0800 Static analyzer performance improvements. --- .../java/org/apache/geode/kafka/sink/GeodeKafkaSink.java | 3 +-- .../java/org/apache/geode/kafka/source/GeodeKafkaSource.java | 3 +-- .../java/org/apache/geode/kafka/utilities/JavaProcess.java | 12 +--- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSink.java b/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSink.java index 2bdd99a..edf2f97 100644 --- a/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSink.java +++ b/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSink.java @@ -45,8 +45,7 @@ public class GeodeKafkaSink extends SinkConnector { // All tasks will build up the topic to regions map. A few might not use certain keys but we // have no control over partitioning in kafka and which tasks will fire for (int i = 0; i < maxTasks; i++) { - Map taskProps = new HashMap<>(); - taskProps.putAll(sharedProps); + Map taskProps = new HashMap<>(sharedProps); taskProps.put(GeodeConnectorConfig.TASK_ID, "" + i); taskConfigs.add(taskProps); } diff --git a/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSource.java b/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSource.java index d2418fb..89054a6 100644 --- a/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSource.java +++ b/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSource.java @@ -49,8 +49,7 @@ public class GeodeKafkaSource extends SourceConnector { List> bindingsPerTask = ConnectorUtils.groupPartitions(bindings, maxTasks); for (int i = 0; i < maxTasks; i++) { - Map taskProps = new HashMap<>(); - taskProps.putAll(sharedProps); + Map taskProps = new HashMap<>(sharedProps); taskProps.put(GeodeConnectorConfig.TASK_ID, "" + i); taskProps.put(GeodeSourceConnectorConfig.CQS_TO_REGISTER, GeodeConnectorConfig.reconstructString(bindingsPerTask.get(i))); diff --git a/src/test/java/org/apache/geode/kafka/utilities/JavaProcess.java b/src/test/java/org/apache/geode/kafka/utilities/JavaProcess.java index 2d20244..cb66f84 100644 --- a/src/test/java/org/apache/geode/kafka/utilities/JavaProcess.java +++ b/src/test/java/org/apache/geode/kafka/utilities/JavaProcess.java @@ -37,23 +37,13 @@ public class JavaProcess { processBuilderCommand[1] = "-cp"; processBuilderCommand[2] = classpath; processBuilderCommand[3] = className; -for (int i = 0; i < args.length; i++) { - processBuilderCommand[4 + i] = args[i]; -} +System.arraycopy(args, 0, processBuilderCommand, 4, args.length); ProcessBuilder builder = new ProcessBuilder( processBuilderCommand); process = builder.inheritIO().start(); } - private String convertArgsToString(String... args) { -String string = ""; -for (String arg : args) { - string += arg; -} -return string; - } - public void waitFor() throws InterruptedException { process.waitFor(); }
[geode-kafka-connector] branch master updated: regEx improvements.
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new b4163e6 regEx improvements. b4163e6 is described below commit b4163e67cceeabb383e90faba86e4c1802c63093 Author: Naburun Nag AuthorDate: Wed Feb 19 14:27:57 2020 -0800 regEx improvements. --- src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java | 2 +- src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java b/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java index e1e7b64..452c59f 100644 --- a/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java +++ b/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java @@ -113,7 +113,7 @@ public class GeodeConnectorConfig extends AbstractConfig { public static List parseBindings(String bindings) { return Arrays.stream(bindings.split("](\\s)*,")).map((s) -> { s = s.replaceAll("\\[", ""); - s = s.replaceAll("\\]", ""); + s = s.replaceAll("]", ""); s = s.trim(); return s; }).collect(Collectors.toList()); diff --git a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java index 34fc97b..7c6adef 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java @@ -77,7 +77,7 @@ public class GeodeConnectorConfigTest { String binding = "[region1:topic1]"; List splitBindings = GeodeConnectorConfig.parseBindings(binding); assertEquals(1, splitBindings.size()); -assertEquals(binding.replaceAll("\\[", "").replaceAll("\\]", ""), splitBindings.get(0)); +assertEquals(binding.replaceAll("\\[", "").replaceAll("]", ""), splitBindings.get(0)); } public List oneToOneBindings() {
[geode-kafka-connector] branch master updated: Improved the regEx statements.
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 2f30160 Improved the regEx statements. 2f30160 is described below commit 2f30160df1c28d385bbade32256803fbc050a305 Author: Naburun Nag AuthorDate: Wed Feb 19 14:22:33 2020 -0800 Improved the regEx statements. --- src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java | 2 +- src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java index d8f1ab5..03b07aa 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java @@ -96,7 +96,7 @@ public class GeodeAsSinkDUnitTest { int NUM_EVENT = 10; // Set unique names for all the different components -String testIdentifier = testName.getMethodName().replaceAll("\\[|\\]", ""); +String testIdentifier = testName.getMethodName().replaceAll("[\\[\\]]", ""); String sourceRegion = "SOURCE_REGION_" + testIdentifier; String sinkRegion = "SINK_REGION_" + testIdentifier; String sinkTopic = "SINK_TOPIC_" + testIdentifier; diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java index 7a0f05f..44ef67b 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSourceDUnitTest.java @@ -108,7 +108,7 @@ public class GeodeAsSourceDUnitTest { int NUM_EVENT = 10; // Set unique names for all the different components -String testIdentifier = testName.getMethodName().replaceAll("\\[|\\]", ""); +String testIdentifier = testName.getMethodName().replaceAll("[\\[\\]]", ""); String sourceRegion = "SOURCE_REGION_" + testIdentifier; String sinkRegion = "SINK_REGION_" + testIdentifier; String sinkTopic = "SINK_TOPIC_" + testIdentifier;
[geode-kafka-connector] branch master updated: Fixed spelling mistakes
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 4380578 Fixed spelling mistakes 4380578 is described below commit 43805783cc7f87aea325ecbe4df22c1f9c2e9083 Author: Naburun Nag AuthorDate: Wed Feb 19 13:46:21 2020 -0800 Fixed spelling mistakes --- README.md | 4 ++-- src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java | 2 +- src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java | 2 +- src/test/java/org/apache/geode/kafka/utilities/JavaProcess.java| 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fb1d6a1..19dbf14 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The GeodeKafkaSink allows Geode to consume data off of topics and store data fro ### How to install the geode-kafka-connector --- - Prequisite + Prerequisite * Kafka is installed and is up and running. See the Kafka quickstart for more info: [Kafka Quickstart](https://kafka.apache.org/quickstart) * A Geode Cluster with at least one locator and one server and regions to source from and sink to. * Topics created in Kafka to source from and sink to. @@ -60,7 +60,7 @@ bin/connect-standalone.sh config/connect-standalone.properties config/connect-ge | locators | no, but...| A comma separated string of locators that configure which locators to connect to | localhost[10334] | |region-to-topics| yes | A comma separated list of "one region to many topics" mappings. Each mapping is surrounded by brackets. For example "[regionName:topicName], "[anotherRegion: topicName, anotherTopic]" | [gkcregion:gkctopic]| |security-client-auth-init| no | Point to class that implements the [AuthInitialize Interface](https://gemfire.docs.pivotal.io/99/geode/managing/security/implementing_authentication.html) -|security-username| no | Supply a username to be used to authenticate with Geode. Will autoset the security-client-auth-init to use a SystemPropertyAuthInit if one isn't supplied by the user| null| +|security-username| no | Supply a username to be used to authenticate with Geode. Will automatically set the security-client-auth-init to use a SystemPropertyAuthInit if one isn't supplied by the user| null| |security-password| no | Supply a password to be used to authenticate with Geode| null| |geode-connector-batch-size| no | Maximum number of records to return on each poll| 100 | |geode-connector-queue-size| no | Maximum number of entries in the connector queue before backing up all Geode cq listeners sharing the task queue | 1 | diff --git a/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java b/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java index 476c07c..e1e7b64 100644 --- a/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java +++ b/src/main/java/org/apache/geode/kafka/GeodeConnectorConfig.java @@ -76,7 +76,7 @@ public class GeodeConnectorConfig extends AbstractConfig { configDef.define(LOCATORS, ConfigDef.Type.STRING, DEFAULT_LOCATOR, ConfigDef.Importance.HIGH, "A comma separated string of locators that configure which locators to connect to"); configDef.define(SECURITY_USER, ConfigDef.Type.STRING, null, ConfigDef.Importance.HIGH, -"Supply a username to be used to authenticate with Geode. Will autoset the security-client-auth-init to use a SystemPropertyAuthInit if one isn't supplied by the user"); +"Supply a username to be used to authenticate with Geode. Will automatically set the security-client-auth-init to use a SystemPropertyAuthInit if one isn't supplied by the user"); configDef.define(SECURITY_PASSWORD, ConfigDef.Type.STRING, null, ConfigDef.Importance.HIGH, "Supply a password to be used to authenticate with Geode"); configDef.define(SECURITY_CLIENT_AUTH_INIT, ConfigDef.Type.STRING, null, diff --git a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java index dfe786c..34fc97b 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java @@ -144,7 +144,7 @@ public class GeodeConnectorConfigTest { @Test public void usesSecurityShouldBeTrueIfSecurityClientAuthInitSet() { Map props = new HashMap<>(); -props.put(GeodeConnectorConfig.SECURITY_CLIENT_AUTH_INIT, "someclass"); +props.put(GeodeConnectorConfig.SECURITY_CLIENT_AUTH_INIT, "some_class"); GeodeConnectorConfig config = new GeodeConnectorConfig(GeodeConnectorConfig.configurables(), props); assertTrue(config.usesSecurity()); diff --git a/src/test/java/org/apache/geode/kafka/utilities/JavaProcess.
[geode-kafka-connector] branch master updated: Static analyzer changes
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 75d1107 Static analyzer changes 75d1107 is described below commit 75d110702d52630b5d5d591bc38903fe0ad92ce4 Author: Naburun Nag AuthorDate: Wed Feb 19 13:18:37 2020 -0800 Static analyzer changes --- src/main/java/org/apache/geode/kafka/sink/BatchRecords.java | 4 +--- .../java/org/apache/geode/kafka/GeodeConnectorConfigTest.java | 8 .../org/apache/geode/kafka/source/GeodeKafkaSourceTaskTest.java | 2 +- .../java/org/apache/geode/kafka/utilities/KafkaLocalCluster.java | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java b/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java index 45a93d6..073e5ea 100644 --- a/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java +++ b/src/main/java/org/apache/geode/kafka/sink/BatchRecords.java @@ -61,9 +61,7 @@ public class BatchRecords { // if so if a previous value was in the remove list // let's not remove it at the end of this operation if (nullValuesMeansRemove) { - if (removeList.contains(record.key())) { -removeList.remove(record.key()); - } + removeList.remove(record.key()); } updateMap.put(record.key(), record.value()); } diff --git a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java index db7d921..dfe786c 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeConnectorConfigTest.java @@ -82,8 +82,8 @@ public class GeodeConnectorConfigTest { public List oneToOneBindings() { return Arrays.asList( -new String[] {"[region1:topic1],[region2:topic2]", "[region1:topic1] , [region2:topic2]", -"[region1:topic1], [region2:topic2] ,", "[region1: topic1], [region2 :topic2]"}); +"[region1:topic1],[region2:topic2]", "[region1:topic1] , [region2:topic2]", +"[region1:topic1], [region2:topic2] ,", "[region1: topic1], [region2 :topic2]"); } @Test @@ -94,10 +94,10 @@ public class GeodeConnectorConfigTest { } public List oneToManyBindings() { -return Arrays.asList(new String[] {"[region1:topic1,topic2],[region2:topic2,topic3]", +return Arrays.asList("[region1:topic1,topic2],[region2:topic2,topic3]", "[region1:topic1 , topic2] , [region2:topic2 , topic3]", "[region1:topic1 ,], [region2:topic2 ,] ,", -"[region1: topic1 ,topic3], [region2 :topic2]"}); +"[region1: topic1 ,topic3], [region2 :topic2]"); } @Test diff --git a/src/test/java/org/apache/geode/kafka/source/GeodeKafkaSourceTaskTest.java b/src/test/java/org/apache/geode/kafka/source/GeodeKafkaSourceTaskTest.java index bf427fd..a8d6122 100644 --- a/src/test/java/org/apache/geode/kafka/source/GeodeKafkaSourceTaskTest.java +++ b/src/test/java/org/apache/geode/kafka/source/GeodeKafkaSourceTaskTest.java @@ -200,7 +200,7 @@ public class GeodeKafkaSourceTaskTest { @Test public void createSourcePartitionsShouldReturnAMapOfSourcePartitions() { GeodeKafkaSourceTask task = new GeodeKafkaSourceTask(); -List regionNames = Arrays.asList(new String[] {"region1", "region2", "region3"}); +List regionNames = Arrays.asList("region1", "region2", "region3"); Map> sourcePartitions = task.createSourcePartitionsMap(regionNames); assertThat(3, is(sourcePartitions.size())); assertThat(true, is(sourcePartitions.get("region1").get(REGION_PARTITION).equals("region1"))); diff --git a/src/test/java/org/apache/geode/kafka/utilities/KafkaLocalCluster.java b/src/test/java/org/apache/geode/kafka/utilities/KafkaLocalCluster.java index 338e819..f342aa4 100644 --- a/src/test/java/org/apache/geode/kafka/utilities/KafkaLocalCluster.java +++ b/src/test/java/org/apache/geode/kafka/utilities/KafkaLocalCluster.java @@ -34,7 +34,7 @@ public class KafkaLocalCluster { kafka.startup(); System.out.println("Kafka started up"); } catch (Throwable t) { - System.out.println(t); + System.out.println(t.getMessage()); } }
[geode-kafka-connector] branch master updated: Update README.md
This is an automated email from the ASF dual-hosted git repository. jasonhuynh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 1154a79 Update README.md 1154a79 is described below commit 1154a79719c47d4161055eac3adf79735a8d4c8e Author: Jason Huynh AuthorDate: Wed Feb 19 11:01:44 2020 -0800 Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 73953a1..fb1d6a1 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ bin/connect-standalone.sh config/connect-standalone.properties config/connect-ge | Property | Required | Description| Default | |---|---|---|---| |locators | no, but...| A comma separated string of locators that configure which locators to connect to | localhost[10334] | -|topic-to-regions| yes| A comma separated list of "one topic to many regions" bindings. Each binding is surrounded by brackets. For example "[topicName:regionName], [anotherTopic: regionName, anotherRegion]" | "[gkctopic:gkcregion]" +|topic-to-regions| yes| A comma separated list of "one topic to many regions" bindings. Each binding is surrounded by brackets. For example "[topicName:regionName], [anotherTopic: regionName, anotherRegion]" | [gkctopic:gkcregion] |security-client-auth-init| no | Point to class that implements the [AuthInitialize Interface](https://gemfire.docs.pivotal.io/99/geode/managing/security/implementing_authentication.html) |null-values-mean-remove | no | If set to true, when topics send a SinkRecord with a null value, we will convert to an operation similar to region.remove instead of putting a null value into the region | true | @@ -58,7 +58,7 @@ bin/connect-standalone.sh config/connect-standalone.properties config/connect-ge | Property | Required| Description| Default | |---|---|---|---| | locators | no, but...| A comma separated string of locators that configure which locators to connect to | localhost[10334] | -|region-to-topics| yes | A comma separated list of "one region to many topics" mappings. Each mapping is surrounded by brackets. For example "[regionName:topicName], "[anotherRegion: topicName, anotherTopic]" | "[gkcregion:gkctopic]"| +|region-to-topics| yes | A comma separated list of "one region to many topics" mappings. Each mapping is surrounded by brackets. For example "[regionName:topicName], "[anotherRegion: topicName, anotherTopic]" | [gkcregion:gkctopic]| |security-client-auth-init| no | Point to class that implements the [AuthInitialize Interface](https://gemfire.docs.pivotal.io/99/geode/managing/security/implementing_authentication.html) |security-username| no | Supply a username to be used to authenticate with Geode. Will autoset the security-client-auth-init to use a SystemPropertyAuthInit if one isn't supplied by the user| null| |security-password| no | Supply a password to be used to authenticate with Geode| null|
[geode] branch develop updated (bf3e280 -> 2dae396)
This is an automated email from the ASF dual-hosted git repository. jensdeppe pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git. from bf3e280 GEODE-7768: remove redundant null checks (#4701) add 2dae396 GEODE-7798: Ignore PubSubTest until the flakiness can be removed (#4721) No new revisions were added by this update. Summary of changes: .../src/integrationTest/java/org/apache/geode/redis/PubSubTest.java | 2 ++ 1 file changed, 2 insertions(+)
[geode] branch release/1.12.0 updated: Fix for failing Postgres connector acceptance test (#4712)
This is an automated email from the ASF dual-hosted git repository. onichols pushed a commit to branch release/1.12.0 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/release/1.12.0 by this push: new 5660c40 Fix for failing Postgres connector acceptance test (#4712) 5660c40 is described below commit 5660c40967e195b80eb05a8106aae783047ff19b Author: Jens Deppe AuthorDate: Tue Feb 18 08:38:52 2020 -0800 Fix for failing Postgres connector acceptance test (#4712) Authored-by: Jens Deppe (cherry picked from commit 7bde96a68cea8a182ef1154af356d72cefa70415) --- .../resources/org/apache/geode/connectors/jdbc/internal/postgres.yml | 1 + .../resources/org/apache/geode/connectors/jdbc/postgres.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/internal/postgres.yml b/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/internal/postgres.yml index 2320682..00d95db 100644 --- a/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/internal/postgres.yml +++ b/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/internal/postgres.yml @@ -25,3 +25,4 @@ services: - 5432 environment: POSTGRES_DB: test + POSTGRES_HOST_AUTH_METHOD: trust diff --git a/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/postgres.yml b/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/postgres.yml index 2320682..00d95db 100644 --- a/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/postgres.yml +++ b/geode-connectors/src/acceptanceTest/resources/org/apache/geode/connectors/jdbc/postgres.yml @@ -25,3 +25,4 @@ services: - 5432 environment: POSTGRES_DB: test + POSTGRES_HOST_AUTH_METHOD: trust
[geode-kafka-connector] branch master updated: Converting global variables to local
This is an automated email from the ASF dual-hosted git repository. nnag pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/geode-kafka-connector.git The following commit(s) were added to refs/heads/master by this push: new 3515ae7 Converting global variables to local 3515ae7 is described below commit 3515ae72c7f25399120bd07f0fa2ac74bb4895d5 Author: Naburun Nag AuthorDate: Wed Feb 19 09:03:10 2020 -0800 Converting global variables to local --- .../org/apache/geode/kafka/sink/GeodeKafkaSinkTask.java | 3 +-- .../apache/geode/kafka/source/GeodeKafkaSourceTask.java | 3 +-- .../geode/kafka/source/GeodeSourceConnectorConfig.java | 3 +-- .../org/apache/geode/kafka/GeodeAsSinkDUnitTest.java | 16 ++-- .../org/apache/geode/kafka/GeodeAsSourceDUnitTest.java | 16 ++-- 5 files changed, 15 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSinkTask.java b/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSinkTask.java index eaf0f66..daf2274 100644 --- a/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSinkTask.java +++ b/src/main/java/org/apache/geode/kafka/sink/GeodeKafkaSinkTask.java @@ -40,7 +40,6 @@ public class GeodeKafkaSinkTask extends SinkTask { private static final Logger logger = LoggerFactory.getLogger(GeodeKafkaSinkTask.class); private GeodeContext geodeContext; - private int taskId; private Map> topicToRegions; private Map regionNameToRegion; private boolean nullValuesMeansRemove = true; @@ -73,7 +72,7 @@ public class GeodeKafkaSinkTask extends SinkTask { void configure(GeodeSinkConnectorConfig geodeConnectorConfig) { logger.debug("GeodeKafkaSourceTask id:" + geodeConnectorConfig.getTaskId() + " starting"); -taskId = geodeConnectorConfig.getTaskId(); +int taskId = geodeConnectorConfig.getTaskId(); topicToRegions = geodeConnectorConfig.getTopicToRegions(); nullValuesMeansRemove = geodeConnectorConfig.getNullValuesMeanRemove(); } diff --git a/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java b/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java index 4e5b415..2d5abe4 100644 --- a/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java +++ b/src/main/java/org/apache/geode/kafka/source/GeodeKafkaSourceTask.java @@ -43,7 +43,6 @@ public class GeodeKafkaSourceTask extends SourceTask { private static final Map OFFSET_DEFAULT = createOffset(); private GeodeContext geodeContext; - private GeodeSourceConnectorConfig geodeConnectorConfig; private EventBufferSupplier eventBufferSupplier; private Map> regionToTopics; private Map> sourcePartitions; @@ -64,7 +63,7 @@ public class GeodeKafkaSourceTask extends SourceTask { @Override public void start(Map props) { try { - geodeConnectorConfig = new GeodeSourceConnectorConfig(props); + GeodeSourceConnectorConfig geodeConnectorConfig = new GeodeSourceConnectorConfig(props); logger.debug("GeodeKafkaSourceTask id:" + geodeConnectorConfig.getTaskId() + " starting"); geodeContext = new GeodeContext(); geodeContext.connectClient(geodeConnectorConfig.getLocatorHostPorts(), diff --git a/src/main/java/org/apache/geode/kafka/source/GeodeSourceConnectorConfig.java b/src/main/java/org/apache/geode/kafka/source/GeodeSourceConnectorConfig.java index ac70051..a004f23 100644 --- a/src/main/java/org/apache/geode/kafka/source/GeodeSourceConnectorConfig.java +++ b/src/main/java/org/apache/geode/kafka/source/GeodeSourceConnectorConfig.java @@ -54,7 +54,6 @@ public class GeodeSourceConnectorConfig extends GeodeConnectorConfig { public static final String DEFAULT_LOAD_ENTIRE_REGION = "false"; private final String durableClientId; - private final String durableClientIdPrefix; private final String durableClientTimeout; private final String cqPrefix; private final boolean loadEntireRegion; @@ -68,7 +67,7 @@ public class GeodeSourceConnectorConfig extends GeodeConnectorConfig { super(SOURCE_CONFIG_DEF, connectorProperties); cqsToRegister = parseRegionToTopics(getString(CQS_TO_REGISTER)).keySet(); regionToTopics = parseRegionToTopics(getString(REGION_TO_TOPIC_BINDINGS)); -durableClientIdPrefix = getString(DURABLE_CLIENT_ID_PREFIX); +String durableClientIdPrefix = getString(DURABLE_CLIENT_ID_PREFIX); if (isDurable(durableClientIdPrefix)) { durableClientId = durableClientIdPrefix + taskId; } else { diff --git a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java index 931de80..d8f1ab5 100644 --- a/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java +++ b/src/test/java/org/apache/geode/kafka/GeodeAsSinkDUnitTest.java @@ -42,9 +42,6 @@ public class GeodeAsSinkDUnitTest { @Rule public ClusterStartupRule clusterStartupRule = new ClusterStartupRule(3