This is an automated email from the ASF dual-hosted git repository.

zhangliang 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 87468f1f90a Remove useless StorageUnitDefinitionProcessor (#36326)
87468f1f90a is described below

commit 87468f1f90ada6766cf888cc224faf2ff424f834
Author: Liang Zhang <zhangli...@apache.org>
AuthorDate: Sun Aug 17 23:16:42 2025 +0800

    Remove useless StorageUnitDefinitionProcessor (#36326)
---
 .../StorageUnitBroadcastDefinitionProcessor.java   | 38 -----------------
 ...ate.rdl.resource.StorageUnitDefinitionProcessor | 18 ---------
 .../resource/StorageUnitDefinitionProcessor.java   | 47 ----------------------
 .../FixtureStorageUnitDefinitionProcessor.java     | 35 ----------------
 ...ate.rdl.resource.StorageUnitDefinitionProcessor | 18 ---------
 .../StorageUnitSingleDefinitionProcessor.java      | 38 -----------------
 ...ate.rdl.resource.StorageUnitDefinitionProcessor | 18 ---------
 7 files changed, 212 deletions(-)

diff --git 
a/features/broadcast/distsql/handler/src/main/java/org/apache/shardingsphere/broadcast/distsql/handler/update/StorageUnitBroadcastDefinitionProcessor.java
 
b/features/broadcast/distsql/handler/src/main/java/org/apache/shardingsphere/broadcast/distsql/handler/update/StorageUnitBroadcastDefinitionProcessor.java
deleted file mode 100644
index 4322c53fc4b..00000000000
--- 
a/features/broadcast/distsql/handler/src/main/java/org/apache/shardingsphere/broadcast/distsql/handler/update/StorageUnitBroadcastDefinitionProcessor.java
+++ /dev/null
@@ -1,38 +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.broadcast.distsql.handler.update;
-
-import org.apache.shardingsphere.broadcast.rule.BroadcastRule;
-import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor;
-import 
org.apache.shardingsphere.distsql.statement.type.rdl.resource.unit.type.UnregisterStorageUnitStatement;
-
-/**
- * Storage unit definition processor for broadcast rule.
- */
-public final class StorageUnitBroadcastDefinitionProcessor implements 
StorageUnitDefinitionProcessor<BroadcastRule> {
-    
-    @Override
-    public boolean ignoreUsageCheckOnUnregister(final 
UnregisterStorageUnitStatement sqlStatement) {
-        return sqlStatement.isIgnoreBroadcastTables();
-    }
-    
-    @Override
-    public Class<BroadcastRule> getRuleClass() {
-        return BroadcastRule.class;
-    }
-}
diff --git 
a/features/broadcast/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
 
b/features/broadcast/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
deleted file mode 100644
index 6340a7f4bbb..00000000000
--- 
a/features/broadcast/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
+++ /dev/null
@@ -1,18 +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.
-#
-
-org.apache.shardingsphere.broadcast.distsql.handler.update.StorageUnitBroadcastDefinitionProcessor
diff --git 
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/resource/StorageUnitDefinitionProcessor.java
 
b/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/resource/StorageUnitDefinitionProcessor.java
deleted file mode 100644
index c3a25dac88c..00000000000
--- 
a/infra/distsql-handler/src/main/java/org/apache/shardingsphere/distsql/handler/engine/update/rdl/resource/StorageUnitDefinitionProcessor.java
+++ /dev/null
@@ -1,47 +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.update.rdl.resource;
-
-import 
org.apache.shardingsphere.distsql.statement.type.rdl.resource.unit.type.UnregisterStorageUnitStatement;
-import org.apache.shardingsphere.infra.rule.ShardingSphereRule;
-import org.apache.shardingsphere.infra.spi.ShardingSphereSPI;
-import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
-
-/**
- * Storage unit definition processor.
- * 
- * @param <T> type of rule
- */
-@SingletonSPI
-public interface StorageUnitDefinitionProcessor<T extends ShardingSphereRule> 
extends ShardingSphereSPI {
-    
-    /**
-     * Whether to ignore rule usage checking when unregister storage unit.
-     *
-     * @param sqlStatement unregister storage unit statement
-     * @return ignored or not
-     */
-    boolean ignoreUsageCheckOnUnregister(UnregisterStorageUnitStatement 
sqlStatement);
-    
-    /**
-     * Get rule class.
-     *
-     * @return rule class
-     */
-    Class<T> getRuleClass();
-}
diff --git 
a/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/executor/rdl/resource/fixture/FixtureStorageUnitDefinitionProcessor.java
 
b/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/executor/rdl/resource/fixture/FixtureStorageUnitDefinitionProcessor.java
deleted file mode 100644
index 579c57e6826..00000000000
--- 
a/infra/distsql-handler/src/test/java/org/apache/shardingsphere/distsql/handler/executor/rdl/resource/fixture/FixtureStorageUnitDefinitionProcessor.java
+++ /dev/null
@@ -1,35 +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.executor.rdl.resource.fixture;
-
-import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor;
-import 
org.apache.shardingsphere.distsql.handler.fixture.DistSQLHandlerFixtureRule;
-import 
org.apache.shardingsphere.distsql.statement.type.rdl.resource.unit.type.UnregisterStorageUnitStatement;
-
-public final class FixtureStorageUnitDefinitionProcessor implements 
StorageUnitDefinitionProcessor<DistSQLHandlerFixtureRule> {
-    
-    @Override
-    public boolean ignoreUsageCheckOnUnregister(final 
UnregisterStorageUnitStatement sqlStatement) {
-        return sqlStatement.isIgnoreSingleTables();
-    }
-    
-    @Override
-    public Class<DistSQLHandlerFixtureRule> getRuleClass() {
-        return DistSQLHandlerFixtureRule.class;
-    }
-}
diff --git 
a/infra/distsql-handler/src/test/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
 
b/infra/distsql-handler/src/test/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
deleted file mode 100644
index 40e47a021f1..00000000000
--- 
a/infra/distsql-handler/src/test/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
+++ /dev/null
@@ -1,18 +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.
-#
-
-org.apache.shardingsphere.distsql.handler.executor.rdl.resource.fixture.FixtureStorageUnitDefinitionProcessor
diff --git 
a/kernel/single/distsql/handler/src/main/java/org/apache/shardingsphere/single/distsql/handler/update/StorageUnitSingleDefinitionProcessor.java
 
b/kernel/single/distsql/handler/src/main/java/org/apache/shardingsphere/single/distsql/handler/update/StorageUnitSingleDefinitionProcessor.java
deleted file mode 100644
index c40f6e1ceba..00000000000
--- 
a/kernel/single/distsql/handler/src/main/java/org/apache/shardingsphere/single/distsql/handler/update/StorageUnitSingleDefinitionProcessor.java
+++ /dev/null
@@ -1,38 +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.single.distsql.handler.update;
-
-import 
org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor;
-import 
org.apache.shardingsphere.distsql.statement.type.rdl.resource.unit.type.UnregisterStorageUnitStatement;
-import org.apache.shardingsphere.single.rule.SingleRule;
-
-/**
- * Storage unit definition processor for single rule.
- */
-public final class StorageUnitSingleDefinitionProcessor implements 
StorageUnitDefinitionProcessor<SingleRule> {
-    
-    @Override
-    public boolean ignoreUsageCheckOnUnregister(final 
UnregisterStorageUnitStatement sqlStatement) {
-        return sqlStatement.isIgnoreSingleTables();
-    }
-    
-    @Override
-    public Class<SingleRule> getRuleClass() {
-        return SingleRule.class;
-    }
-}
diff --git 
a/kernel/single/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
 
b/kernel/single/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
deleted file mode 100644
index 566835adcba..00000000000
--- 
a/kernel/single/distsql/handler/src/main/resources/META-INF/services/org.apache.shardingsphere.distsql.handler.engine.update.rdl.resource.StorageUnitDefinitionProcessor
+++ /dev/null
@@ -1,18 +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.
-#
-
-org.apache.shardingsphere.single.distsql.handler.update.StorageUnitSingleDefinitionProcessor

Reply via email to