From b209f0de792b05cfa72e0652311666f7d71e50bb Mon Sep 17 00:00:00 2001 From: "manas.deora" Date: Sun, 9 Jan 2022 15:48:07 +0530 Subject: [PATCH 1/5] Bug 2679- tcp protocol support for es6 --- .../es6/config/ElasticSearchProperties.java | 27 +++++++++++++++++++ .../config/ElasticSearchV6Configuration.java | 8 ++++-- .../conductor/es6/config/IsHttpProtocol.java | 21 +++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java index 557c0069da..1f85f5b290 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java @@ -16,11 +16,13 @@ import org.springframework.boot.convert.DurationUnit; import java.net.MalformedURLException; +import java.net.URI; import java.net.URL; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; @ConfigurationProperties("conductor.elasticsearch") @@ -219,4 +221,29 @@ private URL toURL(String url) { throw new IllegalArgumentException(url + "can not be converted to java.net.URL"); } } + + public List getURIs() { + + String clusterAddress = getURL(); + + String[] hosts = clusterAddress.split(","); + + return Arrays.stream(hosts).map(host -> + (host.startsWith("http://") || host.startsWith("https://") || host.startsWith("tcp://")) ? URI.create(host) : URI.create("tcp://" + host) + ).collect(Collectors.toList()); + } + + private String getProperty(String key, String defaultValue) { + String val; + val = System.getenv(key.replace('.', '_')); + if (val == null || val.isEmpty()) { + val = Optional.ofNullable(System.getProperty(key)) + .orElse(defaultValue); + } + return val; + } + + private String getURL() { + return getProperty("conductor.elasticsearch.url", url); + } } diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java index 5413bbc09b..2bc4c073ba 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java @@ -32,6 +32,7 @@ import org.springframework.context.annotation.Configuration; import java.net.InetAddress; +import java.net.URI; import java.net.URL; import java.util.List; import java.util.Optional; @@ -52,12 +53,12 @@ public Client client(ElasticSearchProperties properties) { TransportClient transportClient = new PreBuiltTransportClient(settings); - List clusterAddresses = properties.toURLs(); + List clusterAddresses = properties.getURIs(); if (clusterAddresses.isEmpty()) { log.warn("workflow.elasticsearch.url is not set. Indexing will remain DISABLED."); } - for (URL hostAddress : clusterAddresses) { + for (URI hostAddress : clusterAddresses) { int port = Optional.ofNullable(hostAddress.getPort()).orElse(9200); try { transportClient @@ -69,7 +70,9 @@ public Client client(ElasticSearchProperties properties) { return transportClient; } + @Bean + @Conditional(IsHttpProtocol.class) public RestClient restClient(ElasticSearchProperties properties) { RestClientBuilder restClientBuilder = RestClient.builder(convertToHttpHosts(properties.toURLs())); if (properties.getRestClientConnectionRequestTimeout() > 0) { @@ -80,6 +83,7 @@ public RestClient restClient(ElasticSearchProperties properties) { } @Bean + @Conditional(IsHttpProtocol.class) public RestClientBuilder restClientBuilder(ElasticSearchProperties properties) { return RestClient.builder(convertToHttpHosts(properties.toURLs())); } diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java new file mode 100644 index 0000000000..4ed80f5253 --- /dev/null +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java @@ -0,0 +1,21 @@ +package com.netflix.conductor.es6.config; + +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.type.AnnotatedTypeMetadata; + +@EnableConfigurationProperties(ElasticSearchProperties.class) +@Configuration +public class IsHttpProtocol implements Condition { + @Override + public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { + String url = context.getEnvironment().getProperty("conductor.elasticsearch.url"); + if (url.startsWith("http") || url.startsWith("https")) { + return true; + } + return false; + } +} + From caf651638df05fed91c6eed5c029fa7c0ecb9284 Mon Sep 17 00:00:00 2001 From: "manas.deora" Date: Mon, 10 Jan 2022 12:48:02 +0530 Subject: [PATCH 2/5] Improvements --- .../config/ElasticSearchV6Configuration.java | 18 +++++++++------- .../conductor/es6/config/IsTcpProtocol.java | 21 +++++++++++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java index 2bc4c073ba..0fad247205 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java @@ -45,6 +45,7 @@ public class ElasticSearchV6Configuration { private static final Logger log = LoggerFactory.getLogger(ElasticSearchV6Configuration.class); @Bean + @Conditional(IsTcpProtocol.class) public Client client(ElasticSearchProperties properties) { Settings settings = Settings.builder() .put("client.transport.ignore_cluster_name", true) @@ -89,14 +90,17 @@ public RestClientBuilder restClientBuilder(ElasticSearchProperties properties) { } @Bean - public IndexDAO es6IndexDAO(RestClientBuilder restClientBuilder, Client client, ElasticSearchProperties properties, + @Conditional(IsHttpProtocol.class) + public IndexDAO es6IndexDAO(RestClientBuilder restClientBuilder, ElasticSearchProperties properties, ObjectMapper objectMapper) { - String url = properties.getUrl(); - if (url.startsWith("http") || url.startsWith("https")) { - return new ElasticSearchRestDAOV6(restClientBuilder, properties, objectMapper); - } else { - return new ElasticSearchDAOV6(client, properties, objectMapper); - } + return new ElasticSearchRestDAOV6(restClientBuilder, properties, objectMapper); + } + + @Bean + @Conditional(IsTcpProtocol.class) + public IndexDAO es6IndexDAO1( Client client, ElasticSearchProperties properties, + ObjectMapper objectMapper) { + return new ElasticSearchDAOV6(client, properties, objectMapper); } private HttpHost[] convertToHttpHosts(List hosts) { diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java new file mode 100644 index 0000000000..b0db2d7933 --- /dev/null +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java @@ -0,0 +1,21 @@ +package com.netflix.conductor.es6.config; + +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Condition; +import org.springframework.context.annotation.ConditionContext; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.type.AnnotatedTypeMetadata; + +@EnableConfigurationProperties(ElasticSearchProperties.class) +@Configuration +public class IsTcpProtocol implements Condition { + @Override + public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { + String url = context.getEnvironment().getProperty("conductor.elasticsearch.url"); + if (url.startsWith("http") || url.startsWith("https")) { + return false; + } + return true; + } +} + From 697593913b2b50212fe54085c53be27f45ed8c64 Mon Sep 17 00:00:00 2001 From: "manas.deora" Date: Mon, 10 Jan 2022 17:28:20 +0530 Subject: [PATCH 3/5] Formatting --- .../es6/config/ElasticSearchProperties.java | 28 +++++-------------- .../config/ElasticSearchV6Configuration.java | 27 ++++++++---------- 2 files changed, 19 insertions(+), 36 deletions(-) diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java index 1f85f5b290..ed334e2698 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java @@ -12,9 +12,6 @@ */ package com.netflix.conductor.es6.config; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.convert.DurationUnit; - import java.net.MalformedURLException; import java.net.URI; import java.net.URL; @@ -24,71 +21,60 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.convert.DurationUnit; @ConfigurationProperties("conductor.elasticsearch") public class ElasticSearchProperties { - /** * The comma separated list of urls for the elasticsearch cluster. Format -- host1:port1,host2:port2 */ private String url = "localhost:9300"; - /** * The index prefix to be used when creating indices */ private String indexPrefix = "conductor"; - /** * The color of the elasticserach cluster to wait for to confirm healthy status */ private String clusterHealthColor = "green"; - /** * The size of the batch to be used for bulk indexing in async mode */ private int indexBatchSize = 1; - /** * The size of the queue used for holding async indexing tasks */ private int asyncWorkerQueueSize = 100; - /** * The maximum number of threads allowed in the async pool */ private int asyncMaxPoolSize = 12; - /** * The time in seconds after which the async buffers will be flushed (if no activity) to prevent data loss */ @DurationUnit(ChronoUnit.SECONDS) private Duration asyncBufferFlushTimeout = Duration.ofSeconds(10); - /** * The number of shards that the index will be created with */ private int indexShardCount = 5; - /** * The number of replicas that the index will be configured to have */ private int indexReplicasCount = 1; - /** * The number of task log results that will be returned in the response */ private int taskLogResultLimit = 10; - /** * The timeout in milliseconds used when requesting a connection from the connection manager */ private int restClientConnectionRequestTimeout = -1; - /** * Used to control if index management is to be enabled or will be controlled externally */ private boolean autoIndexManagementEnabled = true; - /** * Document types are deprecated in ES6 and removed from ES7. This property can be used to disable the use of * specific document types with an override. This property is currently used in ES6 module. @@ -207,11 +193,11 @@ public List toURLs() { String clusterAddress = getUrl(); String[] hosts = clusterAddress.split(","); return Arrays.stream(hosts) - .map(host -> - (host.startsWith("http://") || host.startsWith("https://") || host.startsWith("tcp://")) - ? toURL(host) - : toURL("tcp://" + host) - ).collect(Collectors.toList()); + .map(host -> + (host.startsWith("http://") || host.startsWith("https://") || host.startsWith("tcp://")) + ? toURL(host) + : toURL("tcp://" + host) + ).collect(Collectors.toList()); } private URL toURL(String url) { diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java index 0fad247205..03d6db002f 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java @@ -12,10 +12,11 @@ */ package com.netflix.conductor.es6.config; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.netflix.conductor.dao.IndexDAO; -import com.netflix.conductor.es6.dao.index.ElasticSearchDAOV6; -import com.netflix.conductor.es6.dao.index.ElasticSearchRestDAOV6; +import java.net.InetAddress; +import java.net.URI; +import java.net.URL; +import java.util.List; +import java.util.Optional; import org.apache.http.HttpHost; import org.elasticsearch.client.Client; import org.elasticsearch.client.RestClient; @@ -30,18 +31,15 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; - -import java.net.InetAddress; -import java.net.URI; -import java.net.URL; -import java.util.List; -import java.util.Optional; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.netflix.conductor.dao.IndexDAO; +import com.netflix.conductor.es6.dao.index.ElasticSearchDAOV6; +import com.netflix.conductor.es6.dao.index.ElasticSearchRestDAOV6; @Configuration(proxyBeanMethods = false) @EnableConfigurationProperties(ElasticSearchProperties.class) @Conditional(ElasticSearchConditions.ElasticSearchV6Enabled.class) public class ElasticSearchV6Configuration { - private static final Logger log = LoggerFactory.getLogger(ElasticSearchV6Configuration.class); @Bean @@ -71,7 +69,6 @@ public Client client(ElasticSearchProperties properties) { return transportClient; } - @Bean @Conditional(IsHttpProtocol.class) public RestClient restClient(ElasticSearchProperties properties) { @@ -92,14 +89,14 @@ public RestClientBuilder restClientBuilder(ElasticSearchProperties properties) { @Bean @Conditional(IsHttpProtocol.class) public IndexDAO es6IndexDAO(RestClientBuilder restClientBuilder, ElasticSearchProperties properties, - ObjectMapper objectMapper) { + ObjectMapper objectMapper) { return new ElasticSearchRestDAOV6(restClientBuilder, properties, objectMapper); } @Bean @Conditional(IsTcpProtocol.class) - public IndexDAO es6IndexDAO1( Client client, ElasticSearchProperties properties, - ObjectMapper objectMapper) { + public IndexDAO es6IndexDAO1(Client client, ElasticSearchProperties properties, + ObjectMapper objectMapper) { return new ElasticSearchDAOV6(client, properties, objectMapper); } From 309884e0112d7b8a78f2206bce623b384c64b8c4 Mon Sep 17 00:00:00 2001 From: "manas.deora" Date: Mon, 10 Jan 2022 17:31:14 +0530 Subject: [PATCH 4/5] fix Formatting --- .../es6/config/ElasticSearchProperties.java | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java index ed334e2698..323a1f2a60 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java @@ -26,55 +26,68 @@ @ConfigurationProperties("conductor.elasticsearch") public class ElasticSearchProperties { + /** * The comma separated list of urls for the elasticsearch cluster. Format -- host1:port1,host2:port2 */ private String url = "localhost:9300"; + /** * The index prefix to be used when creating indices */ private String indexPrefix = "conductor"; + /** * The color of the elasticserach cluster to wait for to confirm healthy status */ private String clusterHealthColor = "green"; + /** * The size of the batch to be used for bulk indexing in async mode */ private int indexBatchSize = 1; + /** * The size of the queue used for holding async indexing tasks */ private int asyncWorkerQueueSize = 100; + /** * The maximum number of threads allowed in the async pool */ private int asyncMaxPoolSize = 12; + /** * The time in seconds after which the async buffers will be flushed (if no activity) to prevent data loss */ @DurationUnit(ChronoUnit.SECONDS) private Duration asyncBufferFlushTimeout = Duration.ofSeconds(10); + /** * The number of shards that the index will be created with */ private int indexShardCount = 5; + /** * The number of replicas that the index will be configured to have */ private int indexReplicasCount = 1; + /** * The number of task log results that will be returned in the response */ private int taskLogResultLimit = 10; + /** * The timeout in milliseconds used when requesting a connection from the connection manager */ private int restClientConnectionRequestTimeout = -1; + /** * Used to control if index management is to be enabled or will be controlled externally */ private boolean autoIndexManagementEnabled = true; + /** * Document types are deprecated in ES6 and removed from ES7. This property can be used to disable the use of * specific document types with an override. This property is currently used in ES6 module. @@ -193,11 +206,11 @@ public List toURLs() { String clusterAddress = getUrl(); String[] hosts = clusterAddress.split(","); return Arrays.stream(hosts) - .map(host -> - (host.startsWith("http://") || host.startsWith("https://") || host.startsWith("tcp://")) - ? toURL(host) - : toURL("tcp://" + host) - ).collect(Collectors.toList()); + .map(host -> + (host.startsWith("http://") || host.startsWith("https://") || host.startsWith("tcp://")) + ? toURL(host) + : toURL("tcp://" + host) + ).collect(Collectors.toList()); } private URL toURL(String url) { From 4b143a57a330c8a533abd35cd28813fecc47b594 Mon Sep 17 00:00:00 2001 From: "manas.deora" Date: Wed, 19 Jan 2022 14:48:29 +0530 Subject: [PATCH 5/5] 1. Moved getURIs() from ElasticSearchProperties.java to ElasticSearchV6Configuration.java 2. Removed newly introduced getURL() and used existing getUrl() of ElasticSearchProperties.java class 3. Used spotlessApply to fix formatting errors --- .../es6/config/ElasticSearchProperties.java | 29 ---------------- .../config/ElasticSearchV6Configuration.java | 33 +++++++++++++++---- .../conductor/es6/config/IsHttpProtocol.java | 13 +++++++- .../conductor/es6/config/IsTcpProtocol.java | 13 +++++++- 4 files changed, 50 insertions(+), 38 deletions(-) diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java index 36c6e8e949..f8b711a627 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchProperties.java @@ -13,16 +13,12 @@ package com.netflix.conductor.es6.config; import java.net.MalformedURLException; -import java.net.URI; import java.net.URL; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.Arrays; import java.util.List; -import java.util.Optional; import java.util.stream.Collectors; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.convert.DurationUnit; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.convert.DurationUnit; @@ -209,29 +205,4 @@ private URL toURL(String url) { throw new IllegalArgumentException(url + "can not be converted to java.net.URL"); } } - - public List getURIs() { - - String clusterAddress = getURL(); - - String[] hosts = clusterAddress.split(","); - - return Arrays.stream(hosts).map(host -> - (host.startsWith("http://") || host.startsWith("https://") || host.startsWith("tcp://")) ? URI.create(host) : URI.create("tcp://" + host) - ).collect(Collectors.toList()); - } - - private String getProperty(String key, String defaultValue) { - String val; - val = System.getenv(key.replace('.', '_')); - if (val == null || val.isEmpty()) { - val = Optional.ofNullable(System.getProperty(key)) - .orElse(defaultValue); - } - return val; - } - - private String getURL() { - return getProperty("conductor.elasticsearch.url", url); - } } diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java index 96d8bfdb68..5ed23ac950 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/ElasticSearchV6Configuration.java @@ -15,8 +15,10 @@ import java.net.InetAddress; import java.net.URI; import java.net.URL; +import java.util.Arrays; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; import org.apache.http.HttpHost; import org.elasticsearch.client.Client; @@ -32,6 +34,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; + import com.netflix.conductor.dao.IndexDAO; import com.netflix.conductor.es6.dao.index.ElasticSearchDAOV6; import com.netflix.conductor.es6.dao.index.ElasticSearchRestDAOV6; @@ -55,7 +58,7 @@ public Client client(ElasticSearchProperties properties) { TransportClient transportClient = new PreBuiltTransportClient(settings); - List clusterAddresses = properties.getURIs(); + List clusterAddresses = getURIs(properties); if (clusterAddresses.isEmpty()) { log.warn("workflow.elasticsearch.url is not set. Indexing will remain DISABLED."); @@ -94,22 +97,38 @@ public RestClientBuilder restClientBuilder(ElasticSearchProperties properties) { @Bean @Conditional(IsHttpProtocol.class) - public IndexDAO es6IndexDAO(RestClientBuilder restClientBuilder, ElasticSearchProperties properties, - ObjectMapper objectMapper) { + public IndexDAO es6IndexRestDAO( + RestClientBuilder restClientBuilder, + ElasticSearchProperties properties, + ObjectMapper objectMapper) { return new ElasticSearchRestDAOV6(restClientBuilder, properties, objectMapper); } @Bean @Conditional(IsTcpProtocol.class) - public IndexDAO es6IndexDAO1(Client client, ElasticSearchProperties properties, - ObjectMapper objectMapper) { + public IndexDAO es6IndexDAO( + Client client, ElasticSearchProperties properties, ObjectMapper objectMapper) { return new ElasticSearchDAOV6(client, properties, objectMapper); - } - + private HttpHost[] convertToHttpHosts(List hosts) { return hosts.stream() .map(host -> new HttpHost(host.getHost(), host.getPort(), host.getProtocol())) .toArray(HttpHost[]::new); } + + public List getURIs(ElasticSearchProperties properties) { + String clusterAddress = properties.getUrl(); + String[] hosts = clusterAddress.split(","); + + return Arrays.stream(hosts) + .map( + host -> + (host.startsWith("http://") + || host.startsWith("https://") + || host.startsWith("tcp://")) + ? URI.create(host) + : URI.create("tcp://" + host)) + .collect(Collectors.toList()); + } } diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java index 4ed80f5253..2437e1a227 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsHttpProtocol.java @@ -1,3 +1,15 @@ +/* + * Copyright 2022 Netflix, Inc. + *

+ * Licensed 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 com.netflix.conductor.es6.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -18,4 +30,3 @@ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) return false; } } - diff --git a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java index b0db2d7933..accf3c4682 100644 --- a/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java +++ b/es6-persistence/src/main/java/com/netflix/conductor/es6/config/IsTcpProtocol.java @@ -1,3 +1,15 @@ +/* + * Copyright 2022 Netflix, Inc. + *

+ * Licensed 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 com.netflix.conductor.es6.config; import org.springframework.boot.context.properties.EnableConfigurationProperties; @@ -18,4 +30,3 @@ public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) return true; } } -