You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/11/26 18:39:17 UTC

[camel-spring-boot] 02/04: Regen

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 212288c13671b319120704e98fc8bf7c70258a26
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Nov 26 12:54:05 2022 +0100

    Regen
---
 .../camel/springboot/catalog/components/hdfs.json  |  2 +-
 .../CamelMicrometerAutoConfiguration.java          | 41 +++++++++-------------
 .../src/main/resources/META-INF/spring.factories   |  2 +-
 3 files changed, 19 insertions(+), 26 deletions(-)

diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/hdfs.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/hdfs.json
index 108624560b5..46135f2cda9 100644
--- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/hdfs.json
+++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/hdfs.json
@@ -61,7 +61,7 @@
     "bufferSize": { "kind": "parameter", "displayName": "Buffer Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 4096, "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "The buffer size used by HDFS" },
     "checkIdleInterval": { "kind": "parameter", "displayName": "Check Idle Interval", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 500, "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "How often (time in millis) in to run the idle checker background task. This option is only in use if the  [...]
     "chunkSize": { "kind": "parameter", "displayName": "Chunk Size", "group": "advanced", "label": "advanced", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "defaultValue": 4096, "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "When reading a normal file, this is split into chunks producing a message per chunk." },
-    "compressionCodec": { "kind": "parameter", "displayName": "Compression Codec", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.hdfs.HdfsCompressionCodec", "enum": [ "DEFAULT", "GZIP", "BZIP2", "SNAPPY" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "The  [...]
+    "compressionCodec": { "kind": "parameter", "displayName": "Compression Codec", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.hdfs.HdfsCompressionCodec", "enum": [ "DEFAULT", "GZIP", "BZIP2", "SNAPPY", "LZ4", "ZSTANDARD" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "DEFAULT", "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config",  [...]
     "compressionType": { "kind": "parameter", "displayName": "Compression Type", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.hadoop.io.SequenceFile.CompressionType", "enum": [ "NONE", "RECORD", "BLOCK" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "NONE", "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "The compression type to [...]
     "openedSuffix": { "kind": "parameter", "displayName": "Opened Suffix", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "opened", "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "When a file is opened for reading\/writing the file is renamed with this suffix to avoid to read it [...]
     "readSuffix": { "kind": "parameter", "displayName": "Read Suffix", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "read", "configurationClass": "org.apache.camel.component.hdfs.HdfsConfiguration", "configurationField": "config", "description": "Once the file has been read is renamed with this suffix to avoid to read it again." },
diff --git a/components-starter/camel-micrometer-starter/src/main/java/org/apache/camel/component/micrometer/springboot/CamelMicrometerAutoConfiguration.java b/components-starter/camel-micrometer-starter/src/main/java/org/apache/camel/component/micrometer/springboot/CamelMicrometerAutoConfiguration.java
index 24b8f647855..69cec7f101c 100644
--- a/components-starter/camel-micrometer-starter/src/main/java/org/apache/camel/component/micrometer/springboot/CamelMicrometerAutoConfiguration.java
+++ b/components-starter/camel-micrometer-starter/src/main/java/org/apache/camel/component/micrometer/springboot/CamelMicrometerAutoConfiguration.java
@@ -25,18 +25,15 @@ import org.apache.camel.spi.CamelContextCustomizer;
 import org.apache.camel.spi.ManagementStrategy;
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans;
-import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Lazy;
 
 @Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class)
 @EnableConfigurationProperties({CamelMicrometerConfiguration.class})
-@ConditionalOnHierarchicalProperties({"camel.metrics"})
 @AutoConfigureAfter({CamelAutoConfiguration.class})
 public class CamelMicrometerAutoConfiguration {
 
@@ -51,32 +48,28 @@ public class CamelMicrometerAutoConfiguration {
         this.camelContext = camelContext;
     }
 
-    @Lazy
     @Bean
     public CamelContextCustomizer configureMicrometer() {
-        return new CamelContextCustomizer() {
-            @Override
-            public void configure(CamelContext camelContext) {
-                if (configuration.isEnableRoutePolicy()) {
-                    camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
-                }
+        if (configuration.isEnableRoutePolicy()) {
+            camelContext.addRoutePolicyFactory(new MicrometerRoutePolicyFactory());
+        }
 
-                ManagementStrategy managementStrategy = camelContext.getManagementStrategy();
-                if (configuration.isEnableExchangeEventNotifier()) {
-                    managementStrategy.addEventNotifier(new MicrometerExchangeEventNotifier());
-                }
+        ManagementStrategy managementStrategy = camelContext.getManagementStrategy();
+        if (configuration.isEnableExchangeEventNotifier()) {
+            managementStrategy.addEventNotifier(new MicrometerExchangeEventNotifier());
+        }
 
-                if (configuration.isEnableRouteEventNotifier()) {
-                    managementStrategy.addEventNotifier(new MicrometerRouteEventNotifier());
-                }
+        if (configuration.isEnableRouteEventNotifier()) {
+            managementStrategy.addEventNotifier(new MicrometerRouteEventNotifier());
+        }
 
-                if (configuration.isEnableMessageHistory()) {
-                    if (!camelContext.isMessageHistory()) {
-                        camelContext.setMessageHistory(true);
-                    }
-                    camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());
-                }
+        if (configuration.isEnableMessageHistory()) {
+            if (!camelContext.isMessageHistory()) {
+                camelContext.setMessageHistory(true);
             }
-        };
+            camelContext.setMessageHistoryFactory(new MicrometerMessageHistoryFactory());
+        }
+
+        return null;
     }
 }
\ No newline at end of file
diff --git a/components-starter/camel-micrometer-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-micrometer-starter/src/main/resources/META-INF/spring.factories
index c84e6558f15..74503547d6a 100644
--- a/components-starter/camel-micrometer-starter/src/main/resources/META-INF/spring.factories
+++ b/components-starter/camel-micrometer-starter/src/main/resources/META-INF/spring.factories
@@ -18,5 +18,5 @@
 org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
 org.apache.camel.component.micrometer.springboot.MicrometerComponentAutoConfiguration,\
 org.apache.camel.component.micrometer.springboot.MicrometerComponentConverter,\
-org.apache.camel.component.micrometer.springboot.CamelMicrometerConfiguration
+org.apache.camel.component.micrometer.springboot.CamelMicrometerAutoConfiguration