From d56a1f02b1885141afa4d834e6393cee75575ba4 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Sun, 11 Feb 2024 22:45:21 +0800 Subject: [PATCH] Remove useless PluginMetaDataQueryResultRows (#30093) * Use ShowMigrationCheckAlgorithmPluginsResultRowBuilder instead of ShowMigrationCheckAlgorithmsExecutor * Remove useless PluginMetaDataQueryResultRows * Move PluginMetaDataQueryResultRow --- .../plugin/PluginMetaDataQueryResultRows.java | 44 ------------------- .../plugin/PluginMetaDataQueryResultRow.java | 2 +- .../ral/plugin/ShowPluginsExecutor.java | 1 - .../test/assembly/conf/jbossts-properties.xml | 4 +- 4 files changed, 3 insertions(+), 48 deletions(-) delete mode 100644 infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRows.java rename infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/{engine/query => executor}/ral/plugin/PluginMetaDataQueryResultRow.java (97%) diff --git a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRows.java b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRows.java deleted file mode 100644 index de5ac9062aa74..0000000000000 --- a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRows.java +++ /dev/null @@ -1,44 +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.distsql.handler.engine.query.ral.plugin; - -import lombok.RequiredArgsConstructor; -import org.apache.shardingsphere.infra.merge.result.impl.local.LocalDataQueryResultRow; -import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader; -import org.apache.shardingsphere.infra.spi.type.typed.TypedSPI; - -import java.util.Collection; -import java.util.stream.Collectors; - -/** - * Plugin meta data query result rows. - */ -@RequiredArgsConstructor -public final class PluginMetaDataQueryResultRows { - - private final Class pluginClass; - - /** - * Get rows. - * - * @return rows - */ - public Collection getRows() { - return ShardingSphereServiceLoader.getServiceInstances(pluginClass).stream().map(each -> new PluginMetaDataQueryResultRow(each).toLocalDataQueryResultRow()).collect(Collectors.toList()); - } -} diff --git a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRow.java b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/PluginMetaDataQueryResultRow.java similarity index 97% rename from infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRow.java rename to infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/PluginMetaDataQueryResultRow.java index c99625530a210..bb7953fe60e14 100644 --- a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/query/ral/plugin/PluginMetaDataQueryResultRow.java +++ b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/PluginMetaDataQueryResultRow.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.distsql.handler.engine.query.ral.plugin; +package org.apache.shardingsphere.distsql.handler.executor.ral.plugin; import org.apache.shardingsphere.infra.database.core.spi.DatabaseSupportedTypedSPI; import org.apache.shardingsphere.infra.database.core.type.DatabaseType; diff --git a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/ShowPluginsExecutor.java b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/ShowPluginsExecutor.java index 72cde233e2b7a..29fbabe30393e 100644 --- a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/ShowPluginsExecutor.java +++ b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/executor/ral/plugin/ShowPluginsExecutor.java @@ -18,7 +18,6 @@ package org.apache.shardingsphere.distsql.handler.executor.ral.plugin; import org.apache.shardingsphere.distsql.handler.engine.query.DistSQLQueryExecutor; -import org.apache.shardingsphere.distsql.handler.engine.query.ral.plugin.PluginMetaDataQueryResultRow; import org.apache.shardingsphere.distsql.handler.exception.plugin.PluginNotFoundException; import org.apache.shardingsphere.distsql.statement.ral.queryable.show.ShowPluginsStatement; import org.apache.shardingsphere.infra.database.core.spi.DatabaseSupportedTypedSPI; diff --git a/test/e2e/fixture/src/test/assembly/conf/jbossts-properties.xml b/test/e2e/fixture/src/test/assembly/conf/jbossts-properties.xml index 35808a78e9fe9..5d935bf8783fe 100644 --- a/test/e2e/fixture/src/test/assembly/conf/jbossts-properties.xml +++ b/test/e2e/fixture/src/test/assembly/conf/jbossts-properties.xml @@ -34,9 +34,9 @@ com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner 4712 - + 0 - + NO 1