diff --git a/.github/workflows/e2e-sql.yml b/.github/workflows/e2e-sql.yml
index fcf2352a120e5..971f45e4db585 100644
--- a/.github/workflows/e2e-sql.yml
+++ b/.github/workflows/e2e-sql.yml
@@ -107,7 +107,7 @@ jobs:
matrix:
adapter: [ proxy, jdbc ]
mode: [ Standalone, Cluster ]
- database: [ MySQL, PostgreSQL, openGauss ]
+ database: [ MySQL, PostgreSQL ]
# Fix me #25051
#scenario: [ dbtbl_with_readwrite_splitting, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding ]
scenario: [ empty_rules, rdl_empty_rules, passthrough, tbl, encrypt, readwrite_splitting, shadow, mask, dbtbl_with_readwrite_splitting_and_encrypt, sharding_and_encrypt, encrypt_and_readwrite_splitting, encrypt_shadow, readwrite_splitting_and_shadow, sharding_and_shadow, sharding_encrypt_shadow, mask_encrypt, mask_sharding, mask_encrypt_sharding ]
diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml
index bb8bf40ac1ea0..2d1883578eb56 100644
--- a/.github/workflows/nightly-build.yml
+++ b/.github/workflows/nightly-build.yml
@@ -119,11 +119,16 @@ jobs:
ref: ${{ inputs.commit-id }}
- uses: graalvm/setup-graalvm@v1
with:
- version: '22.3.1'
- java-version: '17'
- components: 'espresso,native-image'
+ java-version: '17.0.8'
+ distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
- cache: 'maven'
+ - uses: actions/cache@v3
+ with:
+ path: ~/.m2/repository
+ key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-cache-${{ github.sha }}
+ restore-keys: |
+ ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-cache-
+ ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX }}-maven-third-party-
- uses: docker/login-action@v2
with:
registry: ${{ env.HUB }}
@@ -217,17 +222,17 @@ jobs:
- name: Build with Maven
run: ./mvnw -B -T1C -ntp clean install -DskipITs -DskipTests
- name: Generate Examples
- run: ./mvnw -B clean install -f examples/shardingsphere-example-generator/pom.xml -Pexample-generator -Dproducts=${{ matrix.product }} -Dmodes=${{ matrix.mode }} -Dtransactions=${{ matrix.transaction }} -Dfeatures=${{ matrix.feature }} -Dframeworks=${{ matrix.framework }}
+ run: ./mvnw -B clean install -f examples/shardingsphere-jdbc-example-generator/pom.xml -Pexample-generator -Dproducts=${{ matrix.product }} -Dmodes=${{ matrix.mode }} -Dtransactions=${{ matrix.transaction }} -Dfeatures=${{ matrix.feature }} -Dframeworks=${{ matrix.framework }}
- name: Test Examples
- run : ./mvnw -B test -f examples/shardingsphere-example-generator/target/generated-sources/shardingsphere-jdbc-sample/${{ matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{ matrix.transaction }}/pom.xml -Pexample-generator -Dexec.cleanupDaemonThreads=false
+ run : ./mvnw -B test -f examples/shardingsphere-jdbc-example-generator/target/generated-sources/shardingsphere-jdbc-sample/${{ matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{ matrix.transaction }}/pom.xml -Pexample-generator -Dexec.cleanupDaemonThreads=false
- name: Package Examples
run: |
- cd examples/shardingsphere-example-generator/target/generated-sources/shardingsphere-jdbc-sample/
+ cd examples/shardingsphere-jdbc-example-generator/target/generated-sources/shardingsphere-jdbc-sample/
tar -czvf ${{ matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{ matrix.transaction }}.tar.gz ${{ matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{ matrix.transaction }}
- uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr
- path: examples/shardingsphere-example-generator/target/generated-sources/shardingsphere-jdbc-sample/${{ matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{ matrix.transaction }}.tar.gz
+ path: examples/shardingsphere-jdbc-example-generator/target/generated-sources/shardingsphere-jdbc-sample/${{ matrix.feature }}--${{ matrix.framework }}--${{ matrix.mode }}--${{ matrix.transaction }}.tar.gz
remote_path: ${{ secrets.NIGHTLIES_RSYNC_PATH }}/shardingsphere/examples
remote_host: ${{ secrets.NIGHTLIES_RSYNC_HOST }}
remote_port: ${{ secrets.NIGHTLIES_RSYNC_PORT }}
diff --git a/.github/workflows/nightly-check.yml b/.github/workflows/nightly-check.yml
index da99ae7bf5add..ac30213735c63 100644
--- a/.github/workflows/nightly-check.yml
+++ b/.github/workflows/nightly-check.yml
@@ -143,7 +143,7 @@ jobs:
name: Check - CodeQL
needs: global-environment
runs-on: ubuntu-latest
- timeout-minutes: 45
+ timeout-minutes: 100
permissions:
actions: read
contents: read
diff --git a/README.md b/README.md
index 0ac3f81bf814f..aae761982ebe5 100644
--- a/README.md
+++ b/README.md
@@ -39,8 +39,6 @@ The concepts at the core of the project are `Connect`, `Enhance` and `Pluggable`
- `Enhance:` Capture database access entry to provide additional features transparently, such as: redirect (sharding, readwrite-splitting and shadow), transform (data encrypt and mask), authentication (security, audit and authority), governance (circuit breaker and access limitation and analyze, QoS and observability).
- `Pluggable:` Leveraging the micro kernel and 3 layers pluggable mode, features and database ecosystem can be embedded flexibly. Developers can customize their ShardingSphere just like building with LEGO blocks.
-Virtually all databases are [supported](https://shardingsphere.apache.org/document/current/en/dev-manual/data-source/) including [MySQL](https://www.mysql.com), [PostgreSQL](https://www.postgresql.org), [SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-downloads), [Oracle Database](https://www.oracle.com/database/), [MariaDB](https://mariadb.org) or any other SQL-92 database.
-
ShardingSphere became an [Apache](https://apache.org/index.html#projects-list) Top-Level Project on April 16, 2020.
So far, ShardingSphere has been used by over [10,000 projects on GitHub](https://github.com/search?l=Maven+POM&q=shardingsphere+language%3A%22Maven+POM%22&type=Code).
@@ -54,7 +52,7 @@ So far, ShardingSphere has been used by over [10,000 projects on GitHub](https:/
For full documentation & more details, visit: [Docs](https://shardingsphere.apache.org/document/current/en/overview/)
-### CONTRIBUTION🚀🧑💻
+### CONTRIBUTION🚀🧑💻
diff --git a/README_ZH.md b/README_ZH.md
index d4408006f6b56..6e3b124750943 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -48,7 +48,7 @@ ShardingSphere 已于 2020 年 4 月 16 日成为 [Apache 软件基金会](https
更多信息请参考:[https://shardingsphere.apache.org/document/current/cn/overview/](https://shardingsphere.apache.org/document/current/cn/overview/)
-### 参与贡献🚀🧑💻
+### 参与贡献🚀🧑💻
diff --git a/agent/core/pom.xml b/agent/core/pom.xml
index a6deb243d4548..014a57a65ea3c 100644
--- a/agent/core/pom.xml
+++ b/agent/core/pom.xml
@@ -57,11 +57,6 @@
org.yamlsnakeyaml
-
- ch.qos.logback
- logback-classic
- compile
-
@@ -88,10 +83,6 @@
-
- com.google
- ${shade.package}.com.google
- net.bytebuddy${shade.package}.net.bytebuddy
@@ -100,18 +91,6 @@
org.yaml${shade.package}.org.yaml
-
- org.slf4j
- ${shade.package}.org.slf4j
-
-
- ch.qos.logback
- ${shade.package}.ch.qos.logback
-
-
- org.apache.commons.logging
- ${shade.package}.org.apache.commons.logging
-
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/log/config/LogbackConfiguration.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/log/config/LogbackConfiguration.java
deleted file mode 100644
index be82187b47bd8..0000000000000
--- a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/log/config/LogbackConfiguration.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.shardingsphere.agent.core.log.config;
-
-import ch.qos.logback.classic.BasicConfigurator;
-import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.Logger;
-import ch.qos.logback.classic.LoggerContext;
-import ch.qos.logback.classic.PatternLayout;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import ch.qos.logback.core.Appender;
-import ch.qos.logback.core.FileAppender;
-import ch.qos.logback.core.encoder.LayoutWrappingEncoder;
-import org.apache.shardingsphere.agent.core.path.AgentPath;
-
-import java.io.File;
-
-/**
- * Logback configuration.
- */
-public final class LogbackConfiguration extends BasicConfigurator {
-
- public static final String DEFAULT_PATTERN = "[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n";
-
- public static final String SHARDINGSPHERE_LOGGER_NAME = "org.apache.shardingsphere.agent";
-
- @Override
- public void configure(final LoggerContext loggerContext) {
- Appender appender = createFileAppender(loggerContext);
- Logger rootLogger = loggerContext.getLogger(Logger.ROOT_LOGGER_NAME);
- rootLogger.setLevel(Level.INFO);
- rootLogger.addAppender(appender);
- Logger logger = loggerContext.getLogger(SHARDINGSPHERE_LOGGER_NAME);
- logger.setLevel(Level.INFO);
- logger.setAdditive(false);
- logger.addAppender(appender);
- }
-
- private FileAppender createFileAppender(final LoggerContext loggerContext) {
- FileAppender result = new FileAppender<>();
- result.setContext(loggerContext);
- result.setName("fileAppender");
- result.setFile(getLogFile());
- LayoutWrappingEncoder encoder = createEncoder(loggerContext);
- result.setEncoder(encoder);
- result.start();
- return result;
- }
-
- private String getLogFile() {
- return String.join(File.separator, AgentPath.getRootPath().getPath(), "logs", "stdout.log");
- }
-
- private LayoutWrappingEncoder createEncoder(final LoggerContext loggerContext) {
- LayoutWrappingEncoder result = new LayoutWrappingEncoder<>();
- result.setContext(loggerContext);
- PatternLayout layout = createPatternLayout(loggerContext);
- result.setLayout(layout);
- return result;
- }
-
- private PatternLayout createPatternLayout(final LoggerContext loggerContext) {
- PatternLayout result = new PatternLayout();
- result.setPattern(DEFAULT_PATTERN);
- result.setContext(loggerContext);
- result.start();
- return result;
- }
-}
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/path/AgentPath.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/path/AgentPath.java
index dc09886229bd1..6bf9a13a4c969 100644
--- a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/path/AgentPath.java
+++ b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/path/AgentPath.java
@@ -17,9 +17,9 @@
package org.apache.shardingsphere.agent.core.path;
-import com.google.common.base.Preconditions;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
+import org.apache.shardingsphere.agent.core.util.AgentPreconditions;
import java.io.File;
import java.net.MalformedURLException;
@@ -47,7 +47,7 @@ public static File getRootPath() {
private static File getJarFile(final String url) {
try {
File result = new File(new URL(url.substring(url.indexOf("file:"), url.indexOf('!'))).toURI());
- Preconditions.checkState(result.exists(), "Can not locate agent jar file by URL `%s`.", url);
+ AgentPreconditions.checkState(result.exists(), String.format("Can not locate agent jar file by URL `%s`.", url));
return result;
} catch (final MalformedURLException | URISyntaxException ex) {
throw new IllegalStateException(String.format("Can not locate agent jar file by URL `%s`.", url), ex);
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/classloader/AgentPluginClassLoader.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/classloader/AgentPluginClassLoader.java
index 58c9ea2a54ae4..deed99b8139e3 100644
--- a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/classloader/AgentPluginClassLoader.java
+++ b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/classloader/AgentPluginClassLoader.java
@@ -17,9 +17,9 @@
package org.apache.shardingsphere.agent.core.plugin.classloader;
-import com.google.common.io.ByteStreams;
-
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collection;
@@ -94,10 +94,26 @@ private void definePackage(final String name, final Manifest manifest) {
}
private Class> defineClass(final String name, final JarFile extraJar, final ZipEntry entry) throws IOException {
- byte[] data = ByteStreams.toByteArray(extraJar.getInputStream(entry));
+ byte[] data = toByteArray(extraJar.getInputStream(entry));
return defineClass(name, data, 0, data.length);
}
+ private static byte[] toByteArray(final InputStream inStream) throws IOException {
+ int buffSize = 2048;
+ ByteArrayOutputStream result = new ByteArrayOutputStream();
+ try {
+ byte[] buffer = new byte[buffSize];
+ int len = -1;
+ while ((len = inStream.read(buffer)) != -1) {
+ result.write(buffer, 0, len);
+ }
+ } finally {
+ result.close();
+ inStream.close();
+ }
+ return result.toByteArray();
+ }
+
@Override
protected Enumeration findResources(final String name) {
Collection result = new LinkedList<>();
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/swapper/YamlPluginsConfigurationSwapper.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/swapper/YamlPluginsConfigurationSwapper.java
index 4f3b535e827e4..b63fae473135e 100644
--- a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/swapper/YamlPluginsConfigurationSwapper.java
+++ b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/plugin/config/yaml/swapper/YamlPluginsConfigurationSwapper.java
@@ -28,6 +28,7 @@
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
+import java.util.Properties;
import java.util.stream.Collectors;
/**
@@ -57,10 +58,11 @@ public static Map swap(final YamlAgentConfiguration
private static Map swap(final Map yamlConfigs) {
return null == yamlConfigs
? Collections.emptyMap()
- : yamlConfigs.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> swap(entry.getValue()), (key, value) -> value, LinkedHashMap::new));
+ : yamlConfigs.entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> swap(entry.getValue()), (oldValue, currentValue) -> oldValue, LinkedHashMap::new));
}
private static PluginConfiguration swap(final YamlPluginConfiguration yamlConfig) {
- return new PluginConfiguration(yamlConfig.getHost(), yamlConfig.getPort(), yamlConfig.getPassword(), yamlConfig.getProps());
+ return null == yamlConfig ? new PluginConfiguration(null, 0, null, new Properties())
+ : new PluginConfiguration(yamlConfig.getHost(), yamlConfig.getPort(), yamlConfig.getPassword(), yamlConfig.getProps());
}
}
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java
index 2aa5d5f46f05c..03eb3de6e3f32 100644
--- a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java
+++ b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/spi/AgentServiceLoader.java
@@ -17,8 +17,8 @@
package org.apache.shardingsphere.agent.core.spi;
-import com.google.common.base.Preconditions;
import lombok.Getter;
+import org.apache.shardingsphere.agent.core.util.AgentPreconditions;
import java.util.Collection;
import java.util.LinkedList;
@@ -44,8 +44,8 @@ private AgentServiceLoader(final Class service) {
}
private void validate(final Class service) {
- Preconditions.checkNotNull(service, "SPI class is null.");
- Preconditions.checkArgument(service.isInterface(), "SPI class `%s` is not interface.", service);
+ AgentPreconditions.checkNotNull(service, "SPI class is null.");
+ AgentPreconditions.checkArgument(service.isInterface(), String.format("SPI class `%s` is not interface.", service));
}
private Collection load(final Class service) {
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/util/AgentPreconditions.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/util/AgentPreconditions.java
new file mode 100644
index 0000000000000..f6fe11baf5967
--- /dev/null
+++ b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/util/AgentPreconditions.java
@@ -0,0 +1,67 @@
+/*
+ * 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.shardingsphere.agent.core.util;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+/**
+ * Agent preconditions.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class AgentPreconditions {
+
+ /**
+ * Check state.
+ *
+ * @param state state
+ * @param errorMessage error message
+ * @throws IllegalStateException illegal state exception
+ */
+ public static void checkState(final boolean state, final String errorMessage) {
+ if (!state) {
+ throw new IllegalStateException(errorMessage);
+ }
+ }
+
+ /**
+ * Check not null.
+ *
+ * @param reference reference
+ * @param errorMessage error message
+ * @throws NullPointerException null pointer exception
+ */
+ public static void checkNotNull(final Object reference, final String errorMessage) {
+ if (null == reference) {
+ throw new NullPointerException(errorMessage);
+ }
+ }
+
+ /**
+ * Check argument.
+ *
+ * @param condition condition
+ * @param errorMessage error message
+ * @throws IllegalArgumentException illegal argument exception
+ */
+ public static void checkArgument(final boolean condition, final String errorMessage) {
+ if (!condition) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+ }
+}
diff --git a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/yaml/AgentYamlConstructor.java b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/yaml/AgentYamlConstructor.java
index 9338b3b69545b..dec92288623d8 100644
--- a/agent/core/src/main/java/org/apache/shardingsphere/agent/core/yaml/AgentYamlConstructor.java
+++ b/agent/core/src/main/java/org/apache/shardingsphere/agent/core/yaml/AgentYamlConstructor.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.agent.core.yaml;
-import com.google.common.base.Preconditions;
+import org.apache.shardingsphere.agent.core.util.AgentPreconditions;
import org.yaml.snakeyaml.constructor.Constructor;
/**
@@ -34,7 +34,7 @@ public AgentYamlConstructor(final Class> rootClass) {
@Override
protected Class> getClassForName(final String className) throws ClassNotFoundException {
- Preconditions.checkArgument(className.equals(rootClass.getName()), "Class `%s` is not accepted", className);
+ AgentPreconditions.checkState(className.equals(rootClass.getName()), String.format("Class `%s` is not accepted", className));
return super.getClassForName(className);
}
}
diff --git a/agent/plugins/core/pom.xml b/agent/plugins/core/pom.xml
index 8a6aef8abb695..c638df4dd593f 100644
--- a/agent/plugins/core/pom.xml
+++ b/agent/plugins/core/pom.xml
@@ -57,14 +57,6 @@
shadepackage
-
-
-
- com.google.common
- ${shade.package}.com.google.common
-
-
-
diff --git a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/config/validator/PluginConfigurationValidator.java b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/config/validator/PluginConfigurationValidator.java
index acdc9f2c611f5..331bbda370f79 100644
--- a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/config/validator/PluginConfigurationValidator.java
+++ b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/config/validator/PluginConfigurationValidator.java
@@ -17,11 +17,10 @@
package org.apache.shardingsphere.agent.plugin.core.config.validator;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Strings;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.shardingsphere.agent.api.PluginConfiguration;
+import org.apache.shardingsphere.agent.plugin.core.util.PluginPreconditions;
/**
* Remote plugin configuration validator.
@@ -47,7 +46,7 @@ public static void validateHostAndPort(final String type, final PluginConfigurat
* @param pluginConfig to be validated plugin configuration
*/
public static void validateHost(final String type, final PluginConfiguration pluginConfig) {
- Preconditions.checkArgument(!Strings.isNullOrEmpty(pluginConfig.getHost()), "Hostname of %s is required.", type);
+ PluginPreconditions.checkArgument(!(null == pluginConfig.getHost() || pluginConfig.getHost().isEmpty()), String.format("Hostname of %s is required.", type));
}
/**
@@ -57,6 +56,6 @@ public static void validateHost(final String type, final PluginConfiguration plu
* @param pluginConfig to be validated plugin configuration
*/
public static void validatePort(final String type, final PluginConfiguration pluginConfig) {
- Preconditions.checkArgument(pluginConfig.getPort() > 0, "Port `%s` of %s must be a positive number.", pluginConfig.getPort(), type);
+ PluginPreconditions.checkArgument(pluginConfig.getPort() > 0, String.format("Port `%s` of %s must be a positive number.", pluginConfig.getPort(), type));
}
}
diff --git a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/spi/PluginServiceLoader.java b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/spi/PluginServiceLoader.java
index d9711e7ac6182..867d65101976a 100644
--- a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/spi/PluginServiceLoader.java
+++ b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/spi/PluginServiceLoader.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.agent.plugin.core.spi;
-import com.google.common.base.Preconditions;
+import org.apache.shardingsphere.agent.plugin.core.util.PluginPreconditions;
import java.util.Collection;
import java.util.LinkedList;
@@ -42,8 +42,8 @@ private PluginServiceLoader(final Class service) {
}
private void validate(final Class service) {
- Preconditions.checkNotNull(service, "SPI class is null.");
- Preconditions.checkArgument(service.isInterface(), "SPI class `%s` is not interface.", service);
+ PluginPreconditions.checkNotNull(service, "SPI class is null.");
+ PluginPreconditions.checkArgument(service.isInterface(), String.format("SPI class `%s` is not interface.", service));
}
private Collection load(final Class service) {
diff --git a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/PluginPreconditions.java b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/PluginPreconditions.java
new file mode 100644
index 0000000000000..3b0a83cb45ab5
--- /dev/null
+++ b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/PluginPreconditions.java
@@ -0,0 +1,67 @@
+/*
+ * 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.shardingsphere.agent.plugin.core.util;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+/**
+ * Plugin preconditions.
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class PluginPreconditions {
+
+ /**
+ * Check state.
+ *
+ * @param state state
+ * @param errorMessage error message
+ * @throws IllegalStateException illegal state exception
+ */
+ public static void checkState(final boolean state, final String errorMessage) {
+ if (!state) {
+ throw new IllegalStateException(errorMessage);
+ }
+ }
+
+ /**
+ * Check not null.
+ *
+ * @param reference reference
+ * @param errorMessage error message
+ * @throws NullPointerException null pointer exception
+ */
+ public static void checkNotNull(final Object reference, final String errorMessage) {
+ if (null == reference) {
+ throw new NullPointerException(errorMessage);
+ }
+ }
+
+ /**
+ * Check argument.
+ *
+ * @param condition condition
+ * @param errorMessage error message
+ * @throws IllegalArgumentException illegal argument exception
+ */
+ public static void checkArgument(final boolean condition, final String errorMessage) {
+ if (!condition) {
+ throw new IllegalArgumentException(errorMessage);
+ }
+ }
+}
diff --git a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/SQLStatementUtil.java b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/SQLStatementUtils.java
similarity index 98%
rename from agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/SQLStatementUtil.java
rename to agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/SQLStatementUtils.java
index fc0d417d70d9f..5f943f67bbf5d 100644
--- a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/SQLStatementUtil.java
+++ b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/SQLStatementUtils.java
@@ -37,10 +37,10 @@
import org.apache.shardingsphere.sql.parser.sql.common.statement.tcl.TCLStatement;
/**
- * SQL statement util.
+ * SQL statement utils.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class SQLStatementUtil {
+public final class SQLStatementUtils {
/**
* Get SQL type.
diff --git a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/ShardingSphereDriverUtil.java b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/ShardingSphereDriverUtils.java
similarity index 95%
rename from agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/ShardingSphereDriverUtil.java
rename to agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/ShardingSphereDriverUtils.java
index d3832bdb48b06..2be08e87a0117 100644
--- a/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/ShardingSphereDriverUtil.java
+++ b/agent/plugins/core/src/main/java/org/apache/shardingsphere/agent/plugin/core/util/ShardingSphereDriverUtils.java
@@ -27,10 +27,10 @@
import java.util.Optional;
/**
- * ShardingSphere driver util.
+ * ShardingSphere driver utils.
*/
@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class ShardingSphereDriverUtil {
+public final class ShardingSphereDriverUtils {
/**
* Get sharding sphere driver.
diff --git a/agent/plugins/metrics/core/pom.xml b/agent/plugins/metrics/core/pom.xml
index 2d6163ea8e34a..05dd1208a987d 100644
--- a/agent/plugins/metrics/core/pom.xml
+++ b/agent/plugins/metrics/core/pom.xml
@@ -118,10 +118,6 @@
package
-
- com.google.common
- ${shade.package}.com.google.common
- net.bytebuddy${shade.package}.net.bytebuddy
diff --git a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLParseCountAdvice.java b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLParseCountAdvice.java
index dfd92600a8edd..554c9463ecd88 100644
--- a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLParseCountAdvice.java
+++ b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLParseCountAdvice.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.agent.api.advice.TargetAdviceObject;
import org.apache.shardingsphere.agent.api.advice.type.InstanceMethodAdvice;
-import org.apache.shardingsphere.agent.plugin.core.util.SQLStatementUtil;
+import org.apache.shardingsphere.agent.plugin.core.util.SQLStatementUtils;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.MetricsCollectorRegistry;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.type.CounterMetricsCollector;
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricCollectorType;
@@ -44,6 +44,6 @@ public void afterMethod(final TargetAdviceObject target, final Method method, fi
}
private Optional getSQLType(final SQLStatement sqlStatement) {
- return Optional.of(SQLStatementUtil.getType(sqlStatement).name());
+ return Optional.of(SQLStatementUtils.getType(sqlStatement).name());
}
}
diff --git a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLRouteCountAdvice.java b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLRouteCountAdvice.java
index 3d483c83ca6d5..885d015aa8ce2 100644
--- a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLRouteCountAdvice.java
+++ b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/advice/SQLRouteCountAdvice.java
@@ -19,7 +19,7 @@
import org.apache.shardingsphere.agent.api.advice.TargetAdviceObject;
import org.apache.shardingsphere.agent.api.advice.type.InstanceMethodAdvice;
-import org.apache.shardingsphere.agent.plugin.core.util.SQLStatementUtil;
+import org.apache.shardingsphere.agent.plugin.core.util.SQLStatementUtils;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.MetricsCollectorRegistry;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.type.CounterMetricsCollector;
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricCollectorType;
@@ -47,6 +47,6 @@ public void beforeMethod(final TargetAdviceObject target, final Method method, f
}
private Optional getSQLType(final SQLStatement sqlStatement) {
- return Optional.of(SQLStatementUtil.getType(sqlStatement).name());
+ return Optional.of(SQLStatementUtils.getType(sqlStatement).name());
}
}
diff --git a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCMetaDataInfoExporter.java b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCMetaDataInfoExporter.java
index 069b58353c029..ed249b6955f7e 100644
--- a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCMetaDataInfoExporter.java
+++ b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCMetaDataInfoExporter.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.agent.plugin.metrics.core.exporter.impl.jdbc;
import org.apache.shardingsphere.agent.plugin.core.util.AgentReflectionUtils;
-import org.apache.shardingsphere.agent.plugin.core.util.ShardingSphereDriverUtil;
+import org.apache.shardingsphere.agent.plugin.core.util.ShardingSphereDriverUtils;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.MetricsCollectorRegistry;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.type.GaugeMetricFamilyMetricsCollector;
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricCollectorType;
@@ -47,7 +47,7 @@ public final class JDBCMetaDataInfoExporter implements MetricsExporter {
@Override
public Optional export(final String pluginType) {
- Optional driver = ShardingSphereDriverUtil.getShardingSphereDriver();
+ Optional driver = ShardingSphereDriverUtils.getShardingSphereDriver();
if (!driver.isPresent()) {
return Optional.empty();
}
@@ -59,7 +59,7 @@ public Optional export(final String pluginTyp
ShardingSphereDataSource dataSource = (ShardingSphereDataSource) entry.getValue();
String databaseName = AgentReflectionUtils.getFieldValue(dataSource, "databaseName");
ContextManager contextManager = AgentReflectionUtils.getFieldValue(dataSource, "contextManager");
- result.addMetric(Arrays.asList(databaseName, "storage_unit_count"), contextManager.getDataSourceMap(databaseName).size());
+ result.addMetric(Arrays.asList(databaseName, "storage_unit_count"), contextManager.getStorageUnits(databaseName).size());
}
return Optional.of(result);
}
diff --git a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCStateExporter.java b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCStateExporter.java
index 1314796bb5637..16c5866d7c4ba 100644
--- a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCStateExporter.java
+++ b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/jdbc/JDBCStateExporter.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.agent.plugin.metrics.core.exporter.impl.jdbc;
import org.apache.shardingsphere.agent.plugin.core.util.AgentReflectionUtils;
-import org.apache.shardingsphere.agent.plugin.core.util.ShardingSphereDriverUtil;
+import org.apache.shardingsphere.agent.plugin.core.util.ShardingSphereDriverUtils;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.MetricsCollectorRegistry;
import org.apache.shardingsphere.agent.plugin.metrics.core.collector.type.GaugeMetricFamilyMetricsCollector;
import org.apache.shardingsphere.agent.plugin.metrics.core.config.MetricCollectorType;
@@ -44,7 +44,7 @@ public final class JDBCStateExporter implements MetricsExporter {
@Override
public Optional export(final String pluginType) {
- Optional driver = ShardingSphereDriverUtil.getShardingSphereDriver();
+ Optional driver = ShardingSphereDriverUtils.getShardingSphereDriver();
if (!driver.isPresent()) {
return Optional.empty();
}
diff --git a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporter.java b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporter.java
index 0df0998371b36..19bd583fe30c0 100644
--- a/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporter.java
+++ b/agent/plugins/metrics/core/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporter.java
@@ -53,6 +53,6 @@ public Optional export(final String pluginTyp
}
private int getStorageUnitCount(final MetaDataContexts metaDataContexts) {
- return metaDataContexts.getMetaData().getDatabases().values().stream().map(each -> each.getResourceMetaData().getDataSources().size()).reduce(0, Integer::sum);
+ return metaDataContexts.getMetaData().getDatabases().values().stream().map(each -> each.getResourceMetaData().getStorageUnitMetaData().getStorageUnits().size()).reduce(0, Integer::sum);
}
}
diff --git a/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java b/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java
index c62991a522771..f26162ba87d1d 100644
--- a/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java
+++ b/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/exporter/impl/proxy/ProxyMetaDataInfoExporterTest.java
@@ -25,6 +25,7 @@
import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
import org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData;
import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase;
+import org.apache.shardingsphere.infra.metadata.database.resource.storage.StorageUnit;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.metadata.persist.MetaDataPersistService;
import org.apache.shardingsphere.mode.manager.ContextManager;
@@ -36,7 +37,6 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
-import javax.sql.DataSource;
import java.util.Collections;
import java.util.Optional;
@@ -75,7 +75,7 @@ void assertExportWithContextManager() {
private ContextManager mockContextManager() {
ShardingSphereDatabase database = mock(ShardingSphereDatabase.class, RETURNS_DEEP_STUBS);
- when(database.getResourceMetaData().getDataSources()).thenReturn(Collections.singletonMap("ds_0", mock(DataSource.class)));
+ when(database.getResourceMetaData().getStorageUnitMetaData().getStorageUnits()).thenReturn(Collections.singletonMap("ds_0", mock(StorageUnit.class)));
when(database.getProtocolType()).thenReturn(TypedSPILoader.getService(DatabaseType.class, "FIXTURE"));
ShardingSphereMetaData metaData = mock(ShardingSphereMetaData.class);
when(metaData.getDatabases()).thenReturn(Collections.singletonMap("sharding_db", database));
diff --git a/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/fixture/collector/MetricsCollectorFixture.java b/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/fixture/collector/MetricsCollectorFixture.java
index aa8089e43b605..2b2761d7a2f89 100644
--- a/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/fixture/collector/MetricsCollectorFixture.java
+++ b/agent/plugins/metrics/core/src/test/java/org/apache/shardingsphere/agent/plugin/metrics/core/fixture/collector/MetricsCollectorFixture.java
@@ -76,7 +76,7 @@ public Object getRawMetricFamilyObject() {
@Override
public String toString() {
- return labeledValues.isEmpty() ? value + "" : String.join(", ", getLabeledContents());
+ return labeledValues.isEmpty() ? String.valueOf(value) : String.join(", ", getLabeledContents());
}
private Collection getLabeledContents() {
diff --git a/agent/plugins/metrics/core/src/test/resources/logback-test.xml b/agent/plugins/metrics/core/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000000..d90fc4a715683
--- /dev/null
+++ b/agent/plugins/metrics/core/src/test/resources/logback-test.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
+
+
diff --git a/agent/plugins/metrics/type/prometheus/pom.xml b/agent/plugins/metrics/type/prometheus/pom.xml
index a6fce529cf590..501d6d4ad28a4 100644
--- a/agent/plugins/metrics/type/prometheus/pom.xml
+++ b/agent/plugins/metrics/type/prometheus/pom.xml
@@ -113,10 +113,6 @@
package
-
- com.google.common
- ${shade.package}.com.google.common
- net.bytebuddy${shade.package}.net.bytebuddy
@@ -129,14 +125,6 @@
io.prometheus.client${shade.package}.io.prometheus.client
-
- org.checkerframework
- ${shade.package}.org.checkerframework
-
-
- com.google.errorprone.annotations
- ${shade.package}.com.google.errorprone.annotations
-
diff --git a/agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/PrometheusPluginLifecycleService.java b/agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/PrometheusPluginLifecycleService.java
index 017b6129f509c..f5ad8f8dfb86d 100644
--- a/agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/PrometheusPluginLifecycleService.java
+++ b/agent/plugins/metrics/type/prometheus/src/main/java/org/apache/shardingsphere/agent/plugin/metrics/prometheus/PrometheusPluginLifecycleService.java
@@ -17,7 +17,6 @@
package org.apache.shardingsphere.agent.plugin.metrics.prometheus;
-import com.google.common.base.Strings;
import io.prometheus.client.CollectorRegistry;
import io.prometheus.client.exporter.HTTPServer;
import io.prometheus.client.hotspot.DefaultExports;
@@ -85,7 +84,11 @@ private void registerCollectorForJDBC() {
}
private InetSocketAddress getSocketAddress(final PluginConfiguration pluginConfig) {
- return Strings.isNullOrEmpty(pluginConfig.getHost()) ? new InetSocketAddress(pluginConfig.getPort()) : new InetSocketAddress(pluginConfig.getHost(), pluginConfig.getPort());
+ return isNullOrEmpty(pluginConfig.getHost()) ? new InetSocketAddress(pluginConfig.getPort()) : new InetSocketAddress(pluginConfig.getHost(), pluginConfig.getPort());
+ }
+
+ private boolean isNullOrEmpty(final String string) {
+ return null == string || string.isEmpty();
}
@Override
diff --git a/agent/plugins/pom.xml b/agent/plugins/pom.xml
index 2d135f68020ad..6449bb4be73d9 100644
--- a/agent/plugins/pom.xml
+++ b/agent/plugins/pom.xml
@@ -42,11 +42,6 @@
provided
-
- com.google.guava
- guava
- provided
- net.bytebuddybyte-buddy
diff --git a/agent/plugins/tracing/type/opentelemetry/pom.xml b/agent/plugins/tracing/type/opentelemetry/pom.xml
index 0080590e432bf..d41f68072be6e 100644
--- a/agent/plugins/tracing/type/opentelemetry/pom.xml
+++ b/agent/plugins/tracing/type/opentelemetry/pom.xml
@@ -103,10 +103,6 @@
net.bytebuddy${shade.package}.net.bytebuddy
-
- com.google
- ${shade.package}.com.google
- io.opentelemetry${shade.package}.io.opentelemetry
diff --git a/agent/pom.xml b/agent/pom.xml
index 7c746a2f100a1..7c8129d7bc470 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -57,17 +57,19 @@
com.google.guavaguava
-
-
- com.google.code.findbugs
- jsr305
-
-
- org.checkerframework
- checker-qual
-
-
+ test
+
+ org.apache.commons
+ commons-lang3
+ test
+
+
+ org.apache.commons
+ commons-collections4
+ test
+
+
org.apache.shardingsphereshardingsphere-test-util
diff --git a/db-protocol/core/src/main/java/org/apache/shardingsphere/db/protocol/codec/PacketCodec.java b/db-protocol/core/src/main/java/org/apache/shardingsphere/db/protocol/codec/PacketCodec.java
index 95eb2f469d02d..b69f31fe037df 100644
--- a/db-protocol/core/src/main/java/org/apache/shardingsphere/db/protocol/codec/PacketCodec.java
+++ b/db-protocol/core/src/main/java/org/apache/shardingsphere/db/protocol/codec/PacketCodec.java
@@ -34,10 +34,8 @@
@Slf4j
public final class PacketCodec extends ByteToMessageCodec {
- @SuppressWarnings("rawtypes")
private final DatabasePacketCodecEngine databasePacketCodecEngine;
- @SuppressWarnings("unchecked")
@Override
protected void decode(final ChannelHandlerContext context, final ByteBuf in, final List
@@ -62,13 +68,17 @@
logback-classicruntime
+
+ com.h2database
+ h2
+ runtime
+ release.native
- 22.3.1truetruetrue
@@ -85,7 +95,6 @@
17
- --enable-preview
@@ -97,12 +106,9 @@
falsetrue
- --language:java--report-unsupported-elements-at-runtime
+ -J-Xmx7g
-
- --enable-preview
- true
diff --git a/distribution/proxy-native/src/main/release-docs/LICENSE b/distribution/proxy-native/src/main/release-docs/LICENSE
index 42c4b5ada830b..f41740785cd91 100644
--- a/distribution/proxy-native/src/main/release-docs/LICENSE
+++ b/distribution/proxy-native/src/main/release-docs/LICENSE
@@ -218,37 +218,35 @@ The text of each license is the standard Apache 2.0 license.
accessors-smart 2.4.7: https://www.minidev.net/, Apache 2.0
aggdesigner-algorithm 6.0: Apache 2.0
apiguardian-api 1.1.2: https://github.com/apiguardian-team/apiguardian, Apache 2.0
- audience-annotations 0.5.0: https://github.com/apache/yetus, Apache 2.0
- avatica-core 1.22.0: https://calcite.apache.org/avatica, Apache 2.0
- avatica-metrics 1.22.0: https://calcite.apache.org/avatica, Apache 2.0
- auto-service-annotations 1.0: https://github.com/google/auto/tree/master/service, Apache 2.0
+ audience-annotations 0.12.0: https://github.com/apache/yetus, Apache 2.0
+ avatica-core 1.23.0: https://calcite.apache.org/avatica, Apache 2.0
+ avatica-metrics 1.23.0: https://calcite.apache.org/avatica, Apache 2.0
caffeine 2.9.3: https://github.com/ben-manes/caffeine, Apache 2.0
- calcite-core 1.32.0: https://calcite.apache.org, Apache 2.0
- calcite-linq4j 1.32.0: https://calcite.apache.org, Apache 2.0
+ calcite-core 1.35.0: https://calcite.apache.org, Apache 2.0
+ calcite-linq4j 1.35.0: https://calcite.apache.org, Apache 2.0
commons-codec 1.15: https://github.com/apache/commons-codec, Apache 2.0
commons-collections4 4.4: https://github.com/apache/commons-collections, Apache 2.0
commons-exec 1.3: https://github.com/apache/commons-exec, Apache 2.0
commons-io 2.11.0: https://github.com/apache/commons-io, Apache 2.0
- commons-lang 2.6: https://github.com/apache/commons-lang, Apache 2.0
+ commons-lang 2.4: https://github.com/apache/commons-lang, Apache 2.0
commons-lang3 3.12.0: https://github.com/apache/commons-lang, Apache 2.0
commons-logging 1.1.3: https://github.com/apache/commons-logging, Apache 2.0
- curator-client 5.3.0: https://github.com/apache/curator, Apache 2.0
- curator-framework 5.3.0: https://github.com/apache/curator, Apache 2.0
- curator-recipes 5.3.0: https://github.com/apache/curator, Apache 2.0
- cosid-core 1.14.4: https://github.com/Ahoo-Wang/CosId, Apache 2.0
- error_prone_annotations 2.3.4: https://github.com/google/error-prone, Apache 2.0
- failsafe 2.4.1: https://github.com/jhalterman/failsafe, Apache 2.0
- failureaccess 1.0.1: https://github.com/google/guava, Apache 2.0
+ curator-client 5.4.0: https://github.com/apache/curator, Apache 2.0
+ curator-framework 5.4.0: https://github.com/apache/curator, Apache 2.0
+ curator-recipes 5.4.0: https://github.com/apache/curator, Apache 2.0
+ error_prone_annotations 2.11.0: https://github.com/google/error-prone, Apache 2.0
+ failsafe 2.4.4: https://github.com/jhalterman/failsafe, Apache 2.0
+ failureaccess 1.0.1: https://github.com/google/guava, Apache 2.0
freemarker 2.3.31: https://freemarker.apache.org/, Apache 2.0
groovy 4.0.10: https://groovy.apache.org/, Apache 2.0
- grpc-api 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-context 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-core 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-grpclb 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-netty 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-protobuf 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-protobuf-lite 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
- grpc-stub 1.48.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-api 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-context 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-core 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-grpclb 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-netty 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-protobuf 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-protobuf-lite 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
+ grpc-stub 1.51.0: https://github.com/grpc/grpc-java, Apache 2.0
gson 2.9.1: https://github.com/google/gson, Apache 2.0
guava 30.0-jre: https://github.com/google/guava, Apache 2.0
HikariCP 4.0.3: https://github.com/brettwooldridge/HikariCP, Apache 2.0
@@ -259,6 +257,7 @@ The text of each license is the standard Apache 2.0 license.
jackson-core 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0
jackson-databind 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0
jackson-dataformat-yaml 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0
+ jackson-datatype-jsr310 2.14.0: http://github.com/FasterXML/jackson, Apache 2.0
jcl-over-slf4j 1.7.36: https://github.com/qos-ch/slf4j, Apache 2.0
jetcd-api 0.7.5: https://github.com/etcd-io/jetcd, Apache 2.0
jetcd-common 0.7.5: https://github.com/etcd-io/jetcd, Apache 2.0
@@ -266,9 +265,8 @@ The text of each license is the standard Apache 2.0 license.
jetcd-grpc 0.7.5: https://github.com/etcd-io/jetcd, Apache 2.0
json-path 2.7.0: https://github.com/jayway/JsonPath, Apache 2.0
json-smart 2.4.7: https://www.minidev.net/, Apache 2.0
- json-simple 1.1.1: https://code.google.com/archive/p/json-simple/, Apache 2.0
+ json-simple 1.1.1: https://code.google.com/archive/p/json-simple/, Apache 2.0
jsr305 3.0.2: http://findbugs.sourceforge.net/, Apache 2.0
- log4j 1.2.17: http://logging.apache.org/log4j/1.2/, Apache 2.0
memory 0.9.0, Apache 2.0
netty-buffer 4.1.90.Final: https://github.com/netty, Apache 2.0
netty-codec 4.1.90.Final: https://github.com/netty, Apache 2.0
@@ -279,13 +277,20 @@ The text of each license is the standard Apache 2.0 license.
netty-handler 4.1.90.Final: https://github.com/netty, Apache 2.0
netty-handler-proxy 4.1.90.Final: https://github.com/netty, Apache 2.0
netty-resolver 4.1.90.Final: https://github.com/netty, Apache 2.0
+ netty-tcnative-boringssl-static 2.0.59.Final: https://github.com/netty/netty-tcnative, Apache 2.0
+ netty-tcnative-boringssl-static 2.0.59.Final-linux-aarch_64: https://github.com/netty/netty-tcnative, Apache 2.0
+ netty-tcnative-boringssl-static 2.0.59.Final-linux-x86_64: https://github.com/netty/netty-tcnative, Apache 2.0
+ netty-tcnative-boringssl-static 2.0.59.Final-osx-aarch_64: https://github.com/netty/netty-tcnative, Apache 2.0
+ netty-tcnative-boringssl-static 2.0.59.Final-osx-x86_64: https://github.com/netty/netty-tcnative, Apache 2.0
+ netty-tcnative-boringssl-static 2.0.59.Final-windows-x86_64: https://github.com/netty/netty-tcnative, Apache 2.0
+ netty-tcnative-classes 2.0.59.Final: https://github.com/netty/netty-tcnative, Apache 2.0
netty-transport 4.1.90.Final: https://github.com/netty, Apache 2.0
netty-transport-classes-epoll 4.1.90.Final: https://github.com/netty, Apache 2.0
netty-transport-native-epoll 4.1.90.Final-linux-aarch_64: https://github.com/netty, Apache 2.0
netty-transport-native-epoll 4.1.90.Final-linux-x86_64: https://github.com/netty, Apache 2.0
netty-transport-native-unix-common 4.1.90.Final: https://github.com/netty, Apache 2.0
- perfmark-api 0.23.0: https://github.com/perfmark/perfmark, Apache 2.0
- proto-google-common-protos 2.0.1: https://github.com/googleapis/common-protos-java, Apache 2.0
+ perfmark-api 0.25.0: https://github.com/perfmark/perfmark, Apache 2.0
+ proto-google-common-protos 2.9.0: https://github.com/googleapis/common-protos-java, Apache 2.0
proj4j 1.1.5: https://github.com/locationtech/proj4j, Apache 2.0
quartz 2.3.2: https://github.com/quartz-scheduler/quartz, Apache 2.0
sketches-core 0.9.0, Apache 2.0
@@ -307,7 +312,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
transactions-api 6.0.0: https://www.atomikos.com, Apache 2.0
transactions-jdbc 6.0.0: https://www.atomikos.com, Apache 2.0
transactions-jta 6.0.0: https://www.atomikos.com, Apache 2.0
-
+
========================================================================
BSD licenses
========================================================================
@@ -318,7 +323,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
antlr4-runtime 4.10.1: https://github.com/antlr/antlr4, BSD-3-Clause
asm 9.1: https://github.com/llbit/ow2-asm, BSD-3-Clause
commons-compiler 3.1.8: https://github.com/janino-compiler/janino, BSD-3-Clause
- janino 3.1.8: https://github.com/janino-compiler/janino, BSD-3-Clause
+ janino 3.1.9: https://github.com/janino-compiler/janino, BSD-3-Clause
opengauss-jdbc 3.1.0-og: https://gitee.com/opengauss/openGauss-connector-jdbc, BSD-2-Clause
postgresql 42.4.1: https://github.com/pgjdbc/pgjdbc, BSD-2-Clause
protobuf-java 3.21.12: https://github.com/protocolbuffers/protobuf/blob/master/java, BSD-3-Clause
@@ -333,7 +338,11 @@ CDDL licenses
The following components are provided under the CDDL License. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.
+ javax.activation-api 1.2.0: https://github.com/javaee/javax.annotation, CDDL
jta 1.1: http://jta-spec.java.net, CDDL
+ jaxb-api 2.3.0: http://www.oracle.com, CDDL
+ jaxb-core 2.3.0: http://www.oracle.com, CDDL
+ jaxb-impl 2.3.0 http://www.oracle.com, CDDL
========================================================================
EPL licenses
@@ -354,18 +363,10 @@ MIT licenses
The following components are provided under the MIT License. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.
- animal-sniffer-annotations 1.19: https://github.com/mojohaus/animal-sniffer, MIT
+ bcpkix-jdk15on 1.70: https://www.bouncycastle.org, MIT
bcprov-jdk15on 1.70: https://www.bouncycastle.org, MIT
+ bctls-jdk15on 1.70: https://www.bouncycastle.org, MIT
+ bcutil-jdk15on 1.70: https://www.bouncycastle.org, MIT
checker-qual 3.5.0: https://github.com/typetools/checker-framework/blob/master/checker-qual, MIT
jul-to-slf4j 1.7.36: https://www.slf4j.org, MIT
slf4j-api 1.7.36: https://www.slf4j.org, MIT
- jnanoid 2.0.0: https://github.com/aventrix/jnanoid, MIT
-
-========================================================================
-UPL licenses
-========================================================================
-
-The following components are provided under the UPL License. See project link for details.
-The text of each license is also included at licenses/LICENSE-[project].txt.
-
- truffle-api 22.3.1: http://www.graalvm.org/, UPL
diff --git a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-animal-sniffer.txt b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-animal-sniffer.txt
deleted file mode 100644
index fa89490e3d6db..0000000000000
--- a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-animal-sniffer.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Animal-Sniffer License
----------------
-
-The MIT License
-
-Copyright (c) 2009 codehaus.org.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-bcprov-jdk15on.txt b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-bcprov-jdk15on.txt
deleted file mode 100644
index d14347eced436..0000000000000
--- a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-bcprov-jdk15on.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-Bcprov-jdk15on License
----------------
-
-Copyright (c) 2000 - 2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
-
-MIT License:
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-bouncy-castle.txt b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-bouncy-castle.txt
new file mode 100644
index 0000000000000..d9faf7181dd15
--- /dev/null
+++ b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-bouncy-castle.txt
@@ -0,0 +1,15 @@
+Bouncy Castle License
+---------------
+
+Please note this should be read in the same way as the MIT license.
+
+Please also note this licensing model is made possible through funding from donations and the sale of support contracts.
+
+LICENSE
+Copyright (c) 2000 - 2023 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-javax.annotation-api.txt b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-javax.annotation-api.txt
new file mode 100644
index 0000000000000..b1c74f95ede8b
--- /dev/null
+++ b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-javax.annotation-api.txt
@@ -0,0 +1,759 @@
+COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.1
+
+1. Definitions.
+
+ 1.1. "Contributor" means each individual or entity that creates or
+ contributes to the creation of Modifications.
+
+ 1.2. "Contributor Version" means the combination of the Original
+ Software, prior Modifications used by a Contributor (if any), and
+ the Modifications made by that particular Contributor.
+
+ 1.3. "Covered Software" means (a) the Original Software, or (b)
+ Modifications, or (c) the combination of files containing Original
+ Software with files containing Modifications, in each case including
+ portions thereof.
+
+ 1.4. "Executable" means the Covered Software in any form other than
+ Source Code.
+
+ 1.5. "Initial Developer" means the individual or entity that first
+ makes Original Software available under this License.
+
+ 1.6. "Larger Work" means a work which combines Covered Software or
+ portions thereof with code not governed by the terms of this License.
+
+ 1.7. "License" means this document.
+
+ 1.8. "Licensable" means having the right to grant, to the maximum
+ extent possible, whether at the time of the initial grant or
+ subsequently acquired, any and all of the rights conveyed herein.
+
+ 1.9. "Modifications" means the Source Code and Executable form of
+ any of the following:
+
+ A. Any file that results from an addition to, deletion from or
+ modification of the contents of a file containing Original Software
+ or previous Modifications;
+
+ B. Any new file that contains any part of the Original Software or
+ previous Modification; or
+
+ C. Any new file that is contributed or otherwise made available
+ under the terms of this License.
+
+ 1.10. "Original Software" means the Source Code and Executable form
+ of computer software code that is originally released under this
+ License.
+
+ 1.11. "Patent Claims" means any patent claim(s), now owned or
+ hereafter acquired, including without limitation, method, process,
+ and apparatus claims, in any patent Licensable by grantor.
+
+ 1.12. "Source Code" means (a) the common form of computer software
+ code in which modifications are made and (b) associated
+ documentation included in or with such code.
+
+ 1.13. "You" (or "Your") means an individual or a legal entity
+ exercising rights under, and complying with all of the terms of,
+ this License. For legal entities, "You" includes any entity which
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants.
+
+ 2.1. The Initial Developer Grant.
+
+ Conditioned upon Your compliance with Section 3.1 below and subject
+ to third party intellectual property claims, the Initial Developer
+ hereby grants You a world-wide, royalty-free, non-exclusive license:
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Initial Developer, to use, reproduce,
+ modify, display, perform, sublicense and distribute the Original
+ Software (or portions thereof), with or without Modifications,
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using or selling of
+ Original Software, to make, have made, use, practice, sell, and
+ offer for sale, and/or otherwise dispose of the Original Software
+ (or portions thereof).
+
+ (c) The licenses granted in Sections 2.1(a) and (b) are effective on
+ the date Initial Developer first distributes or otherwise makes the
+ Original Software available to a third party under the terms of this
+ License.
+
+ (d) Notwithstanding Section 2.1(b) above, no patent license is
+ granted: (1) for code that You delete from the Original Software, or
+ (2) for infringements caused by: (i) the modification of the
+ Original Software, or (ii) the combination of the Original Software
+ with other software or devices.
+
+ 2.2. Contributor Grant.
+
+ Conditioned upon Your compliance with Section 3.1 below and subject
+ to third party intellectual property claims, each Contributor hereby
+ grants You a world-wide, royalty-free, non-exclusive license:
+
+ (a) under intellectual property rights (other than patent or
+ trademark) Licensable by Contributor to use, reproduce, modify,
+ display, perform, sublicense and distribute the Modifications
+ created by such Contributor (or portions thereof), either on an
+ unmodified basis, with other Modifications, as Covered Software
+ and/or as part of a Larger Work; and
+
+ (b) under Patent Claims infringed by the making, using, or selling
+ of Modifications made by that Contributor either alone and/or in
+ combination with its Contributor Version (or portions of such
+ combination), to make, use, sell, offer for sale, have made, and/or
+ otherwise dispose of: (1) Modifications made by that Contributor (or
+ portions thereof); and (2) the combination of Modifications made by
+ that Contributor with its Contributor Version (or portions of such
+ combination).
+
+ (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective
+ on the date Contributor first distributes or otherwise makes the
+ Modifications available to a third party.
+
+ (d) Notwithstanding Section 2.2(b) above, no patent license is
+ granted: (1) for any code that Contributor has deleted from the
+ Contributor Version; (2) for infringements caused by: (i) third
+ party modifications of Contributor Version, or (ii) the combination
+ of Modifications made by that Contributor with other software
+ (except as part of the Contributor Version) or other devices; or (3)
+ under Patent Claims infringed by Covered Software in the absence of
+ Modifications made by that Contributor.
+
+3. Distribution Obligations.
+
+ 3.1. Availability of Source Code.
+
+ Any Covered Software that You distribute or otherwise make available
+ in Executable form must also be made available in Source Code form
+ and that Source Code form must be distributed only under the terms
+ of this License. You must include a copy of this License with every
+ copy of the Source Code form of the Covered Software You distribute
+ or otherwise make available. You must inform recipients of any such
+ Covered Software in Executable form as to how they can obtain such
+ Covered Software in Source Code form in a reasonable manner on or
+ through a medium customarily used for software exchange.
+
+ 3.2. Modifications.
+
+ The Modifications that You create or to which You contribute are
+ governed by the terms of this License. You represent that You
+ believe Your Modifications are Your original creation(s) and/or You
+ have sufficient rights to grant the rights conveyed by this License.
+
+ 3.3. Required Notices.
+
+ You must include a notice in each of Your Modifications that
+ identifies You as the Contributor of the Modification. You may not
+ remove or alter any copyright, patent or trademark notices contained
+ within the Covered Software, or any notices of licensing or any
+ descriptive text giving attribution to any Contributor or the
+ Initial Developer.
+
+ 3.4. Application of Additional Terms.
+
+ You may not offer or impose any terms on any Covered Software in
+ Source Code form that alters or restricts the applicable version of
+ this License or the recipients' rights hereunder. You may choose to
+ offer, and to charge a fee for, warranty, support, indemnity or
+ liability obligations to one or more recipients of Covered Software.
+ However, you may do so only on Your own behalf, and not on behalf of
+ the Initial Developer or any Contributor. You must make it
+ absolutely clear that any such warranty, support, indemnity or
+ liability obligation is offered by You alone, and You hereby agree
+ to indemnify the Initial Developer and every Contributor for any
+ liability incurred by the Initial Developer or such Contributor as a
+ result of warranty, support, indemnity or liability terms You offer.
+
+ 3.5. Distribution of Executable Versions.
+
+ You may distribute the Executable form of the Covered Software under
+ the terms of this License or under the terms of a license of Your
+ choice, which may contain terms different from this License,
+ provided that You are in compliance with the terms of this License
+ and that the license for the Executable form does not attempt to
+ limit or alter the recipient's rights in the Source Code form from
+ the rights set forth in this License. If You distribute the Covered
+ Software in Executable form under a different license, You must make
+ it absolutely clear that any terms which differ from this License
+ are offered by You alone, not by the Initial Developer or
+ Contributor. You hereby agree to indemnify the Initial Developer and
+ every Contributor for any liability incurred by the Initial
+ Developer or such Contributor as a result of any such terms You offer.
+
+ 3.6. Larger Works.
+
+ You may create a Larger Work by combining Covered Software with
+ other code not governed by the terms of this License and distribute
+ the Larger Work as a single product. In such a case, You must make
+ sure the requirements of this License are fulfilled for the Covered
+ Software.
+
+4. Versions of the License.
+
+ 4.1. New Versions.
+
+ Oracle is the initial license steward and may publish revised and/or
+ new versions of this License from time to time. Each version will be
+ given a distinguishing version number. Except as provided in Section
+ 4.3, no one other than the license steward has the right to modify
+ this License.
+
+ 4.2. Effect of New Versions.
+
+ You may always continue to use, distribute or otherwise make the
+ Covered Software available under the terms of the version of the
+ License under which You originally received the Covered Software. If
+ the Initial Developer includes a notice in the Original Software
+ prohibiting it from being distributed or otherwise made available
+ under any subsequent version of the License, You must distribute and
+ make the Covered Software available under the terms of the version
+ of the License under which You originally received the Covered
+ Software. Otherwise, You may also choose to use, distribute or
+ otherwise make the Covered Software available under the terms of any
+ subsequent version of the License published by the license steward.
+
+ 4.3. Modified Versions.
+
+ When You are an Initial Developer and You want to create a new
+ license for Your Original Software, You may create and use a
+ modified version of this License if You: (a) rename the license and
+ remove any references to the name of the license steward (except to
+ note that the license differs from this License); and (b) otherwise
+ make it clear that the license contains terms which differ from this
+ License.
+
+5. DISCLAIMER OF WARRANTY.
+
+ COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
+ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
+ INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE
+ IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR
+ NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+ THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE
+ DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY
+ OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING,
+ REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN
+ ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS
+ AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
+
+6. TERMINATION.
+
+ 6.1. This License and the rights granted hereunder will terminate
+ automatically if You fail to comply with terms herein and fail to
+ cure such breach within 30 days of becoming aware of the breach.
+ Provisions which, by their nature, must remain in effect beyond the
+ termination of this License shall survive.
+
+ 6.2. If You assert a patent infringement claim (excluding
+ declaratory judgment actions) against Initial Developer or a
+ Contributor (the Initial Developer or Contributor against whom You
+ assert such claim is referred to as "Participant") alleging that the
+ Participant Software (meaning the Contributor Version where the
+ Participant is a Contributor or the Original Software where the
+ Participant is the Initial Developer) directly or indirectly
+ infringes any patent, then any and all rights granted directly or
+ indirectly to You by such Participant, the Initial Developer (if the
+ Initial Developer is not the Participant) and all Contributors under
+ Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice
+ from Participant terminate prospectively and automatically at the
+ expiration of such 60 day notice period, unless if within such 60
+ day period You withdraw Your claim with respect to the Participant
+ Software against such Participant either unilaterally or pursuant to
+ a written agreement with Participant.
+
+ 6.3. If You assert a patent infringement claim against Participant
+ alleging that the Participant Software directly or indirectly
+ infringes any patent where such claim is resolved (such as by
+ license or settlement) prior to the initiation of patent
+ infringement litigation, then the reasonable value of the licenses
+ granted by such Participant under Sections 2.1 or 2.2 shall be taken
+ into account in determining the amount or value of any payment or
+ license.
+
+ 6.4. In the event of termination under Sections 6.1 or 6.2 above,
+ all end user licenses that have been validly granted by You or any
+ distributor hereunder prior to termination (excluding licenses
+ granted to You by any distributor) shall survive termination.
+
+7. LIMITATION OF LIABILITY.
+
+ UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
+ (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE
+ INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF
+ COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE
+ TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR
+ CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
+ LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER
+ FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR
+ LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE
+ POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT
+ APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
+ PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
+ LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR
+ LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION
+ AND LIMITATION MAY NOT APPLY TO YOU.
+
+8. U.S. GOVERNMENT END USERS.
+
+ The Covered Software is a "commercial item," as that term is defined
+ in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
+ software" (as that term is defined at 48 C.F.R. §
+ 252.227-7014(a)(1)) and "commercial computer software documentation"
+ as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent
+ with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4
+ (June 1995), all U.S. Government End Users acquire Covered Software
+ with only those rights set forth herein. This U.S. Government Rights
+ clause is in lieu of, and supersedes, any other FAR, DFAR, or other
+ clause or provision that addresses Government rights in computer
+ software under this License.
+
+9. MISCELLANEOUS.
+
+ This License represents the complete agreement concerning subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. This License shall be governed by
+ the law of the jurisdiction specified in a notice contained within
+ the Original Software (except to the extent applicable law, if any,
+ provides otherwise), excluding such jurisdiction's conflict-of-law
+ provisions. Any litigation relating to this License shall be subject
+ to the jurisdiction of the courts located in the jurisdiction and
+ venue specified in a notice contained within the Original Software,
+ with the losing party responsible for costs, including, without
+ limitation, court costs and reasonable attorneys' fees and expenses.
+ The application of the United Nations Convention on Contracts for
+ the International Sale of Goods is expressly excluded. Any law or
+ regulation which provides that the language of a contract shall be
+ construed against the drafter shall not apply to this License. You
+ agree that You alone are responsible for compliance with the United
+ States export administration regulations (and the export control
+ laws and regulation of any other countries) when You use, distribute
+ or otherwise make available any Covered Software.
+
+10. RESPONSIBILITY FOR CLAIMS.
+
+ As between Initial Developer and the Contributors, each party is
+ responsible for claims and damages arising, directly or indirectly,
+ out of its utilization of rights under this License and You agree to
+ work with Initial Developer and Contributors to distribute such
+ responsibility on an equitable basis. Nothing herein is intended or
+ shall be deemed to constitute any admission of liability.
+
+------------------------------------------------------------------------
+
+NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION
+LICENSE (CDDL)
+
+The code released under the CDDL shall be governed by the laws of the
+State of California (excluding conflict-of-law provisions). Any
+litigation relating to this License shall be subject to the jurisdiction
+of the Federal Courts of the Northern District of California and the
+state courts of the State of California, with venue lying in Santa Clara
+County, California.
+
+
+
+ The GNU General Public License (GPL) Version 2, June 1991
+
+Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor
+Boston, MA 02110-1335
+USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to
+share and change it. By contrast, the GNU General Public License is
+intended to guarantee your freedom to share and change free software--to
+make sure the software is free for all its users. This General Public
+License applies to most of the Free Software Foundation's software and
+to any other program whose authors commit to using it. (Some other Free
+Software Foundation software is covered by the GNU Library General
+Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price.
+Our General Public Licenses are designed to make sure that you have the
+freedom to distribute copies of free software (and charge for this
+service if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone
+to deny you these rights or to ask you to surrender the rights. These
+restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+For example, if you distribute copies of such a program, whether gratis
+or for a fee, you must give the recipients all the rights that you have.
+You must make sure that they, too, receive or can get the source code.
+And you must show them these terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+Finally, any free program is threatened constantly by software patents.
+We wish to avoid the danger that redistributors of a free program will
+individually obtain patent licenses, in effect making the program
+proprietary. To prevent this, we have made it clear that any patent must
+be licensed for everyone's free use or not licensed at all.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License applies to any program or other work which contains a
+notice placed by the copyright holder saying it may be distributed under
+the terms of this General Public License. The "Program", below, refers
+to any such program or work, and a "work based on the Program" means
+either the Program or any derivative work under copyright law: that is
+to say, a work containing the Program or a portion of it, either
+verbatim or with modifications and/or translated into another language.
+(Hereinafter, translation is included without limitation in the term
+"modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of running
+the Program is not restricted, and the output from the Program is
+covered only if its contents constitute a work based on the Program
+(independent of having been made by running the Program). Whether that
+is true depends on what the Program does.
+
+1. You may copy and distribute verbatim copies of the Program's source
+code as you receive it, in any medium, provided that you conspicuously
+and appropriately publish on each copy an appropriate copyright notice
+and disclaimer of warranty; keep intact all the notices that refer to
+this License and to the absence of any warranty; and give any other
+recipients of the Program a copy of this License along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Program or any portion of
+it, thus forming a work based on the Program, and copy and distribute
+such modifications or work under the terms of Section 1 above, provided
+that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any part
+ thereof, to be licensed as a whole at no charge to all third parties
+ under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a notice
+ that there is no warranty (or else, saying that you provide a
+ warranty) and that users may redistribute the program under these
+ conditions, and telling the user how to view a copy of this License.
+ (Exception: if the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program
+ is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program, and
+can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based on
+the Program, the distribution of the whole must be on the terms of this
+License, whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of a
+storage or distribution medium does not bring the other work under the
+scope of this License.
+
+3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections 1
+ and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your cost
+ of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer to
+ distribute corresponding source code. (This alternative is allowed
+ only for noncommercial distribution and only if you received the
+ program in object code or executable form with such an offer, in
+ accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source code
+means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to control
+compilation and installation of the executable. However, as a special
+exception, the source code distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies the
+executable.
+
+If distribution of executable or object code is made by offering access
+to copy from a designated place, then offering equivalent access to copy
+the source code from the same place counts as distribution of the source
+code, even though third parties are not compelled to copy the source
+along with the object code.
+
+4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt otherwise
+to copy, modify, sublicense or distribute the Program is void, and will
+automatically terminate your rights under this License. However, parties
+who have received copies, or rights, from you under this License will
+not have their licenses terminated so long as such parties remain in
+full compliance.
+
+5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and all
+its terms and conditions for copying, distributing or modifying the
+Program or works based on it.
+
+6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further restrictions
+on the recipients' exercise of the rights granted herein. You are not
+responsible for enforcing compliance by third parties to this License.
+
+7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot distribute
+so as to satisfy simultaneously your obligations under this License and
+any other pertinent obligations, then as a consequence you may not
+distribute the Program at all. For example, if a patent license would
+not permit royalty-free redistribution of the Program by all those who
+receive copies directly or indirectly through you, then the only way you
+could satisfy both it and this License would be to refrain entirely from
+distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is implemented
+by public license practices. Many people have made generous
+contributions to the wide range of software distributed through that
+system in reliance on consistent application of that system; it is up to
+the author/donor to decide if he or she is willing to distribute
+software through any other system and a licensee cannot impose that choice.
+
+This section is intended to make thoroughly clear what is believed to be
+a consequence of the rest of this License.
+
+8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License may
+add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among countries
+not thus excluded. In such case, this License incorporates the
+limitation as if written in the body of this License.
+
+9. The Free Software Foundation may publish revised and/or new
+versions of the General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Program does not specify a version
+number of this License, you may choose any version ever published by the
+Free Software Foundation.
+
+10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the
+author to ask for permission. For software which is copyrighted by the
+Free Software Foundation, write to the Free Software Foundation; we
+sometimes make exceptions for this. Our decision will be guided by the
+two goals of preserving the free status of all derivatives of our free
+software and of promoting the sharing and reuse of software generally.
+
+NO WARRANTY
+
+11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM
+(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
+
+How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to
+attach them to the start of each source file to most effectively convey
+the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ One line to give the program's name and a brief idea of what it does.
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type
+ `show w'. This is free software, and you are welcome to redistribute
+ it under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the
+appropriate parts of the General Public License. Of course, the commands
+you use may be called something other than `show w' and `show c'; they
+could even be mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ program `Gnomovision' (which makes passes at compilers) written by
+ James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications
+with the library. If this is what you want to do, use the GNU Library
+General Public License instead of this License.
+
+#
+
+Certain source files distributed by Oracle America, Inc. and/or its
+affiliates are subject to the following clarification and special
+exception to the GPLv2, based on the GNU Project exception for its
+Classpath libraries, known as the GNU Classpath Exception, but only
+where Oracle has expressly included in the particular source file's
+header the words "Oracle designates this particular file as subject to
+the "Classpath" exception as provided by Oracle in the LICENSE file
+that accompanied this code."
+
+You should also note that Oracle includes multiple, independent
+programs in this software package. Some of those programs are provided
+under licenses deemed incompatible with the GPLv2 by the Free Software
+Foundation and others. For example, the package includes programs
+licensed under the Apache License, Version 2.0. Such programs are
+licensed to you under their original licenses.
+
+Oracle facilitates your further distribution of this package by adding
+the Classpath Exception to the necessary parts of its GPLv2 code, which
+permits you to use that code in combination with other independent
+modules not licensed under the GPLv2. However, note that this would
+not permit you to commingle code under an incompatible license with
+Oracle's GPLv2 licensed code by, for example, cutting and pasting such
+code into a file also containing Oracle's GPLv2 licensed code and then
+distributing the result. Additionally, if you were to remove the
+Classpath Exception from any of the files to which it applies and
+distribute the result, you would likely be required to license some or
+all of the other code in that distribution under the GPLv2 as well, and
+since the GPLv2 is incompatible with the license terms of some items
+included in the distribution by Oracle, removing the Classpath
+Exception could therefore effectively compromise your ability to
+further distribute the package.
+
+Proceed with caution and we recommend that you obtain the advice of a
+lawyer skilled in open source matters before removing the Classpath
+Exception or making modifications to this package which may
+subsequently be redistributed and/or involve the use of third party
+software.
+
+CLASSPATH EXCEPTION
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License version 2 cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from or
+based on this library. If you modify this library, you may extend this
+exception to your version of the library, but you are not obligated to
+do so. If you do not wish to do so, delete this exception statement
+from your version.
diff --git a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-jnanoid.txt b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-jnanoid.txt
deleted file mode 100644
index 65014f7b50223..0000000000000
--- a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-jnanoid.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-jnanoid License
----------------
-
-MIT License
-
-Copyright (c) 2017 The JNanoID Authors
-Copyright (c) 2017 Aventrix LLC
-Copyright (c) 2017 Andrey Sitnik
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-truffle-api.txt b/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-truffle-api.txt
deleted file mode 100644
index d656a31cb15d7..0000000000000
--- a/distribution/proxy-native/src/main/release-docs/licenses/LICENSE-truffle-api.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-The Universal Permissive License (UPL), Version 1.0
-
-Subject to the condition set forth below, permission is hereby granted to any
-person obtaining a copy of this software, associated documentation and/or
-data (collectively the "Software"), free of charge and under any and all
-copyright rights in the Software, and any and all patent rights owned or
-freely licensable by each licensor hereunder covering either (i) the
-unmodified Software as contributed to or provided by such licensor, or (ii)
-the Larger Works (as defined below), to deal in both
-
-(a) the Software, and
-
-(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
-one is included with the Software each a "Larger Work" to which the Software
-is contributed by such licensors),
-
-without restriction, including without limitation the rights to copy, create
-derivative works of, display, perform, and distribute the Software and make,
-use, sell, offer for sale, import, export, have made, and have sold the
-Software and the Larger Work(s), and to sublicense the foregoing rights on
-either these or other terms.
-
-This license is subject to the following condition:
-
-The above copyright notice and either this complete permission notice or at a
-minimum a reference to the UPL must be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/distribution/proxy/src/main/release-docs/LICENSE b/distribution/proxy/src/main/release-docs/LICENSE
index 5a979f8383efa..f41740785cd91 100644
--- a/distribution/proxy/src/main/release-docs/LICENSE
+++ b/distribution/proxy/src/main/release-docs/LICENSE
@@ -219,11 +219,11 @@ The text of each license is the standard Apache 2.0 license.
aggdesigner-algorithm 6.0: Apache 2.0
apiguardian-api 1.1.2: https://github.com/apiguardian-team/apiguardian, Apache 2.0
audience-annotations 0.12.0: https://github.com/apache/yetus, Apache 2.0
- avatica-core 1.22.0: https://calcite.apache.org/avatica, Apache 2.0
- avatica-metrics 1.22.0: https://calcite.apache.org/avatica, Apache 2.0
+ avatica-core 1.23.0: https://calcite.apache.org/avatica, Apache 2.0
+ avatica-metrics 1.23.0: https://calcite.apache.org/avatica, Apache 2.0
caffeine 2.9.3: https://github.com/ben-manes/caffeine, Apache 2.0
- calcite-core 1.32.0: https://calcite.apache.org, Apache 2.0
- calcite-linq4j 1.32.0: https://calcite.apache.org, Apache 2.0
+ calcite-core 1.35.0: https://calcite.apache.org, Apache 2.0
+ calcite-linq4j 1.35.0: https://calcite.apache.org, Apache 2.0
commons-codec 1.15: https://github.com/apache/commons-codec, Apache 2.0
commons-collections4 4.4: https://github.com/apache/commons-collections, Apache 2.0
commons-exec 1.3: https://github.com/apache/commons-exec, Apache 2.0
@@ -234,7 +234,6 @@ The text of each license is the standard Apache 2.0 license.
curator-client 5.4.0: https://github.com/apache/curator, Apache 2.0
curator-framework 5.4.0: https://github.com/apache/curator, Apache 2.0
curator-recipes 5.4.0: https://github.com/apache/curator, Apache 2.0
- cosid-core 1.18.5: https://github.com/Ahoo-Wang/CosId, Apache 2.0
error_prone_annotations 2.11.0: https://github.com/google/error-prone, Apache 2.0
failsafe 2.4.4: https://github.com/jhalterman/failsafe, Apache 2.0
failureaccess 1.0.1: https://github.com/google/guava, Apache 2.0
@@ -324,7 +323,7 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
antlr4-runtime 4.10.1: https://github.com/antlr/antlr4, BSD-3-Clause
asm 9.1: https://github.com/llbit/ow2-asm, BSD-3-Clause
commons-compiler 3.1.8: https://github.com/janino-compiler/janino, BSD-3-Clause
- janino 3.1.8: https://github.com/janino-compiler/janino, BSD-3-Clause
+ janino 3.1.9: https://github.com/janino-compiler/janino, BSD-3-Clause
opengauss-jdbc 3.1.0-og: https://gitee.com/opengauss/openGauss-connector-jdbc, BSD-2-Clause
postgresql 42.4.1: https://github.com/pgjdbc/pgjdbc, BSD-2-Clause
protobuf-java 3.21.12: https://github.com/protocolbuffers/protobuf/blob/master/java, BSD-3-Clause
@@ -371,14 +370,3 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
checker-qual 3.5.0: https://github.com/typetools/checker-framework/blob/master/checker-qual, MIT
jul-to-slf4j 1.7.36: https://www.slf4j.org, MIT
slf4j-api 1.7.36: https://www.slf4j.org, MIT
- jnanoid 2.0.0: https://github.com/aventrix/jnanoid, MIT
-
-========================================================================
-UPL licenses
-========================================================================
-
-The following components are provided under the UPL License. See project link for details.
-The text of each license is also included at licenses/LICENSE-[project].txt.
-
- graal-sdk 21.2.0: https://github.com/oracle/graal/tree/master/sdk, UPL 1.0
- truffle-api 21.2.0: https://github.com/oracle/graal/tree/master/truffle, UPL 1.0
diff --git a/distribution/proxy/src/main/release-docs/licenses/LICENSE-jnanoid.txt b/distribution/proxy/src/main/release-docs/licenses/LICENSE-jnanoid.txt
deleted file mode 100644
index 65014f7b50223..0000000000000
--- a/distribution/proxy/src/main/release-docs/licenses/LICENSE-jnanoid.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-jnanoid License
----------------
-
-MIT License
-
-Copyright (c) 2017 The JNanoID Authors
-Copyright (c) 2017 Aventrix LLC
-Copyright (c) 2017 Andrey Sitnik
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/distribution/proxy/src/main/release-docs/licenses/LICENSE-truffle-api.txt b/distribution/proxy/src/main/release-docs/licenses/LICENSE-truffle-api.txt
deleted file mode 100644
index d656a31cb15d7..0000000000000
--- a/distribution/proxy/src/main/release-docs/licenses/LICENSE-truffle-api.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-The Universal Permissive License (UPL), Version 1.0
-
-Subject to the condition set forth below, permission is hereby granted to any
-person obtaining a copy of this software, associated documentation and/or
-data (collectively the "Software"), free of charge and under any and all
-copyright rights in the Software, and any and all patent rights owned or
-freely licensable by each licensor hereunder covering either (i) the
-unmodified Software as contributed to or provided by such licensor, or (ii)
-the Larger Works (as defined below), to deal in both
-
-(a) the Software, and
-
-(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
-one is included with the Software each a "Larger Work" to which the Software
-is contributed by such licensors),
-
-without restriction, including without limitation the rights to copy, create
-derivative works of, display, perform, and distribute the Software and make,
-use, sell, offer for sale, import, export, have made, and have sold the
-Software and the Larger Work(s), and to sublicense the foregoing rights on
-either these or other terms.
-
-This license is subject to the following condition:
-
-The above copyright notice and either this complete permission notice or at a
-minimum a reference to the UPL must be included in all copies or substantial
-portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/distribution/proxy/src/main/resources/bin/start.sh b/distribution/proxy/src/main/resources/bin/start.sh
index 88f2c86c643f1..b75111486f90d 100644
--- a/distribution/proxy/src/main/resources/bin/start.sh
+++ b/distribution/proxy/src/main/resources/bin/start.sh
@@ -111,7 +111,7 @@ print_usage() {
echo " port: proxy listen port, default is 3307"
echo " config_dir: proxy config directory, default is 'conf'"
echo ""
- echo "start.sh [-a addresses] [-p port] [-c /path/to/conf]"
+ echo "start.sh [-a addresses] [-p port] [-c /path/to/conf] [-f] [-g] [-s /path/to/socket]"
echo "The options are unordered."
echo "-a Bind addresses, can be IPv4, IPv6, hostname. In"
echo " case more than one address is specified in a"
@@ -173,7 +173,7 @@ if [ $# == 0 ]; then
fi
if [[ $1 == -a ]] || [[ $1 == -p ]] || [[ $1 == -c ]] || [[ $1 == -f ]] || [[ $1 == -s ]]; then
- while getopts ":a:p:c:f:s:" opt
+ while getopts ":a:p:c:fs:" opt
do
case $opt in
a)
diff --git "a/docs/blog/content/material/2023_05_10_Simplifying_Learning_ShardingSphere\342\200\231s_Template_Engine_for_Streamlined_Examples.en.md" "b/docs/blog/content/material/2023_05_10_Simplifying_Learning_ShardingSphere\342\200\231s_Template_Engine_for_Streamlined_Examples.en.md"
index bfd8c02d51756..18d9db030c715 100644
--- "a/docs/blog/content/material/2023_05_10_Simplifying_Learning_ShardingSphere\342\200\231s_Template_Engine_for_Streamlined_Examples.en.md"
+++ "b/docs/blog/content/material/2023_05_10_Simplifying_Learning_ShardingSphere\342\200\231s_Template_Engine_for_Streamlined_Examples.en.md"
@@ -89,14 +89,14 @@ Each module generated within this framework is a standalone project, allowing fo
## 1. Locate the Example Generation Module
-Navigate to the [ShardingSphere project directory](https://github.com/apache/shardingsphere) and find the `shardingsphere-example-generator` module within the corresponding example module. This module contains all the template files and generation logic required for generating examples.
+Navigate to the [ShardingSphere project directory](https://github.com/apache/shardingsphere) and find the `shardingsphere-jdbc-example-generator` module within the corresponding example module. This module contains all the template files and generation logic required for generating examples.
![img](https://shardingsphere.apache.org/blog/img/2023_04_27_How_South_Korea’s_Yogiyo_Improved_Scalability_and_Performance_with_Apache_ShardingSphere.en.md6.jpeg)Figure 5 — Project structure of the generation engine
## 2. Configure the Generation Engine Parameters
-The `shardingsphere-example-generator` module is a standard Java project. The project's configuration file can be found at `resources/config.yaml`. This file allows users to declare various parameters supported by the generation engine. In addition to the template parameters for specific functions, we have also provided convenient configurations that users can customize according to their needs. The specific parameters and their meanings are outlined in Table 2:
+The `shardingsphere-jdbc-example-generator` module is a standard Java project. The project's configuration file can be found at `resources/config.yaml`. This file allows users to declare various parameters supported by the generation engine. In addition to the template parameters for specific functions, we have also provided convenient configurations that users can customize according to their needs. The specific parameters and their meanings are outlined in Table 2:
![img](https://shardingsphere.apache.org/blog/img/2023_04_27_How_South_Korea’s_Yogiyo_Improved_Scalability_and_Performance_with_Apache_ShardingSphere.en.md7.jpeg)
@@ -104,21 +104,21 @@ The `shardingsphere-example-generator` module is a standard Java project. The pr
After configuring the parameters, it’s time to generate the corresponding configuration module. This can be done in two ways:
-- **Running the Main Class:** Locate the `ExampleGeneratorMain` class under the `shardingsphere-example-generator` module and run the main method. This will generate the example in the configured output directory.
+- **Running the Main Class:** Locate the `ExampleGeneratorMain` class under the `shardingsphere-jdbc-example-generator` module and run the main method. This will generate the example in the configured output directory.
- **Using Maven Command Line:** Alternatively, you can use the Maven command line to trigger the generation process. The command should be executed as follows:
```
// generate configuration based on config.yaml
-./mvnw -B clean install -f examples/shardingsphere-example-generator/pom.xml -Pexample-generator
+./mvnw -B clean install -f examples/shardingsphere-jdbc-example-generator/pom.xml -Pexample-generator
// generation configuration based on command parameters
-./mvnw -B clean install -f examples/shardingsphere-example-generator/pom.xml -Pexample-generator -Dproducts=jdbc -Dmodes=cluster-zookeeper -Dtransactions=local -Dfeatures=shadow -Dframeworks=jdbc
+./mvnw -B clean install -f examples/shardingsphere-jdbc-example-generator/pom.xml -Pexample-generator -Dproducts=jdbc -Dmodes=cluster-zookeeper -Dtransactions=local -Dfeatures=shadow -Dframeworks=jdbc
```
## 4. View and Utilize the Examples
-Once the generation process is triggered, the associated example code will be generated in the configured output directory. Typically, this would be in the `shardingsphere-example-generator/target/generated-sources/ directory`. The generated directory structure can be seen in Figure 6 below:
+Once the generation process is triggered, the associated example code will be generated in the configured output directory. Typically, this would be in the `shardingsphere-jdbc-example-generator/target/generated-sources/ directory`. The generated directory structure can be seen in Figure 6 below:
![img](https://shardingsphere.apache.org/blog/img/2023_04_27_How_South_Korea’s_Yogiyo_Improved_Scalability_and_Performance_with_Apache_ShardingSphere.en.md8.jpeg)Figure 6 — Directory structure for generating examples
diff --git a/docs/community/content/team/_index.cn.md b/docs/community/content/team/_index.cn.md
index e0c4187475622..b489131011098 100644
--- a/docs/community/content/team/_index.cn.md
+++ b/docs/community/content/team/_index.cn.md
@@ -156,6 +156,11 @@ chapter = true
+
diff --git a/docs/document/content/dev-manual/mask.cn.md b/docs/document/content/dev-manual/mask.cn.md
index f6f5215f50469..8d88ccce78768 100644
--- a/docs/document/content/dev-manual/mask.cn.md
+++ b/docs/document/content/dev-manual/mask.cn.md
@@ -26,9 +26,4 @@ chapter = true
| MASK_FROM_X_TO_Y | 遮盖自 x 至 y 数据脱敏算法 | [`org.apache.shardingsphere.mask.algorithm.cover.MaskFromXToYMaskAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFromXToYMaskAlgorithm.java) |
| MASK_BEFORE_SPECIAL_CHARS | 特殊字符前遮盖数据脱敏算法 | [`org.apache.shardingsphere.mask.algorithm.cover.MaskBeforeSpecialCharsAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskBeforeSpecialCharsAlgorithm.java) |
| MASK_AFTER_SPECIAL_CHARS | 特殊字符后遮盖数据脱敏算法 | [`org.apache.shardingsphere.mask.algorithm.cover.MaskAfterSpecialCharsAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskAfterSpecialCharsAlgorithm.java) |
-| PERSONAL_IDENTITY_NUMBER_RANDOM_REPLACE | 身份证号随机替换数据脱敏算法 | [`org.apache.shardingsphere.mask.algorithm.replace.PersonalIdentityNumberRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/PersonalIdentityNumberRandomReplaceAlgorithm.java) |
-| MILITARY_IDENTITY_NUMBER_RANDOM_REPLACE | 军官证随机替换数据脱敏算法 | [`org.apache.shardingsphere.mask.algorithm.replace.MilitaryIdentityNumberRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/MilitaryIdentityNumberRandomReplaceAlgorithm.java) |
-| TELEPHONE_RANDOM_REPLACE | ⼿机号随机替换数据脱敏算法 | [`org.apache.shardingsphere.mask.algorithm.replace.TelephoneRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/TelephoneRandomReplaceAlgorithm.java) |
-| LANDLINE_NUMBER_RANDOM_REPLACE | 座机号码随机替换 | [`org.apache.shardingsphere.mask.algorithm.replace.LandlineNumberRandomAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/LandlineNumberRandomAlgorithm.java) |
| GENERIC_TABLE_RANDOM_REPLACE | 通⽤表格随机替换 | [`org.apache.shardingsphere.mask.algorithm.replace.GenericTableRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/GenericTableRandomReplaceAlgorithm.java) |
-| UNIFIED_CREDIT_CODE_RANDOM_REPLACE | 统⼀信⽤码随机替换 | [`org.apache.shardingsphere.mask.algorithm.replace.UnifiedCreditCodeRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/UnifiedCreditCodeRandomReplaceAlgorithm.java) |
diff --git a/docs/document/content/dev-manual/mask.en.md b/docs/document/content/dev-manual/mask.en.md
index dc77ef2926ba1..67580110eea07 100644
--- a/docs/document/content/dev-manual/mask.en.md
+++ b/docs/document/content/dev-manual/mask.en.md
@@ -26,9 +26,4 @@ Data masking algorithm definition
| MASK_FROM_X_TO_Y | Mask from x to y data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.cover.MaskFromXToYMaskAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskFromXToYMaskAlgorithm.java) |
| MASK_BEFORE_SPECIAL_CHARS | Mask before special chars data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.cover.MaskBeforeSpecialCharsAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskBeforeSpecialCharsAlgorithm.java) |
| MASK_AFTER_SPECIAL_CHARS | Mask after special chars data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.cover.MaskAfterSpecialCharsAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/MaskAfterSpecialCharsAlgorithm.java) |
-| PERSONAL_IDENTITY_NUMBER_RANDOM_REPLACE | Personal identity number random replace data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.replace.PersonalIdentityNumberRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/PersonalIdentityNumberRandomReplaceAlgorithm.java) |
-| MILITARY_IDENTITY_NUMBER_RANDOM_REPLACE | Military identity number random replace data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.replace.MilitaryIdentityNumberRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/MilitaryIdentityNumberRandomReplaceAlgorithm.java) |
-| TELEPHONE_RANDOM_REPLACE | Telephone random replace data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.replace.TelephoneRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/TelephoneRandomReplaceAlgorithm.java) |
-| LANDLINE_NUMBER_RANDOM_REPLACE | Landline number random replace data masking algorithm | [`org.apache.shardingsphere.mask.algorithm.replace.LandlineNumberRandomAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/LandlineNumberRandomAlgorithm.java) |
| GENERIC_TABLE_RANDOM_REPLACE | Generic table random replace algorithm | [`org.apache.shardingsphere.mask.algorithm.replace.GenericTableRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/GenericTableRandomReplaceAlgorithm.java) |
-| UNIFIED_CREDIT_CODE_RANDOM_REPLACE | Unified credit code random replace algorithm | [`org.apache.shardingsphere.mask.algorithm.replace.UnifiedCreditCodeRandomReplaceAlgorithm`](https://github.com/apache/shardingsphere/blob/master/features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/UnifiedCreditCodeRandomReplaceAlgorithm.java) |
diff --git a/docs/document/content/faq/_index.cn.md b/docs/document/content/faq/_index.cn.md
index 7438133330834..d5e3865a03ae7 100644
--- a/docs/document/content/faq/_index.cn.md
+++ b/docs/document/content/faq/_index.cn.md
@@ -7,6 +7,10 @@ chapter = true
## MODE
+### [MODE] 单机模式 `Standalone` 和 `Compatible_Standalone` 区别?
+
+在 5.4.0 版本中调整了元数据存储结构,`Standalone` 代表新版本的元数据结构,`Compatible_Standalone` 则代表 5.4.0 之前版本的元数据结构。
+
### [MODE] 集群模式 `Cluster` 和 `Compatible_Cluster` 区别?
回答:
diff --git a/docs/document/content/faq/_index.en.md b/docs/document/content/faq/_index.en.md
index 96f8a8ed0675f..f6e7d01b2383b 100644
--- a/docs/document/content/faq/_index.en.md
+++ b/docs/document/content/faq/_index.en.md
@@ -7,6 +7,13 @@ chapter = true
## MODE
+### [MODE] What is the difference between standalone mode `Standalone` and `Compatible_Standalone`?
+
+Answer:
+
+The metadata structure was adjusted in version 5.4.0, `Standalone` represents the metadata structure of the new version,
+and `Compatible_Standalone` represents the metadata structure of versions before 5.4.0.
+
### [MODE] What is the difference between cluster mode `Cluster` and `Compatible_Cluster`?
Answer:
diff --git a/docs/document/content/reference/mask/_index.cn.md b/docs/document/content/reference/mask/_index.cn.md
index 3d51efa76ae4c..8dea432389a81 100644
--- a/docs/document/content/reference/mask/_index.cn.md
+++ b/docs/document/content/reference/mask/_index.cn.md
@@ -22,7 +22,7 @@ Apache ShardingSphere 通过对用户查询的 SQL 进行解析,并依据用
**数据源配置**:指数据源配置。
-**脱敏算法配置**:指使用什么脱敏算法。目前 ShardingSphere 内置了多种脱敏算法:MD5、KEEP_FIRST_N_LAST_M、KEEP_FROM_X_TO_Y 、MASK_FIRST_N_LAST_M、MASK_FROM_X_TO_Y、MASK_BEFORE_SPECIAL_CHARS、MASK_AFTER_SPECIAL_CHARS、PERSONAL_IDENTITY_NUMBER_RANDOM_REPLACE、MILITARY_IDENTITY_NUMBER_RANDOM_REPLACE 和 TELEPHONE_RANDOM_REPLACE。用户还可以通过实现 ShardingSphere 提供的接口,自行实现一套脱敏算法。
+**脱敏算法配置**:指使用什么脱敏算法。目前 ShardingSphere 内置了多种脱敏算法:MD5、KEEP_FIRST_N_LAST_M、KEEP_FROM_X_TO_Y 、MASK_FIRST_N_LAST_M、MASK_FROM_X_TO_Y、MASK_BEFORE_SPECIAL_CHARS、MASK_AFTER_SPECIAL_CHARS 和 GENERIC_TABLE_RANDOM_REPLACE。用户还可以通过实现 ShardingSphere 提供的接口,自行实现一套脱敏算法。
**脱敏表配置**:用于告诉 ShardingSphere 数据表里哪个列用于数据脱敏、使用什么算法脱敏。
diff --git a/docs/document/content/reference/mask/_index.en.md b/docs/document/content/reference/mask/_index.en.md
index 1a869e21061c1..491100654332d 100644
--- a/docs/document/content/reference/mask/_index.en.md
+++ b/docs/document/content/reference/mask/_index.en.md
@@ -22,7 +22,7 @@ Desensitization configuration is mainly divided into three parts: data source co
**Data source configuration**: the configuration of the data source.
-**Mask algorithm configuration**: currently, ShardingSphere has a variety of built-in desensitization algorithms: MD5, KEEP_FIRST_N_LAST_M, KEEP_FROM_X_TO_Y , MASK_FIRST_N_LAST_M, MASK_FROM_X_TO_Y, MASK_BEFORE_SPECIAL_CHARS, MASK_AFTER_SPECIAL_CHARS, PERSONAL_IDENTITY_NUMBER_RANDOM_REPLACE, MILITARY_IDENTITY_NUMBER_RANDOM_REPLACE, and TELEPHONE_RANDOM_REPLACE.
+**Mask algorithm configuration**: currently, ShardingSphere has a variety of built-in desensitization algorithms: MD5, KEEP_FIRST_N_LAST_M, KEEP_FROM_X_TO_Y , MASK_FIRST_N_LAST_M, MASK_FROM_X_TO_Y, MASK_BEFORE_SPECIAL_CHARS, MASK_AFTER_SPECIAL_CHARS and GENERIC_TABLE_RANDOM_REPLACE.
Users can also implement a set of desensitization algorithms by implementing the interface provided by ShardingSphere.
diff --git a/docs/document/content/user-manual/common-config/builtin-algorithm/mask.cn.md b/docs/document/content/user-manual/common-config/builtin-algorithm/mask.cn.md
index 2aa745c565991..7eb51f1532125 100644
--- a/docs/document/content/user-manual/common-config/builtin-algorithm/mask.cn.md
+++ b/docs/document/content/user-manual/common-config/builtin-algorithm/mask.cn.md
@@ -95,46 +95,6 @@ weight = 9
### 替换脱敏算法
-#### 身份证随机替换脱敏算法
-
-类型:PERSONAL_IDENTITY_NUMBER_RANDOM_REPLACE
-
-可配置属性:
-
-| *名称* | *数据类型* | *说明* |
-|-----------------------------|--------|-----------------------|
-| alpha-two-country-area-code | String | 两位字母国家/地区编码(可选,默认:CN) |
-
-#### 军官证随机替换脱敏算法
-
-类型:MILITARY_IDENTITY_NUMBER_RANDOM_REPLACE
-
-可配置属性:
-
-| *名称* | *数据类型* | *说明* |
-|------------|--------|-------------------------------|
-| type-codes | String | 军官证种类编码(以英文逗号分隔,例如:军,人,士,文,职) |
-
-#### 手机号随机替换脱敏算法
-
-类型:TELEPHONE_RANDOM_REPLACE
-
-可配置属性:
-
-| *名称* | *数据类型* | *说明* |
-|-----------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| network-numbers | String | ⽹号(以英文逗号分隔,默认值:130,131,132,133,134,135,136,137,138,139,150,151,152,153,155,156,157,158,159,166,170,176,177,178,180,181,182,183,184,185,186,187,188,189,191,198,199) |
-
-#### 座机号码随机替换
-
-类型:LANDLINE_NUMBER_RANDOM_REPLACE
-
-可配置属性:
-
-| *名称* | *数据类型* | *说明* |
-|------------------|--------|---------------|
-| landline-numbers | String | 座机号码(以英文逗号分隔) |
-
#### 通⽤表格随机替换
类型:GENERIC_TABLE_RANDOM_REPLACE
@@ -148,18 +108,6 @@ weight = 9
| digital-codes | String | 数字码表(以英文逗号分隔,默认值:0,1,2,3,4,5,6,7,8,9) |
| special-codes | String | 特殊字符码表(以英文逗号分隔,默认值:~,!,@,#,$,%,^,&,*,:,<,>,¦) |
-#### 统⼀信⽤码随机替换
-
-类型:UNIFIED_CREDIT_CODE_RANDOM_REPLACE
-
-可配置属性:
-
-| *名称* | *数据类型* | *说明* |
-|-------------------------------|--------|-------------------|
-| registration-department-codes | String | 登记管理部门代码(以英文逗号分隔) |
-| category-codes | String | 机构类别代码(以英文逗号分隔) |
-| administrative-division-codes | String | 行政区划随机码表(以英文逗号分隔) |
-
## 操作步骤
1. 在脱敏规则中配置脱敏算法;
2. 为脱敏算法指定脱敏算法类型。
diff --git a/docs/document/content/user-manual/common-config/builtin-algorithm/mask.en.md b/docs/document/content/user-manual/common-config/builtin-algorithm/mask.en.md
index 8b493cb4eaaaf..d29b40d51caba 100644
--- a/docs/document/content/user-manual/common-config/builtin-algorithm/mask.en.md
+++ b/docs/document/content/user-manual/common-config/builtin-algorithm/mask.en.md
@@ -95,46 +95,6 @@ Attributes:
### Replace Data Masking Algorithm
-#### Personal Identity Number Random Replace Data Masking Algorithm
-
-Type: PERSONAL_IDENTITY_NUMBER_RANDOM_REPLACE
-
-Attributes:
-
-| *Name* | *DataType* | *Description* |
-|-----------------------------|------------|-----------------------------------------------------------|
-| alpha-two-country-area-code | String | alpha two country area code (Optional, default value: CN) |
-
-#### Military Identity Number Random Replace Data Masking Algorithm
-
-类型:MILITARY_IDENTITY_NUMBER_RANDOM_REPLACE
-
-可配置属性:
-
-| *Name* | *DataType* | *Description* |
-|-------------------------------|------------|------------------------------------------------------------|
-| type-codes | String | military identity number type codes (separate with comma) |
-
-#### Telephone Random Replace Data Masking Algorithm
-
-Type: TELEPHONE_RANDOM_REPLACE
-
-Attributes:
-
-| *Name* | *DataType* | *Description* |
-|-----------------|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| network-numbers | String | Network numbers (separate with comma, default value: 130,131,132,133,134,135,136,137,138,139,150,151,152,153,155,156,157,158,159,166,170,176,177,178,180,181,182,183,184,185,186,187,188,189,191,198,199) |
-
-#### Landline Number Random Replace Data Masking Algorithm
-
-Type: LANDLINE_NUMBER_RANDOM_REPLACE
-
-Attributes:
-
-| *Name* | *DataType* | *Description* |
-|------------------|------------|----------------------------------------|
-| landline-numbers | String | Landline numbers (separate with comma) |
-
#### Generic table random replace algorithm.
Type: GENERIC_TABLE_RANDOM_REPLACE
@@ -148,18 +108,6 @@ Attributes:
| digital-random-codes | String | Numbers (separate with comma, default value: 0,1,2,3,4,5,6,7,8,9) |
| special-codes | String | Special codes (separate with comma, default value: ~,!,@,#,$,%,^,&,*,:,<,>,¦) |
-#### Unified credit code random replace algorithm
-
-Type: UNIFIED_CREDIT_CODE_RANDOM_REPLACE
-
-Attributes:
-
-| *Name* | *DataType* | *Description* |
-|-------------------------------|------------|----------------------------------------------------|
-| registration-department-codes | String | Registration department code (separate with comma) |
-| category-codes | String | Category code (separate with comma) |
-| administrative-division-codes | String | Administrative division code (separate with comma) |
-
## Operating Procedure
1. Configure maskAlgorithms in a mask rule.
2. Use relevant algorithm types in maskAlgorithms.
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.cn.md b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
index 6d05733aa0570..779f387141d15 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.cn.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.cn.md
@@ -19,8 +19,9 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
| 42000 | 10002 | Can not support 3-tier structure for actual data node \`%s\` with JDBC \`%s\`. |
| HY004 | 10003 | Invalid format for actual data node \`%s\`. |
| 42000 | 10004 | Unsupported SQL node conversion for SQL statement \`%s\`. |
-| HY000 | 10005 | Column '%s' in field list is ambiguous. |
-| 42S02 | 10006 | Unknown column '%s' in 'field list'. |
+| HY000 | 10005 | Column '%s' in %s is ambiguous. |
+| 42S02 | 10006 | Unknown column '%s' in '%s'. |
+| 42S02 | 10007 | Table or view \`%s\` does not exist. |
| 42000 | 10010 | Rule does not exist. |
| 42S02 | 10020 | Schema \`%s\` does not exist. |
| 42S02 | 10021 | Single table \`%s\` does not exist. |
@@ -38,16 +39,16 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
### 语法
-| SQL State | Vendor Code | 错误信息 |
-|-----------|-------------|----------------------------------------------|
-| 42000 | 12000 | You have an error in your SQL syntax: %s |
-| 42000 | 12001 | Can not accept SQL type \`%s\`. |
-| 42000 | 12002 | SQL String can not be NULL or empty. |
-| 42000 | 12010 | Can not support variable \`%s\`. |
-| 42S02 | 12011 | Can not find column label \`%s\`. |
-| 42S02 | 12012 | Can not find driver url provider for \`%s`\. |
-| HV008 | 12020 | Column index \`%d\` is out of range. |
-| 0A000 | 12100 | DROP TABLE ... CASCADE is not supported. |
+| SQL State | Vendor Code | 错误信息 |
+|-----------|-------------|---------------------------------------------|
+| 42000 | 12000 | You have an error in your SQL syntax: %s |
+| 42000 | 12001 | Can not accept SQL type \`%s\`. |
+| 42000 | 12002 | SQL String can not be NULL or empty. |
+| 42000 | 12010 | Can not support variable \`%s\`. |
+| 42S02 | 12011 | Can not find column label \`%s\`. |
+| 42S02 | 12012 | Can not find url provider for \`%s`\. |
+| HV008 | 12020 | Column index \`%d\` is out of range. |
+| 0A000 | 12100 | DROP TABLE ... CASCADE is not supported. |
### 连接
@@ -70,7 +71,6 @@ SQL 错误码以标准的 SQL State,Vendor Code 和详细错误信息提供,
| 25000 | 14000 | Switch transaction type failed, please terminate the current transaction. |
| 25000 | 14001 | Can not find transaction manager of \`%s\`. |
| 25000 | 14002 | Transaction timeout should more than 0s. |
-| 25000 | 14100 | JDBC does not support operations across multiple logical databases in transaction. |
| 25000 | 14200 | Can not start new XA transaction in a active transaction. |
| 25000 | 14201 | Failed to create \`%s\` XA data source. |
| 25000 | 14202 | Max length of xa unique resource name \`%s\` exceeded: should be less than 45. |
diff --git a/docs/document/content/user-manual/error-code/sql-error-code.en.md b/docs/document/content/user-manual/error-code/sql-error-code.en.md
index 705b09c015b76..bd7f6229a5649 100644
--- a/docs/document/content/user-manual/error-code/sql-error-code.en.md
+++ b/docs/document/content/user-manual/error-code/sql-error-code.en.md
@@ -19,8 +19,9 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
| 42000 | 10002 | Can not support 3-tier structure for actual data node \`%s\` with JDBC \`%s\`. |
| HY004 | 10003 | Invalid format for actual data node \`%s\`. |
| 42000 | 10004 | Unsupported SQL node conversion for SQL statement \`%s\`. |
-| HY000 | 10005 | Column '%s' in field list is ambiguous. |
-| 42S02 | 10006 | Unknown column '%s' in 'field list'. |
+| HY000 | 10005 | Column '%s' in %s is ambiguous. |
+| 42S02 | 10006 | Unknown column '%s' in '%s'. |
+| 42S02 | 10007 | Table or view \`%s\` does not exist. |
| 42000 | 10010 | Rule does not exist. |
| 42S02 | 10020 | Schema \`%s\` does not exist. |
| 42S02 | 10021 | Single table \`%s\` does not exist. |
@@ -38,16 +39,16 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
### Syntax
-| SQL State | Vendor Code | Reason |
-|-----------|-------------|----------------------------------------------|
-| 42000 | 12000 | You have an error in your SQL syntax: %s |
-| 42000 | 12001 | Can not accept SQL type \`%s\`. |
-| 42000 | 12002 | SQL String can not be NULL or empty. |
-| 42000 | 12010 | Can not support variable \`%s\`. |
-| 42S02 | 12011 | Can not find column label \`%s\`. |
-| 42S02 | 12012 | Can not find driver url provider for \`%s`\. |
-| HV008 | 12020 | Column index \`%d\` is out of range. |
-| 0A000 | 12100 | DROP TABLE ... CASCADE is not supported. |
+| SQL State | Vendor Code | Reason |
+|-----------|-------------|---------------------------------------------|
+| 42000 | 12000 | You have an error in your SQL syntax: %s |
+| 42000 | 12001 | Can not accept SQL type \`%s\`. |
+| 42000 | 12002 | SQL String can not be NULL or empty. |
+| 42000 | 12010 | Can not support variable \`%s\`. |
+| 42S02 | 12011 | Can not find column label \`%s\`. |
+| 42S02 | 12012 | Can not find url provider for \`%s`\. |
+| HV008 | 12020 | Column index \`%d\` is out of range. |
+| 0A000 | 12100 | DROP TABLE ... CASCADE is not supported. |
### Connection
@@ -70,7 +71,6 @@ SQL error codes provide by standard `SQL State`, `Vendor Code` and `Reason`, whi
| 25000 | 14000 | Switch transaction type failed, please terminate the current transaction. |
| 25000 | 14001 | Can not find transaction manager of \`%s\`. |
| 25000 | 14002 | Transaction timeout should more than 0s. |
-| 25000 | 14100 | JDBC does not support operations across multiple logical databases in transaction. |
| 25000 | 14200 | Can not start new XA transaction in a active transaction. |
| 25000 | 14201 | Failed to create \`%s\` XA data source. |
| 25000 | 14202 | Max length of xa unique resource name \`%s\` exceeded: should be less than 45. |
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/_index.cn.md
index 9cc8f54921b26..c7d777fb048f9 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/_index.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/_index.cn.md
@@ -18,4 +18,4 @@ ShardingSphere-JDBC 提供了 2 种配置方式,用于不同的使用场景。
如果前一个规则是面向数据源聚合的,下一个规则在配置数据源时,则需要使用前一个规则配置的聚合后的逻辑数据源名称;
同理,如果前一个规则是面向表聚合的,下一个规则在配置表时,则需要使用前一个规则配置的聚合后的逻辑表名称。
-更多使用细节请参见[使用示例](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-example-generator)。
+更多使用细节请参见[使用示例](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-jdbc-example-generator)。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/_index.en.md
index ae71d0115590c..e7d4fc9b10b75 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/_index.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/_index.en.md
@@ -19,4 +19,4 @@ It should be noted that the superposition between rules are data source and tabl
If the previous rule is data source oriented aggregation, the next rule needs to use the aggregated logical data source name configured by the previous rule when configuring the data source;
Similarly, if the previous rule is table oriented aggregation, the next rule needs to use the aggregated logical table name configured by the previous rule when configuring the table.
-Please refer to [Example](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-example-generator) for more details.
+Please refer to [Example](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-jdbc-example-generator) for more details.
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md
index 443b945b95403..d3e5fd7e12cb2 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.cn.md
@@ -29,6 +29,92 @@ spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSph
spring.datasource.url=jdbc:shardingsphere:classpath:xxx.yaml
```
+`spring.datasource.url` 中的 YAML 配置文件当前支持通过三种方式获取,绝对路径 `absolutepath:`、Apollo 配置中心 `apollo:` 以及 CLASSPATH `classpath:`,具体可参考 `org.apache.shardingsphere.driver.jdbc.core.driver.ShardingSphereURLProvider` 的实现。
+
### 使用数据源
直接使用该数据源;或者将 ShardingSphereDataSource 配置在 JPA、Hibernate、MyBatis 等 ORM 框架中配合使用。
+
+## 针对 Spring Boot OSS 3 的特殊处理
+
+Spring Boot OSS 3 对 Jakarta EE 和 Java 17 进行了 “大爆炸” 升级,涉及大量复杂情况。
+
+对于正在使用 Java EE 8 API 及其实现的 ShardingSphere JDBC 而言,如果用户希望在 Spring Boot OSS 3 等基于 Jakarta EE 9+ API 的 Web
+Framework 上使用 ShardingSphere JDBC,则需要引入 Java EE 8 的 JAXB 的实现,并指定一个特定的 SnakeYAML 版本。
+
+这在 Maven 的 `pom.xml` 体现为如下内容。你也可以使用其他的 JAXB API 的实现。此配置同样适用于其他基于 Jakarta EE 的 Web Framework,如
+Quarkus 3,Micronaut Framework 4 和 Helidon 3。
+
+```xml
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-jdbc-core
+ ${shardingsphere.version}
+
+
+ org.yaml
+ snakeyaml
+ 1.33
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.8
+
+
+
+```
+
+如果用户是通过 https://start.spring.io/ 创建了 Spring Boot 项目,或者在 `dependencyManagement` 的 XML 标签导入了
+`org.springframework.boot:spring-boot-dependencies` 的 POM 文件,则可通过如下内容来简化配置。
+
+```xml
+
+
+ 1.33
+
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-jdbc-core
+ ${shardingsphere.version}
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.8
+
+
+
+```
+
+此外,ShardingSphere 的 XA 分布式事务尚未在 Spring Boot OSS 3 上就绪。
+
+## 针对低版本的 Spring Boot OSS 2 的特殊处理
+
+ShardingSphere 的所有特性均可在 Spring Boot OSS 2 上使用,但低版本的 Spring Boot OSS 可能需要手动指定 SnakeYAML 的版本为 1.33 。
+这在 Maven 的 `pom.xml` 体现为如下内容。
+
+```xml
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-jdbc-core
+ ${shardingsphere.version}
+
+
+ org.yaml
+ snakeyaml
+ 1.33
+
+
+
+```
+
+如果用户是通过 https://start.spring.io/ 创建了 Spring Boot 项目,或者在 `dependencyManagement` 的 XML 标签导入了
+`org.springframework.boot:spring-boot-dependencies`的 POM 文件,同样可以选择通过配置 `snakeyaml.version` 的 `properties`
+来简化内容。
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md
index 2520d84a48f2c..30c796166788e 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/jdbc-driver/spring-boot/_index.en.md
@@ -29,6 +29,94 @@ spring.datasource.driver-class-name=org.apache.shardingsphere.driver.ShardingSph
spring.datasource.url=jdbc:shardingsphere:classpath:xxx.yaml
```
+The YAML configuration file in 'spring.datasource.url' currently support in three ways, the absolute path 'absolutepath:', Apollo configuration center 'apollo:', and CLASSPATH 'classpath:', which can be referred to `org.apache.shardingsphere.driver.jdbc.core.driver.ShardingSphereURLProvider`'s implementation for details.
+
### Use Data Source
Use this data source directly; or configure ShardingSphereDataSource to be used in conjunction with ORM frameworks such as JPA, Hibernate, and MyBatis.
+
+## Special handling for Spring Boot OSS 3
+
+Spring Boot OSS 3 has made a "big bang" upgrade to Jakarta EE and Java 17, with all complications involved.
+
+For ShardingSphere JDBC that is using the Java EE 8 API and its implementation, if you want to use ShardingSphere JDBC
+on a Jakarta EE 9+ API-based web framework such as Spring Boot OSS 3, you need to introduce a JAXB implementation of
+Java EE 8 and specify a specific version of SnakeYAML.
+
+This is reflected in Maven's `pom.xml` as follows. You can also use other JAXB API implementations. This configuration
+also applies to other Jakarta EE-based Web Frameworks, such as Quarkus 3, Micronaut Framework 4 and Helidon 3.
+
+```xml
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-jdbc-core
+ ${shardingsphere.version}
+
+
+ org.yaml
+ snakeyaml
+ 1.33
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.8
+
+
+
+```
+
+If the user created the Spring Boot project from https://start.spring.io/, or the `dependencyManagement` XML tag was
+imported POM file for `org.springframework.boot:spring-boot-dependencies`, users can simplify configuration by
+following things.
+
+```xml
+
+
+ 1.33
+
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-jdbc-core
+ ${shardingsphere.version}
+
+
+ org.glassfish.jaxb
+ jaxb-runtime
+ 2.3.8
+
+
+
+```
+
+In addition, ShardingSphere's XA distributed transactions are not yet ready on Spring Boot OSS 3.
+
+## Special handling for earlier versions of Spring Boot OSS 2
+
+All features of ShardingSphere are available on Spring Boot OSS 2, but earlier versions of Spring Boot OSS may require
+manually specifying version 1.33 for SnakeYAML.
+This is reflected in Maven's `pom.xml` as follows.
+
+```xml
+
+
+
+ org.apache.shardingsphere
+ shardingsphere-jdbc-core
+ ${shardingsphere.version}
+
+
+ org.yaml
+ snakeyaml
+ 1.33
+
+
+
+```
+If the user created the Spring Boot project from https://start.spring.io/, or the `dependencyManagement` XML tag was
+imported POM file for `org.springframework.boot:spring-boot-dependencies`, users can also choose to simplify the content
+by configuring `properties` for `snakeyaml.version`.
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
index ab6a3d1bd3f67..5983b73914cb9 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
@@ -77,7 +77,7 @@ value ::=
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
));
```
@@ -88,4 +88,4 @@ COLUMNS(
### 相关链接
- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
-- [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/)
\ No newline at end of file
+- [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
index 10b1eb6efa49c..89f22f3cf7a58 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
@@ -76,7 +76,7 @@ value ::=
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
));
```
@@ -87,4 +87,4 @@ COLUMNS(
### Related links
- [Reserved word](/en/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
-- [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
\ No newline at end of file
+- [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
index 579b7d96ef611..837c220105632 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
@@ -81,12 +81,12 @@ value ::=
CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
)),
t_encrypt_2 (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
));
```
@@ -96,12 +96,12 @@ COLUMNS(
CREATE ENCRYPT RULE IF NOT EXISTS t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
)),
t_encrypt_2 (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
));
```
@@ -112,4 +112,4 @@ COLUMNS(
### 相关链接
- [保留字](/cn/user-manual/shardingsphere-proxy/distsql/syntax/reserved-word/)
-- [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/)
\ No newline at end of file
+- [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
index 429cd76cb7d98..4128ed78ea4bb 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
@@ -81,12 +81,12 @@ value ::=
CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
)),
t_encrypt_2 (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
));
```
@@ -96,12 +96,12 @@ COLUMNS(
CREATE ENCRYPT RULE IF NOT EXISTS t_encrypt (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER =order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
)),
t_encrypt_2 (
COLUMNS(
(NAME=user_id,CIPHER=user_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
-(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
+(NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='RC4',PROPERTIES('rc4-key-value'='123456abc'))))
));
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
index 572a7e6677b40..0afb8a6894613 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
@@ -83,7 +83,7 @@ strategyType ::=
- 只能使用自动分片算法,可参考[自动分片算法](/cn/user-manual/common-config/builtin-algorithm/sharding/#自动分片算法)。
- `algorithmType` 为分片算法类型,分片算法类型请参考[分片算法](/cn/user-manual/common-config/builtin-algorithm/sharding/);
- 自动生成的算法命名规则为 `tableName` _ `strategyType` _ `algorithmType`;
-- 自动生成的主键策略命名规则为 `tableName` _ `strategyType;
+- 自动生成的主键策略命名规则为 `tableName` _ `strategyType`;
- `KEY_GENERATE_STRATEGY`
用于指定主键生成策略,为可选项,关于主键生成策略可参考[分布式主键](/cn/user-manual/common-config/builtin-algorithm/keygen/);
- `AUDIT_STRATEGY`
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
index c0e5f29ef3e0d..973e550be6911 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.cn.md
@@ -5,14 +5,13 @@ weight = 2
## 背景信息
-本节主要介绍如何通过 `GraalVM` 的 `native-image` 组件构建 ShardingSphere-Proxy 的 `Native Image` 和对应的 `Docker Image`
-。
+本节主要介绍如何通过 `GraalVM` 的 `native-image` 组件构建 ShardingSphere-Proxy 的 `Native Image` 和对应的 `Docker Image`。
## 注意事项
-- ShardingSphere Proxy 尚未准备好与 GraalVM Native Image 集成。
- 其在 https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-proxy-native 存在每夜构建。
- 假设存在包含`server.yaml` 的 `conf` 文件夹为 `./custom/conf`,你可通过如下的 `docker-compose.yml` 文件进行测试。
+- ShardingSphere Proxy 尚未准备好与 GraalVM Native Image 集成。 Proxy 的 Native Image 产物在
+ https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-proxy-native 存在每夜构建。假设存在包
+ 含`server.yaml` 的 `conf` 文件夹为 `./custom/conf`,你可通过如下的 `docker-compose.yml` 文件进行测试。
```yaml
version: "3.8"
@@ -30,37 +29,40 @@ services:
应当在 https://github.com/oracle/graalvm-reachability-metadata 打开新的 issue ,
并提交包含 ShardingSphere 自身或依赖的第三方库缺失的 GraalVM Reachability Metadata 的 PR。
-- ShardingSphere 的 master 分支尚未准备好处理 Native Image 中的单元测试,
- 需要等待 Junit 5 Platform 的集成,你总是需要在构建 GraalVM Native Image 的过程中,
+- ShardingSphere 的 master 分支尚未准备好处理 Native Image 中的单元测试 , 你总是需要在构建 GraalVM Native Image 的过程中,
加上特定于 `GraalVM Native Build Tools` 的 `-DskipNativeTests` 或 `-DskipTests` 参数跳过 Native Image 中的单元测试。
-- 如下 3 个算法类由于涉及到 GraalVM Truffle Espresso 不方便在 host JVM 和 guest JVM 之间交互的 `groovy.lang.Closure`
- 类,暂未可在 GraalVM Native Image 下使用。
+- 如下的算法类由于涉及到 https://github.com/oracle/graal/issues/5522 , 暂未可在 GraalVM Native Image 下使用。
- `org.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineShardingAlgorithm`
- `org.apache.shardingsphere.sharding.algorithm.sharding.inline.ComplexInlineShardingAlgorithm`
- `org.apache.shardingsphere.sharding.algorithm.sharding.hint.HintInlineShardingAlgorithm`
-- 当前阶段,GraalVM Native Image 形态的 ShardingSphere Proxy 处于混合 AOT ( GraalVM Native Image ) 和 JIT ( GraalVM
- Truffle Espresso ) 运行的阶段。由于 https://github.com/oracle/graal/issues/4555 尚未关闭,GraalVM Truffle Espresso
- 运行需要的 `.so` 文件并不会进入 GraalVM Native Image 内。因此如果你需要在 Docker Image 外运行 ShardingSphere Proxy
- Native 的二进制文件,你需要确保系统环境变量 `JAVA_HOME` 指向 GraalVM 的 `bin` 目录,并且此 GraalVM
- 实例已经通过 `GraalVM Updater` 安装了 `espresso` 组件。
+- 当前阶段,GraalVM Native Image 形态的 ShardingSphere Proxy 不支持使用带 Groovy
+ 语法的 `行表达式`, 这首先导致 `数据分片` 功能的`actualDataNodes`属性只能使用纯列表来配置, 例如 `ds_0.t_order_0, ds_0.t_order_1`
+ 或 `ds_0.t_user_0, ds_15.t_user_1023`。此问题在 https://github.com/oracle/graal/issues/5522 追踪。
- 本节假定处于 Linux(amd64,aarch64), MacOS(amd64)或 Windows(amd64)环境。
如果你位于 MacOS(aarch64/M1) 环境,你需要关注尚未关闭的 https://github.com/oracle/graal/issues/2666 。
+- `org.apache.shardingsphere:shardingsphere-cluster-mode-repository-etcd` 受
+ https://github.com/micronaut-projects/micronaut-gcp/issues/532 影响,不可使用。
+
## 前提条件
-1. 根据 https://www.graalvm.org/downloads/ 要求安装和配置 JDK 17 对应的 `GraalVM CE` 或 `GraalVM EE`。
- 同时可以通过 `SDKMAN!` 安装 JDK 17 对应的 `GraalVM CE`。
+1. 根据 https://www.graalvm.org/downloads/ 要求安装和配置 JDK 17 对应的 `GraalVM Community Edition` 或 `Oracle GraalVM`
+ 。或者使用 `SDKMAN!`
+ 。如果你希望使用携带了 [GraalVM Free Terms and Conditions license](https://www.oracle.com/downloads/licenses/graal-free-license.html)
+ 的 `Oracle GraalVM`,下面的命令应更改为 `sdk install java 17.0.8-graal`。
-2. 通过 `GraalVM Updater` 工具安装 `native-image` 和 `espresso` 组件。
+```shell
+sdk install java 17.0.8-graalce
+```
-3. 根据 https://www.graalvm.org/22.3/reference-manual/native-image/#prerequisites 的要求安装本地工具链。
+2. 根据 https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites 的要求安装本地工具链。
-4. 如果需要构建 Docker Image, 确保 `docker-ce` 已安装。
+3. 如果需要构建 Docker Image, 确保 `docker-ce` 已安装。
-5. 首先需要在项目的根目录下,执行如下命令以为所有子模块采集 Standard 形态的 GraalVM 可达性元数据。
+4. 首先需要在项目的根目录下,执行如下命令以为所有子模块采集 Standard 形态的 GraalVM 可达性元数据。
```shell
./mvnw -PgenerateStandardMetadata -DskipNativeTests -B -T1C clean test
@@ -94,12 +96,12 @@ services:
com.mysqlmysql-connector-j
- 8.0.32
+ 8.1.0org.apache.shardingsphereshardingsphere-sql-translator-jooq-provider
- 5.3.1
+ 5.4.0
```
@@ -142,31 +144,28 @@ services:
- 如果你不对 Git Source 做任何更改, 上文提及的命令将使用 `oraclelinux:9-slim` 作为 Base Docker Image。
但如果你希望使用 `busybox:glic`,`gcr.io/distroless/base` 或 `scratch` 等更小体积的 Docker Image 作为 Base Docker
- Image,你需要根据 https://www.graalvm.org/22.3/reference-manual/native-image/guides/build-static-executables/ 的要求,
+ Image,你需要根据 https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/ 的要求,
做为 `pom.xml`的 `native profile` 添加 `-H:+StaticExecutableWithDynamicLibC` 的 `jvmArgs` 等操作。
另请注意,某些第三方依赖将需要在 `Dockerfile` 安装更多系统库,例如 `libdl`。
- 因此请确保根据你的使用情况调整 `distribution/proxy-native`
- 下的 `pom.xml` 和 `Dockerfile` 的内容。
+ 因此请确保根据你的使用情况调整 `distribution/proxy-native` 下的 `pom.xml` 和 `Dockerfile` 的内容。
# 可观察性
-- 针对 GraalVM Native Image 形态的 ShardingSphere
- Proxy,其提供的可观察性的能力与 https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/observability/
- 并不一致。
+- 针对 GraalVM Native Image 形态的 ShardingSphere Proxy,其提供的可观察性的能力与
+ https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/observability/ 并不一致。
-- 你可以使用 https://www.graalvm.org/22.3/tools/ 提供的一系列命令行工具或可视化工具观察 GraalVM Native Image
- 的内部行为,并根据其要求使用 VSCode 完成调试工作。
- 如果你正在使用 IntelliJ IDEA 并且希望调试生成的 GraalVM Native
- Image,你可以关注 https://blog.jetbrains.com/idea/2022/06/intellij-idea-2022-2-eap-5/#Experimental_GraalVM_Native_Debugger_for_Java
- 及其后继。如果你使用的不是 Linux,则无法对 GraalVM Native Image 进行
- Debug,请关注尚未关闭的 https://github.com/oracle/graal/issues/5648 。
+- 你可以使用 https://www.graalvm.org/latest/tools/ 提供的一系列命令行工具或可视化工具观察 GraalVM Native Image 的内部行为,
+ 并根据其要求使用 VSCode 完成调试工作。如果你正在使用 IntelliJ IDEA 并且希望调试生成的 GraalVM Native Image,你可以关注
+ https://blog.jetbrains.com/idea/2022/06/intellij-idea-2022-2-eap-5/#Experimental_GraalVM_Native_Debugger_for_Java
+ 及其后继。如果你使用的不是 Linux,则无法对 GraalVM Native Image 进行 Debug,请关注尚未关闭的
+ https://github.com/oracle/graal/issues/5648 。
- 对于使用 `ShardingSphere Agent` 等 APM Java Agent 的情形, GraalVM 的 `native-image` 组件尚未完全支持在构建 Native
Image 时使用 javaagent,你需要关注尚未关闭的 https://github.com/oracle/graal/issues/1065。
- 以下部分采用 `Apache SkyWalking Java Agent` 作为示例,可用于跟踪 GraalVM 社区的对应 issue。
-1. 下载 https://archive.apache.org/dist/skywalking/java-agent/8.12.0/apache-skywalking-java-agent-8.12.0.tgz ,
+1. 下载 https://archive.apache.org/dist/skywalking/java-agent/8.16.0/apache-skywalking-java-agent-8.16.0.tgz ,
并解压到 ShardingSphere Git Source 的 `distribution/proxy-native`。
2. 修改 `distribution/proxy-native/pom.xml` 的 `native profile`,
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
index 5d37f04ac1fbb..993d9dcd48263 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/startup/graalvm-native-image.en.md
@@ -10,9 +10,8 @@ corresponding `Docker Image` through the `native-image` component of `GraalVM`.
## Notice
-- ShardingSphere Proxy is not yet ready to integrate with GraalVM Native Image.
- Fixes documentation for building GraalVM Native Image It exists nightly builds
- at https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-proxy-native.
+- ShardingSphere Proxy is not yet ready to integrate with GraalVM Native Image. Proxy's Native Image artifacts are
+ built nightly at https://github.com/apache/shardingsphere/pkgs/container/shardingsphere-proxy-native .
Assuming there is a `conf` folder containing `server.yaml` as `./custom/conf`, you can test it with the
following `docker-compose.yml` file.
@@ -28,46 +27,49 @@ services:
- "3307:3307"
````
-- If you find that the build process has missing GraalVM Reachability Metadata,
- A new issue should be opened at https://github.com/oracle/graalvm-reachability-metadata,
- And submit a PR containing GraalVM Reachability Metadata missing from ShardingSphere itself or dependent third-party
- libraries.
+- If you find that the build process has missing GraalVM Reachability Metadata, a new issue should be opened
+ at https://github.com/oracle/graalvm-reachability-metadata, and submit a PR containing GraalVM Reachability Metadata
+ missing from ShardingSphere itself or dependent third-party libraries.
- The master branch of ShardingSphere is not yet ready to handle unit tests in Native Image,
- Need to wait for the integration of Junit 5 Platform, you always need to build GraalVM Native Image in the process,
+ you always need to build GraalVM Native Image in the process,
Plus `-DskipNativeTests` or `-DskipTests` parameter specific to `GraalVM Native Build Tools` to skip unit tests in
Native Image.
-- The following three algorithm classes are not available under GraalVM Native Image because they involve
- the `groovy.lang.Closure` class that is inconvenient for GraalVM Truffle Espresso to interact between the host JVM and
- the guest JVM.
+- The following algorithm classes are not available under GraalVM Native Image due
+ to https://github.com/oracle/graal/issues/5522 involved.
- `org.apache.shardingsphere.sharding.algorithm.sharding.inline.InlineShardingAlgorithm`
- `org.apache.shardingsphere.sharding.algorithm.sharding.inline.ComplexInlineShardingAlgorithm`
- `org.apache.shardingsphere.sharding.algorithm.sharding.hint.HintInlineShardingAlgorithm`
-- At the current stage, ShardingSphere Proxy in GraalVM Native Image is in the stage of mixed AOT ( GraalVM
- Native Image ) and JIT ( GraalVM Truffle Espresso ) operation. Since https://github.com/oracle/graal/issues/4555 has
- not been closed, the `.so` file required for GraalVM Truffle Espresso to run does not enter the GraalVM Native Image.
- So if you need to run ShardingSphere Proxy Native binary files outside the Docker Image, you need to ensure
- that the system environment variable `JAVA_HOME` points to the `bin` directory of GraalVM, and this
- GraalVM instance already has the `espresso` component installed via the `GraalVM Updater`.
+- At this stage, ShardingSphere Proxy in the form of GraalVM Native Image does not support the use
+ of `Row Value Expressions` with Groovy syntax, which first results in the `actualDataNodes` property of the `Sharding`
+ feature being only configurable using a pure list, such as `ds_0.t_order_0, ds_0.t_order_1`
+ or `ds_0.t_user_0, ds_15.t_user_1023`. This issue is tracked in https://github.com/oracle/graal/issues/5522 .
- This section assumes a Linux (amd64, aarch64), MacOS (amd64) or Windows (amd64) environment.
If you are on MacOS (aarch64/M1) environment, you need to follow https://github.com/oracle/graal/issues/2666 which is
not closed yet.
+- 'org.apache.shardingsphere:shardingsphere-cluster-mode-repository-etcd' is affected by
+ https://github.com/micronaut-projects/micronaut-gcp/issues/532 and cannot be used.
+
## Premise
-1. Install and configure `GraalVM CE` or `GraalVM EE` for JDK 17 according to https://www.graalvm.org/downloads/.
- `GraalVM CE` for JDK 17 can also be installed via `SDKMAN!`.
+1. Install and configure `GraalVM Community Edition` or `Oracle GraalVM` for JDK 17 according
+ to https://www.graalvm.org/downloads/. Or use `SDKMAN!`. If you wish to use `Oracle GraalVM`
+ with [GraalVM Free Terms and Conditions license](https://www.oracle.com/downloads/licenses/graal-free-license.html),
+ the following command should be changed to `sdk install java 17.0.8-graal`.
-2. Install the `native-image` and `espresso` component via the `GraalVM Updater` tool.
+```shell
+sdk install java 17.0.8-graalce
+```
-3. Install the local toolchain as required by https://www.graalvm.org/22.3/reference-manual/native-image/#prerequisites.
+2. Install the local toolchain as required by https://www.graalvm.org/latest/reference-manual/native-image/#prerequisites.
-4. If you need to build a Docker Image, make sure `docker-ce` is installed.
+3. If you need to build a Docker Image, make sure `docker-ce` is installed.
-5. First, you need to execute the following command in the root directory of the project to collect the GraalVM
+4. First, you need to execute the following command in the root directory of the project to collect the GraalVM
Reachability Metadata of the Standard form for all submodules.
```shell
@@ -104,12 +106,12 @@ services:
com.mysqlmysql-connector-j
- 8.0.32
+ 8.1.0org.apache.shardingsphereshardingsphere-sql-translator-jooq-provider
- 5.3.1
+ 5.4.0
```
@@ -120,12 +122,11 @@ services:
./mvnw -am -pl distribution/proxy-native -B -T1C -Prelease.native -DskipTests clean package
```
-3. To start Native Image through the command line, you need to bring 4 parameters.
- The first parameter is the port used by ShardingSphere Proxy, the second parameter is the `/conf` folder
- containing `server.yaml` written by you, the third parameter is the Address of the bound port, and the fourth parameter is
- Force Start, if it is true, it will ensure that ShardingSphere Proxy Native can start normally no matter whether it
- is connected or not.
- Assuming the folder `./custom/conf` already exists, the example is
+3. To start Native Image through the command line, you need to bring 4 parameters. The first parameter is the `Port`
+ used by ShardingSphere Proxy, the second parameter is the `/conf` folder containing `server.yaml` written by you, the
+ third parameter is the `Address` of the bound port, and the fourth parameter is `Force Start`, if it is true, it will
+ ensure that ShardingSphere Proxy Native can start normally no matter whether it is connected or not. Assuming the
+ folder `./custom/conf` already exists, the example is
```bash
./apache-shardingsphere-proxy-native 3307 ./custom/conf "0.0.0.0" false
@@ -154,26 +155,24 @@ services:
```
- If you don't make any changes to the Git Source, the commands mentioned above will use `oraclelinux:9-slim` as the
- Base Docker Image.
- But if you want to use a smaller Docker Image like `busybox:glic`, `gcr.io/distroless/base` or `scratch` as the Base
- Docker Image, you need according
- to https://www.graalvm.org/22.3/reference-manual/native-image/guides/build-static-executables/,
- Add operations such as `-H:+StaticExecutableWithDynamicLibC` to `jvmArgs` as the `native profile` of `pom.xml`.
- Also note that some 3rd party dependencies will require more system libraries such as `libdl` to be installed in
- the `Dockerfile`.
- So make sure to tune `distribution/proxy-native` according to your usage
- `pom.xml` and `Dockerfile` below.
+ Base Docker Image. But if you want to use a smaller Docker Image like `busybox:glic`, `gcr.io/distroless/base` or
+ `scratch` as the Base Docker Image, you need according
+ to https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/,
+ add operations such as `-H:+StaticExecutableWithDynamicLibC` to `jvmArgs` as the `native profile` of `pom.xml`.
+ Also note that some 3rd-party dependencies will require more system libraries such as `libdl` to be installed in
+ the `Dockerfile`. So make sure to tune `distribution/proxy-native` according to your usage `pom.xml` and `Dockerfile`
+ below.
# Observability
- ShardingSphere for GraalVM Native Image form Proxy, which provides observability capabilities
with https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/observability/
- Not consistent.
+ not consistent.
- You can observe GraalVM Native Image using a series of command line tools or visualization tools available
- at https://www.graalvm.org/22.3/tools/, and use VSCode to debug it according to its requirements.
- If you are using IntelliJ IDEA and want to debug the generated GraalVM Native Image, You can
- follow https://blog.jetbrains.com/idea/2022/06/intellij-idea-2022-2-eap-5/#Experimental_GraalVM_Native_Debugger_for_Java
+ at https://www.graalvm.org/latest/tools/, and use VSCode to debug it according to its requirements.
+ If you are using IntelliJ IDEA and want to debug the generated GraalVM Native Image, You can follow
+ https://blog.jetbrains.com/idea/2022/06/intellij-idea-2022-2-eap-5/#Experimental_GraalVM_Native_Debugger_for_Java
and its successors. If you are not using Linux, you cannot debug GraalVM Native Image, please pay attention
to https://github.com/oracle/graal/issues/5648 which has not been closed yet.
@@ -184,7 +183,7 @@ services:
- The following sections use the `Apache SkyWalking Java Agent` as an example, which can be used to track corresponding
issues from the GraalVM community.
-1. Download https://archive.apache.org/dist/skywalking/java-agent/8.12.0/apache-skywalking-java-agent-8.12.0.tgz and `untar` it
+1. Download https://archive.apache.org/dist/skywalking/java-agent/8.16.0/apache-skywalking-java-agent-8.16.0.tgz and `untar` it
to `distribution/proxy-native` in ShardingSphere Git Source.
2. Modify the `native profile` of `distribution/proxy-native/pom.xml`,
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.cn.md
index ad5dd02b2683c..79b3227be9124 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.cn.md
@@ -118,4 +118,4 @@ authority:
## 相关参考
-权限提供者具体实现可以参考 [权限提供者](/cn/dev-manual/proxy)。
+权限提供者具体实现可以参考 [权限提供者](/cn/user-manual/shardingsphere-proxy/yaml-config/authority/)。
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.en.md b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.en.md
index c3226d22a0950..307b119c6513d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/yaml-config/authority.en.md
@@ -119,4 +119,4 @@ Explanation:
## Related References
-Please refer to [Authority Provider](/en/dev-manual/proxy) for the specific implementation of authority provider.
+Please refer to [Authority Provider](/en/user-manual/shardingsphere-proxy/yaml-config/authority/) for the specific implementation of authority provider.
diff --git a/examples/README.md b/examples/README.md
index 1b40916951ac1..6d1fa83bf5b63 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -40,7 +40,7 @@ shardingsphere-example
│ ├── example-raw-jdbc
│ ├── example-spring-jpa
│ └── example-spring-mybatis
- ├── shardingsphere-example-generator
+ ├── shardingsphere-jdbc-example-generator
├── shardingsphere-parser-example
├── shardingsphere-proxy-example
│ ├── shardingsphere-proxy-boot-mybatis-example
@@ -54,7 +54,7 @@ shardingsphere-example
| Example | Description |
|------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
-| [ShardingSphere-JDBC Examples](shardingsphere-example-generator/README.md) | Generate the examples by configuration and show how to use ShardingSphere-JDBC |
+| [ShardingSphere-JDBC Examples](shardingsphere-jdbc-example-generator/README.md) | Generate the examples by configuration and show how to use ShardingSphere-JDBC |
| [DistSQL](shardingsphere-proxy-example/shardingsphere-proxy-distsql-example) | show how to use DistSQL in ShardingSphere-Proxy |
| APM(Pending) | show how to use APM in ShardingSphere |
| proxy(Pending) | show how to use ShardingSphere-Proxy |
diff --git a/examples/README_ZH.md b/examples/README_ZH.md
index 0589f2529d59a..d77a88f01e949 100644
--- a/examples/README_ZH.md
+++ b/examples/README_ZH.md
@@ -6,7 +6,7 @@
**注意事项**
-- *`shardingsphere-example-generator`模块是一个全新的示例体验模块*
+- *`shardingsphere-jdbc-example-generator`模块是一个全新的示例体验模块*
-
*如果采用手动模式,请在首次运行示例之前执行[初始化脚本](https://github.com/apache/shardingsphere/blob/master/examples/src/resources/manual_schema.sql)。*
@@ -41,7 +41,7 @@ shardingsphere-example
│ ├── example-raw-jdbc
│ ├── example-spring-jpa
│ └── example-spring-mybatis
- ├── shardingsphere-example-generator
+ ├── shardingsphere-jdbc-example-generator
├── shardingsphere-parser-example
├── shardingsphere-proxy-example
│ ├── shardingsphere-proxy-boot-mybatis-example
@@ -55,7 +55,7 @@ shardingsphere-example
| 例子 | 描述 |
|------------------------------------------------------------------------------|--------------------------------------|
-| [ShardingSphere-JDBC示例](shardingsphere-example-generator/README_ZH.md) | 通过配置生成ShardingSphere-JDBC的演示示例 |
+| [ShardingSphere-JDBC示例](shardingsphere-jdbc-example-generator/README.md) | 通过配置生成ShardingSphere-JDBC的演示示例 |
| [DistSQL](shardingsphere-proxy-example/shardingsphere-proxy-distsql-example) | 演示在 ShardingSphere-Proxy 中使用 DistSQL |
| APM 监控(Pending) | 演示在 ShardingSphere 中使用 APM 监控 |
| proxy(Pending) | 演示使用 ShardingSphere-Proxy |
diff --git a/examples/example-core/config-utility/pom.xml b/examples/example-core/config-utility/pom.xml
deleted file mode 100644
index 3d71b69a1f356..0000000000000
--- a/examples/example-core/config-utility/pom.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
- 4.0.0
-
- org.apache.shardingsphere.example
- example-core
- ${revision}
-
- config-utility
- ${project.artifactId}
-
-
-
- org.apache.shardingsphere
- shardingsphere-sharding-core
-
-
- org.apache.shardingsphere
- shardingsphere-encrypt-core
-
-
-
diff --git a/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/StandardModuloShardingDatabaseAlgorithm.java b/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/StandardModuloShardingDatabaseAlgorithm.java
deleted file mode 100644
index 8cf45e1cfe15a..0000000000000
--- a/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/StandardModuloShardingDatabaseAlgorithm.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * 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.shardingsphere.example.algorithm;
-
-import com.google.common.collect.Range;
-import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-public final class StandardModuloShardingDatabaseAlgorithm implements StandardShardingAlgorithm {
-
- @Override
- public String doSharding(final Collection databaseNames, final PreciseShardingValue shardingValue) {
- for (String each : databaseNames) {
- if (each.endsWith(String.valueOf(shardingValue.getValue() % 2))) {
- return each;
- }
- }
- throw new UnsupportedOperationException("");
- }
-
- @Override
- public Collection doSharding(final Collection databaseNames, final RangeShardingValue shardingValueRange) {
- Set result = new LinkedHashSet<>();
- if (Range.closed(1, 5).encloses(shardingValueRange.getValueRange())) {
- for (String each : databaseNames) {
- if (each.endsWith("0")) {
- result.add(each);
- }
- }
- } else if (Range.closed(6, 10).encloses(shardingValueRange.getValueRange())) {
- for (String each : databaseNames) {
- if (each.endsWith("1")) {
- result.add(each);
- }
- }
- } else if (Range.closed(1, 10).encloses(shardingValueRange.getValueRange())) {
- result.addAll(databaseNames);
- } else {
- throw new UnsupportedOperationException("");
- }
- return result;
- }
-
- @Override
- public String getType() {
- return "STANDARD_TEST_DB";
- }
-}
diff --git a/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/StandardModuloShardingTableAlgorithm.java b/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/StandardModuloShardingTableAlgorithm.java
deleted file mode 100644
index ee99a459bd187..0000000000000
--- a/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/algorithm/StandardModuloShardingTableAlgorithm.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.shardingsphere.example.algorithm;
-
-import com.google.common.collect.Range;
-import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
-import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
-
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-public final class StandardModuloShardingTableAlgorithm implements StandardShardingAlgorithm {
-
- @Override
- public String doSharding(final Collection tableNames, final PreciseShardingValue shardingValue) {
- for (String each : tableNames) {
- if (each.endsWith(String.valueOf(shardingValue.getValue() % 2))) {
- return each;
- }
- }
- throw new UnsupportedOperationException("");
- }
-
- @Override
- public Collection doSharding(final Collection tableNames, final RangeShardingValue shardingValue) {
- Set result = new LinkedHashSet<>();
- if (Range.closed(200000000000000000L, 400000000000000000L).encloses(shardingValue.getValueRange())) {
- for (String each : tableNames) {
- if (each.endsWith("0")) {
- result.add(each);
- }
- }
- } else {
- throw new UnsupportedOperationException("");
- }
- return result;
- }
-
- @Override
- public String getType() {
- return "STANDARD_TEST_TBL";
- }
-}
diff --git a/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/fixture/TestQueryAssistedShardingEncryptAlgorithm.java b/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/fixture/TestQueryAssistedShardingEncryptAlgorithm.java
deleted file mode 100644
index 0ddab4cd49fd3..0000000000000
--- a/examples/example-core/config-utility/src/main/java/org/apache/shardingsphere/example/fixture/TestQueryAssistedShardingEncryptAlgorithm.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.shardingsphere.example.fixture;
-
-import org.apache.shardingsphere.encrypt.api.context.EncryptContext;
-import org.apache.shardingsphere.encrypt.api.encrypt.assisted.AssistedEncryptAlgorithm;
-
-public final class TestQueryAssistedShardingEncryptAlgorithm implements AssistedEncryptAlgorithm