[camel-performance-tests] 01/02: Added a Minio to Kafka profiling example
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git commit 68137e445c30c152c2117c45a9f55123580406b6 Author: Andrea Cosentino AuthorDate: Mon Oct 18 14:39:18 2021 +0200 Added a Minio to Kafka profiling example --- .../.mvn/wrapper/MavenWrapperDownloader.java | 117 +++ .../minio-kafka/.mvn/wrapper/maven-wrapper.jar | Bin 0 -> 50710 bytes .../.mvn/wrapper/maven-wrapper.properties | 2 + profiling/minio-kafka/README.md| 153 profiling/minio-kafka/data/application.properties | 30 + profiling/minio-kafka/data/sources/routes.yaml | 32 + profiling/minio-kafka/jfr/settings_for_heap.jfc| 965 + profiling/minio-kafka/mvnw | 310 +++ profiling/minio-kafka/mvnw.cmd | 182 profiling/minio-kafka/pom.xml | 167 profiling/minio-kafka/script/minio-bulk.sh | 39 + profiling/minio-kafka/script/msg1.txt | 1 + 12 files changed, 1998 insertions(+) diff --git a/profiling/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java b/profiling/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 000..b901097 --- /dev/null +++ b/profiling/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + +private static final String WRAPPER_VERSION = "0.5.6"; +/** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ +private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"; ++ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + +/** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ +private static final String MAVEN_WRAPPER_PROPERTIES_PATH = +".mvn/wrapper/maven-wrapper.properties"; + +/** + * Path where the maven-wrapper.jar will be saved to. + */ +private static final String MAVEN_WRAPPER_JAR_PATH = +".mvn/wrapper/maven-wrapper.jar"; + +/** + * Name of the property which should be used to override the default download url for the wrapper. + */ +private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + +public static void main(String args[]) { +System.out.println("- Downloader started"); +File baseDirectory = new File(args[0]); +System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + +// If the maven-wrapper.properties exists, read it and check if it contains a custom +// wrapperUrl parameter. +File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); +String url = DEFAULT_DOWNLOAD_URL; +if(mavenWrapperPropertyFile.exists()) { +FileInputStream mavenWrapperPropertyFileInputStream = null; +try { +mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); +Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); +url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); +} catch (IOException e) { +System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); +} finally { +try { +if(mavenWrapperPropertyFileInputStream != null) { +mavenWrapperPropertyFileInputStream.close(); +} +} catch (IOException e) { +// Ignore ... +} +} +} +System.out.println("- Downloading from: " + url); + +File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); +if(!outputFile.getParentFile().exists()) { +if(!outputFile.getParentFile().mkdir
[camel-performance-tests] 01/02: Added a Minio to Kafka profiling example
This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch minio-kafka in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git commit 478de96fc987340d7adb7a40f81777671acc2d89 Author: Andrea Cosentino AuthorDate: Mon Oct 18 14:39:18 2021 +0200 Added a Minio to Kafka profiling example --- .../.mvn/wrapper/MavenWrapperDownloader.java | 117 +++ .../minio-kafka/.mvn/wrapper/maven-wrapper.jar | Bin 0 -> 50710 bytes .../.mvn/wrapper/maven-wrapper.properties | 2 + profiling/minio-kafka/README.md| 153 profiling/minio-kafka/data/application.properties | 30 + profiling/minio-kafka/data/sources/routes.yaml | 32 + profiling/minio-kafka/jfr/settings_for_heap.jfc| 965 + profiling/minio-kafka/mvnw | 310 +++ profiling/minio-kafka/mvnw.cmd | 182 profiling/minio-kafka/pom.xml | 167 profiling/minio-kafka/script/minio-bulk.sh | 39 + profiling/minio-kafka/script/msg1.txt | 1 + 12 files changed, 1998 insertions(+) diff --git a/profiling/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java b/profiling/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 000..b901097 --- /dev/null +++ b/profiling/minio-kafka/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * Copyright 2007-present the original author or authors. + * + * 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. + */ +import java.net.*; +import java.io.*; +import java.nio.channels.*; +import java.util.Properties; + +public class MavenWrapperDownloader { + +private static final String WRAPPER_VERSION = "0.5.6"; +/** + * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. + */ +private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"; ++ WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; + +/** + * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to + * use instead of the default one. + */ +private static final String MAVEN_WRAPPER_PROPERTIES_PATH = +".mvn/wrapper/maven-wrapper.properties"; + +/** + * Path where the maven-wrapper.jar will be saved to. + */ +private static final String MAVEN_WRAPPER_JAR_PATH = +".mvn/wrapper/maven-wrapper.jar"; + +/** + * Name of the property which should be used to override the default download url for the wrapper. + */ +private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; + +public static void main(String args[]) { +System.out.println("- Downloader started"); +File baseDirectory = new File(args[0]); +System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); + +// If the maven-wrapper.properties exists, read it and check if it contains a custom +// wrapperUrl parameter. +File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); +String url = DEFAULT_DOWNLOAD_URL; +if(mavenWrapperPropertyFile.exists()) { +FileInputStream mavenWrapperPropertyFileInputStream = null; +try { +mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); +Properties mavenWrapperProperties = new Properties(); + mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); +url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); +} catch (IOException e) { +System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); +} finally { +try { +if(mavenWrapperPropertyFileInputStream != null) { +mavenWrapperPropertyFileInputStream.close(); +} +} catch (IOException e) { +// Ignore ... +} +} +} +System.out.println("- Downloading from: " + url); + +File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); +if(!outputFile.getParentFile().exists()) { +if(!outputFile.getParentFile(