Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ hs_err_pid*
**/node
dist/
dist-license-check/
.flattened-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.apache.streampark.common.conf;

public final class CommonConfig {

private CommonConfig() {
}

private static final InternalOption<String> STREAMPARK_WORKSPACE_LOCAL =
new InternalOption<>("streampark.workspace.local", "/streampark", String.class);

public static InternalOption<String> STREAMPARK_WORKSPACE_LOCAL() {

Check warning on line 28 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yh&open=AZ96TySKMvoxo5ITa1Yh&pullRequest=4440
return STREAMPARK_WORKSPACE_LOCAL;
}

private static final InternalOption<String> STREAMPARK_WORKSPACE_REMOTE =
new InternalOption<>("streampark.workspace.remote", "/streampark", String.class);

public static InternalOption<String> STREAMPARK_WORKSPACE_REMOTE() {

Check warning on line 35 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yi&open=AZ96TySKMvoxo5ITa1Yi&pullRequest=4440
return STREAMPARK_WORKSPACE_REMOTE;
}

private static final InternalOption<String> STREAMPARK_HADOOP_USER_NAME =
new InternalOption<>("streampark.hadoop-user-name", "hdfs", String.class);

public static InternalOption<String> STREAMPARK_HADOOP_USER_NAME() {
return STREAMPARK_HADOOP_USER_NAME;
}

private static final InternalOption<String> STREAMPARK_PROXY_YARN_URL =
new InternalOption<>(
"streampark.proxy.yarn-url", "", String.class, "proxy yarn url. ex: knox proxy or other");

public static InternalOption<String> STREAMPARK_PROXY_YARN_URL() {

Check warning on line 50 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yk&open=AZ96TySKMvoxo5ITa1Yk&pullRequest=4440
return STREAMPARK_PROXY_YARN_URL;
}

private static final InternalOption<String> STREAMPARK_YARN_AUTH =
new InternalOption<>(
"streampark.yarn.http-auth",
"",
String.class,
"yarn http auth type. ex: simple, kerberos");

public static InternalOption<String> STREAMPARK_YARN_AUTH() {

Check warning on line 61 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yl&open=AZ96TySKMvoxo5ITa1Yl&pullRequest=4440
return STREAMPARK_YARN_AUTH;
}

private static final InternalOption<String> DOCKER_HOST =
new InternalOption<>(
"streampark.docker.http-client.docker-host",
"",
String.class,
"docker host for DockerHttpClient");

public static InternalOption<String> DOCKER_HOST() {
return DOCKER_HOST;
}

private static final InternalOption<Integer> DOCKER_MAX_CONNECTIONS =
new InternalOption<>(
"streampark.docker.http-client.max-connections",
100,
Integer.class,
"instantiating max connections for DockerHttpClient");

public static InternalOption<Integer> DOCKER_MAX_CONNECTIONS() {

Check warning on line 83 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yn&open=AZ96TySKMvoxo5ITa1Yn&pullRequest=4440
return DOCKER_MAX_CONNECTIONS;
}

private static final InternalOption<Long> DOCKER_CONNECTION_TIMEOUT_SEC =
new InternalOption<>(
"streampark.docker.http-client.connection-timeout-sec",
100L,
Long.class,
"instantiating connection timeout for DockerHttpClient");

public static InternalOption<Long> DOCKER_CONNECTION_TIMEOUT_SEC() {

Check warning on line 94 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yo&open=AZ96TySKMvoxo5ITa1Yo&pullRequest=4440
return DOCKER_CONNECTION_TIMEOUT_SEC;
}

private static final InternalOption<Long> DOCKER_RESPONSE_TIMEOUT_SEC =
new InternalOption<>(
"streampark.docker.http-client.response-timeout-sec",
120L,
Long.class,
"instantiating connection timeout for DockerHttpClient");

public static InternalOption<Long> DOCKER_RESPONSE_TIMEOUT_SEC() {

Check warning on line 105 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yp&open=AZ96TySKMvoxo5ITa1Yp&pullRequest=4440
return DOCKER_RESPONSE_TIMEOUT_SEC;
}

private static final InternalOption<String> MAVEN_SETTINGS_PATH =
new InternalOption<>(
"streampark.maven.settings", null, String.class, "maven settings.xml full path");

public static InternalOption<String> MAVEN_SETTINGS_PATH() {
return MAVEN_SETTINGS_PATH;
}

private static final InternalOption<String> MAVEN_REMOTE_URL =
new InternalOption<>(
"streampark.maven.central.repository",
"https://repo1.maven.org/maven2/",
String.class,
"maven repository used for built-in compilation");

Check failure on line 122 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "maven repository used for built-in compilation" 3 times.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yg&open=AZ96TySKMvoxo5ITa1Yg&pullRequest=4440

public static InternalOption<String> MAVEN_REMOTE_URL() {
return MAVEN_REMOTE_URL;
}

private static final InternalOption<String> MAVEN_AUTH_USER =
new InternalOption<>(
"streampark.maven.auth.user",
null,
String.class,
"maven repository used for built-in compilation");

public static InternalOption<String> MAVEN_AUTH_USER() {

Check warning on line 135 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Ys&open=AZ96TySKMvoxo5ITa1Ys&pullRequest=4440
return MAVEN_AUTH_USER;
}

private static final InternalOption<String> MAVEN_AUTH_PASSWORD =
new InternalOption<>(
"streampark.maven.auth.password",
null,
String.class,
"maven repository used for built-in compilation");

public static InternalOption<String> MAVEN_AUTH_PASSWORD() {
return MAVEN_AUTH_PASSWORD;
}

private static final InternalOption<String> KERBEROS_TTL =
new InternalOption<>("security.kerberos.ttl", "2h", String.class, "kerberos default ttl");

public static InternalOption<String> KERBEROS_TTL() {

Check warning on line 153 in streampark-common/src/main/java/org/apache/streampark/common/conf/CommonConfig.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this method name to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=apache_incubator-streampark&issues=AZ96TySKMvoxo5ITa1Yu&open=AZ96TySKMvoxo5ITa1Yu&pullRequest=4440
return KERBEROS_TTL;
}

private static final InternalOption<String> READ_LOG_MAX_SIZE =
new InternalOption<>(
"streampark.read-log.max-size",
"1mb",
String.class,
"The maximum size of the default read log");

public static InternalOption<String> READ_LOG_MAX_SIZE() {
return READ_LOG_MAX_SIZE;
}

private static final InternalOption<String> SPRING_PROFILES_ACTIVE =
new InternalOption<>(
"spring.profiles.active", "h2", String.class, "Use the database type");

public static InternalOption<String> SPRING_PROFILES_ACTIVE() {
return SPRING_PROFILES_ACTIVE;
}
}
Loading
Loading