You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ki...@apache.org on 2020/09/08 06:09:38 UTC
[shardingsphere] branch master updated: Rename
${DB}ProtocolFrontendEngine to ${DB}FrontendEngine (#7314)
This is an automated email from the ASF dual-hosted git repository.
kimmking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 7d0fa79 Rename ${DB}ProtocolFrontendEngine to ${DB}FrontendEngine (#7314)
7d0fa79 is described below
commit 7d0fa79f5b410280a56d17fed084157153dd0fca
Author: Liang Zhang <te...@163.com>
AuthorDate: Tue Sep 8 14:09:28 2020 +0800
Rename ${DB}ProtocolFrontendEngine to ${DB}FrontendEngine (#7314)
---
docs/document/content/dev-manual/proxy.cn.md | 8 ++++----
docs/document/content/dev-manual/proxy.en.md | 8 ++++----
...tocolFrontendEngine.java => MySQLFrontendEngine.java} | 4 ++--
...ere.proxy.frontend.spi.DatabaseProtocolFrontendEngine | 2 +-
...ntendEngineTest.java => MySQLFrontendEngineTest.java} | 16 ++++++++--------
...FrontendEngine.java => PostgreSQLFrontendEngine.java} | 4 ++--
...ere.proxy.frontend.spi.DatabaseProtocolFrontendEngine | 2 +-
7 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/docs/document/content/dev-manual/proxy.cn.md b/docs/document/content/dev-manual/proxy.cn.md
index 39eb468..2f0184c 100644
--- a/docs/document/content/dev-manual/proxy.cn.md
+++ b/docs/document/content/dev-manual/proxy.cn.md
@@ -11,10 +11,10 @@ chapter = true
| ------------------------------- | ---------------------------------------------- |
| DatabaseProtocolFrontendEngine | 用于ShardingSphere-Proxy解析与适配访问数据库的协议 |
-| *已知实现类* | *详细说明* |
-| -------------------------------- | ---------------------------------------------- |
-| MySQLProtocolFrontendEngine | 基于 MySQL 的数据库协议实现 |
-| PostgreSQLProtocolFrontendEngine | 基于 PostgreSQL 的SQL 解析器实现 |
+| *已知实现类* | *详细说明* |
+| ------------------------ | ---------------------------------------------- |
+| MySQLFrontendEngine | 基于 MySQL 的数据库协议实现 |
+| PostgreSQLFrontendEngine | 基于 PostgreSQL 的SQL 解析器实现 |
## JDBCDriverURLRecognizer
diff --git a/docs/document/content/dev-manual/proxy.en.md b/docs/document/content/dev-manual/proxy.en.md
index 31e5fa9..c5a2d98 100644
--- a/docs/document/content/dev-manual/proxy.en.md
+++ b/docs/document/content/dev-manual/proxy.en.md
@@ -11,10 +11,10 @@ chapter = true
| -------------------------------- | ------------------------------------------------------------------------------- |
| DatabaseProtocolFrontendEngine | Regulate parse and adapter protocol of database access for ShardingSphere-Proxy |
-| *Implementation Class* | *Description* |
-| -------------------------------- | ------------------------------------------------------------------------------- |
-| MySQLProtocolFrontendEngine | Base on MySQL database protocol |
-| PostgreSQLProtocolFrontendEngine | Base on postgreSQL database protocol |
+| *Implementation Class* | *Description* |
+| ------------------------ | ------------------------------------------------------------------------------- |
+| MySQLFrontendEngine | Base on MySQL database protocol |
+| PostgreSQLFrontendEngine | Base on postgreSQL database protocol |
## JDBCDriverURLRecognizer
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLProtocolFrontendEngine.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java
similarity index 94%
rename from shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLProtocolFrontendEngine.java
rename to shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java
index 293699e..8b2d186 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLProtocolFrontendEngine.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngine.java
@@ -27,10 +27,10 @@ import org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecut
import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
/**
- * Frontend engine for MySQL protocol.
+ * Frontend engine for MySQL.
*/
@Getter
-public final class MySQLProtocolFrontendEngine implements DatabaseProtocolFrontendEngine {
+public final class MySQLFrontendEngine implements DatabaseProtocolFrontendEngine {
private final FrontendContext frontendContext = new FrontendContext(false, true);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine
index c413db1..bf5a12e 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.proxy.frontend.mysql.MySQLProtocolFrontendEngine
+org.apache.shardingsphere.proxy.frontend.mysql.MySQLFrontendEngine
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLProtocolFrontendEngineTest.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java
similarity index 91%
rename from shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLProtocolFrontendEngineTest.java
rename to shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java
index 7781d7d..465b461 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLProtocolFrontendEngineTest.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-mysql/src/test/java/org/apache/shardingsphere/proxy/frontend/mysql/MySQLFrontendEngineTest.java
@@ -65,11 +65,11 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@RunWith(MockitoJUnitRunner.class)
-public final class MySQLProtocolFrontendEngineTest {
+public final class MySQLFrontendEngineTest {
private static final String SCHEMA = "schema_%s";
- private MySQLProtocolFrontendEngine mysqlProtocolFrontendEngine;
+ private MySQLFrontendEngine mysqlFrontendEngine;
@Mock
private ChannelHandlerContext context;
@@ -90,12 +90,12 @@ public final class MySQLProtocolFrontendEngineTest {
Field field = ConnectionIdGenerator.class.getDeclaredField("currentId");
field.setAccessible(true);
field.set(ConnectionIdGenerator.getInstance(), 0);
- mysqlProtocolFrontendEngine = new MySQLProtocolFrontendEngine();
+ mysqlFrontendEngine = new MySQLFrontendEngine();
}
@Test
public void assertHandshake() {
- assertTrue(mysqlProtocolFrontendEngine.getAuthEngine().handshake(context) > 0);
+ assertTrue(mysqlFrontendEngine.getAuthEngine().handshake(context) > 0);
verify(context).writeAndFlush(isA(MySQLHandshakePacket.class));
}
@@ -105,7 +105,7 @@ public final class MySQLProtocolFrontendEngineTest {
ProxyUser proxyUser = new ProxyUser("", Collections.singleton("db1"));
setAuthentication(proxyUser);
when(payload.readStringNul()).thenReturn("root");
- AuthenticationResult actual = mysqlProtocolFrontendEngine.getAuthEngine().auth(context, payload);
+ AuthenticationResult actual = mysqlFrontendEngine.getAuthEngine().auth(context, payload);
assertThat(actual.getUsername(), is("root"));
assertNull(actual.getDatabase());
assertTrue(actual.isFinished());
@@ -121,7 +121,7 @@ public final class MySQLProtocolFrontendEngineTest {
when(payload.readStringNulByBytes()).thenReturn("root".getBytes());
when(channel.remoteAddress()).thenReturn(new InetSocketAddress("localhost", 3307));
when(context.channel()).thenReturn(channel);
- AuthenticationResult actual = mysqlProtocolFrontendEngine.getAuthEngine().auth(context, payload);
+ AuthenticationResult actual = mysqlFrontendEngine.getAuthEngine().auth(context, payload);
assertThat(actual.getUsername(), is("root"));
assertNull(actual.getDatabase());
assertTrue(actual.isFinished());
@@ -137,7 +137,7 @@ public final class MySQLProtocolFrontendEngineTest {
when(payload.readStringNulByBytes()).thenReturn("root".getBytes());
when(context.channel()).thenReturn(channel);
when(channel.remoteAddress()).thenReturn(new InetSocketAddress(InetAddress.getByAddress(new byte[] {(byte) 192, (byte) 168, (byte) 0, (byte) 102}), 3307));
- AuthenticationResult actual = mysqlProtocolFrontendEngine.getAuthEngine().auth(context, payload);
+ AuthenticationResult actual = mysqlFrontendEngine.getAuthEngine().auth(context, payload);
assertThat(actual.getUsername(), is("root"));
assertNull(actual.getDatabase());
assertTrue(actual.isFinished());
@@ -154,7 +154,7 @@ public final class MySQLProtocolFrontendEngineTest {
private void setConnectionPhase(final MySQLConnectionPhase connectionPhase) {
Field field = MySQLAuthenticationEngine.class.getDeclaredField("connectionPhase");
field.setAccessible(true);
- field.set(mysqlProtocolFrontendEngine.getAuthEngine(), connectionPhase);
+ field.set(mysqlFrontendEngine.getAuthEngine(), connectionPhase);
}
@SneakyThrows(ReflectiveOperationException.class)
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLProtocolFrontendEngine.java b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java
similarity index 94%
rename from shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLProtocolFrontendEngine.java
rename to shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java
index dbeedcf..4a41fcf 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLProtocolFrontendEngine.java
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/java/org/apache/shardingsphere/proxy/frontend/postgresql/PostgreSQLFrontendEngine.java
@@ -28,10 +28,10 @@ import org.apache.shardingsphere.proxy.frontend.postgresql.command.PostgreSQLCom
import org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine;
/**
- * Frontend engine for PostgreSQL protocol.
+ * Frontend engine for PostgreSQL.
*/
@Getter
-public final class PostgreSQLProtocolFrontendEngine implements DatabaseProtocolFrontendEngine {
+public final class PostgreSQLFrontendEngine implements DatabaseProtocolFrontendEngine {
private final FrontendContext frontendContext = new FrontendContext(true, false);
diff --git a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine
index 70cf913..05657ad 100644
--- a/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine
+++ b/shardingsphere-proxy/shardingsphere-proxy-frontend/shardingsphere-proxy-frontend-postgresql/src/main/resources/META-INF/services/org.apache.shardingsphere.proxy.frontend.spi.DatabaseProtocolFrontendEngine
@@ -15,4 +15,4 @@
# limitations under the License.
#
-org.apache.shardingsphere.proxy.frontend.postgresql.PostgreSQLProtocolFrontendEngine
+org.apache.shardingsphere.proxy.frontend.postgresql.PostgreSQLFrontendEngine