From f3a24bde9126da7603b634bf8080c471efaf5eff Mon Sep 17 00:00:00 2001 From: "zhangyongxiang.alpha" Date: Tue, 14 Jan 2025 21:59:33 +0800 Subject: [PATCH] rm useless code --- .../amoro/server/table/TableManagerOld.java | 39 ------ .../amoro/server/table/TableServiceOld.java | 117 ------------------ 2 files changed, 156 deletions(-) delete mode 100644 amoro-ams/src/main/java/org/apache/amoro/server/table/TableManagerOld.java delete mode 100644 amoro-ams/src/main/java/org/apache/amoro/server/table/TableServiceOld.java diff --git a/amoro-ams/src/main/java/org/apache/amoro/server/table/TableManagerOld.java b/amoro-ams/src/main/java/org/apache/amoro/server/table/TableManagerOld.java deleted file mode 100644 index e40c711b85..0000000000 --- a/amoro-ams/src/main/java/org/apache/amoro/server/table/TableManagerOld.java +++ /dev/null @@ -1,39 +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.amoro.server.table; - -import org.apache.amoro.AmoroTable; -import org.apache.amoro.ServerTableIdentifier; - -public interface TableManagerOld extends TableRuntimeHandler { - - /** - * load a managed table. - * - * @param tableIdentifier managed table identifier - * @return managed table. - */ - AmoroTable loadTable(ServerTableIdentifier tableIdentifier); - - TableRuntime getRuntime(Long tableId); - - default boolean contains(Long tableId) { - return getRuntime(tableId) != null; - } -} diff --git a/amoro-ams/src/main/java/org/apache/amoro/server/table/TableServiceOld.java b/amoro-ams/src/main/java/org/apache/amoro/server/table/TableServiceOld.java deleted file mode 100644 index 9399d7c58e..0000000000 --- a/amoro-ams/src/main/java/org/apache/amoro/server/table/TableServiceOld.java +++ /dev/null @@ -1,117 +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.amoro.server.table; - -import org.apache.amoro.ServerTableIdentifier; -import org.apache.amoro.api.BlockableOperation; -import org.apache.amoro.api.Blocker; -import org.apache.amoro.api.TableIdentifier; -import org.apache.amoro.server.persistence.TableRuntimeMeta; -import org.apache.commons.lang3.tuple.Pair; - -import javax.annotation.Nullable; - -import java.util.List; -import java.util.Map; - -public interface TableServiceOld extends TableManagerOld { - - void initialize(); - - /** - * create table metadata - * - * @param catalogName internal catalog to create the table - * @param tableMeta table metadata info - */ - void createTable(String catalogName, TableMetadata tableMeta); - - /** - * delete the table metadata - * - * @param tableIdentifier table id - * @param deleteData if delete the external table - */ - void dropTableMetadata(TableIdentifier tableIdentifier, boolean deleteData); - - /** - * Load all managed tables. Managed tables means the tables which are managed by AMS, AMS will - * watch their change and make them health. - * - * @return {@link ServerTableIdentifier} list - */ - List listManagedTables(); - - /** - * Get the ServerTableIdentifier instance of the specified table identifier - * - * @return the {@link ServerTableIdentifier} instance - */ - ServerTableIdentifier getServerTableIdentifier(TableIdentifier id); - - /** - * blocker operations - * - * @return the created blocker - */ - Blocker block( - TableIdentifier tableIdentifier, - List operations, - Map properties); - - /** release the blocker */ - void releaseBlocker(TableIdentifier tableIdentifier, String blockerId); - - /** - * renew the blocker - * - * @return expiration time - */ - long renewBlocker(TableIdentifier tableIdentifier, String blockerId); - - /** - * get blockers of table - * - * @return block list - */ - List getBlockers(TableIdentifier tableIdentifier); - - /** - * Get the table info from database for given parameters. - * - * @param optimizerGroup The optimizer group of the table associated to. will be if we want the - * info for all groups. - * @param fuzzyDbName the fuzzy db name used to filter the result, will be null if no filter set. - * @param fuzzyTableName the fuzzy table name used to filter the result, will be null if no filter - * set. - * @param statusCodeFilters the status code used to filter the result, wil be null if no filter - * set. - * @param limit How many entries we want to retrieve. - * @param offset The entries we'll skip when retrieving the entries. - * @return A pair with the first entry is the actual list under the filters with the offset and - * limit, and second value will be the number of total entries under the filters. - */ - Pair, Integer> getTableRuntimes( - String optimizerGroup, - @Nullable String fuzzyDbName, - @Nullable String fuzzyTableName, - @Nullable List statusCodeFilters, - int limit, - int offset); -}