Package org.apache.iceberg.rest
Class CatalogHandlers
java.lang.Object
org.apache.iceberg.rest.CatalogHandlers
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcancelPlanTableScan(String planId) Cancels a plan table scan by removing all associated state.static CreateNamespaceResponsecreateNamespace(SupportsNamespaces catalog, CreateNamespaceRequest request) static LoadTableResponsecreateTable(Catalog catalog, Namespace namespace, CreateTableRequest request) static LoadViewResponsecreateView(ViewCatalog catalog, Namespace namespace, CreateViewRequest request) static voiddropNamespace(SupportsNamespaces catalog, Namespace namespace) static voiddropTable(Catalog catalog, TableIdentifier ident) static voiddropView(ViewCatalog catalog, TableIdentifier viewIdentifier) static FetchPlanningResultResponsefetchPlanningResult(Catalog catalog, TableIdentifier ident, String planId) Fetches the planning result for an async plan.static FetchScanTasksResponsefetchScanTasks(Catalog catalog, TableIdentifier ident, FetchScanTasksRequest request) Fetches scan tasks for a specific plan task.static ListNamespacesResponselistNamespaces(SupportsNamespaces catalog, Namespace parent) static ListNamespacesResponselistNamespaces(SupportsNamespaces catalog, Namespace parent, String pageToken, String pageSize) static ListTablesResponselistTables(Catalog catalog, Namespace namespace) static ListTablesResponselistTables(Catalog catalog, Namespace namespace, String pageToken, String pageSize) static ListTablesResponselistViews(ViewCatalog catalog, Namespace namespace) static ListTablesResponselistViews(ViewCatalog catalog, Namespace namespace, String pageToken, String pageSize) static GetNamespaceResponseloadNamespace(SupportsNamespaces catalog, Namespace namespace) static LoadTableResponseloadTable(Catalog catalog, TableIdentifier ident) Deprecated.since 1.11.0, will be removed in 1.12.0.static LoadTableResponseloadTable(Catalog catalog, TableIdentifier ident, RESTCatalogProperties.SnapshotMode mode) static LoadViewResponseloadView(ViewCatalog catalog, TableIdentifier viewIdentifier) static voidnamespaceExists(SupportsNamespaces catalog, Namespace namespace) static PlanTableScanResponseplanTableScan(Catalog catalog, TableIdentifier ident, PlanTableScanRequest request, Predicate<Scan<?, FileScanTask, ?>> shouldPlanAsync, ToIntFunction<Scan<?, FileScanTask, ?>> tasksPerPlanTask) static voidpurgeTable(Catalog catalog, TableIdentifier ident) static LoadTableResponseregisterTable(Catalog catalog, Namespace namespace, RegisterTableRequest request) static LoadViewResponseregisterView(ViewCatalog catalog, Namespace namespace, RegisterViewRequest request) static voidrenameTable(Catalog catalog, RenameTableRequest request) static voidrenameView(ViewCatalog catalog, RenameTableRequest request) static LoadTableResponsestageTableCreate(Catalog catalog, Namespace namespace, CreateTableRequest request) static voidtableExists(Catalog catalog, TableIdentifier ident) updateNamespaceProperties(SupportsNamespaces catalog, Namespace namespace, UpdateNamespacePropertiesRequest request) static LoadTableResponseupdateTable(Catalog catalog, TableIdentifier ident, UpdateTableRequest request) static LoadViewResponseupdateView(ViewCatalog catalog, TableIdentifier ident, UpdateTableRequest request) static voidviewExists(ViewCatalog catalog, TableIdentifier viewIdentifier)
-
Method Details
-
listNamespaces
-
listNamespaces
public static ListNamespacesResponse listNamespaces(SupportsNamespaces catalog, Namespace parent, String pageToken, String pageSize) -
createNamespace
public static CreateNamespaceResponse createNamespace(SupportsNamespaces catalog, CreateNamespaceRequest request) -
namespaceExists
-
loadNamespace
-
dropNamespace
-
updateNamespaceProperties
public static UpdateNamespacePropertiesResponse updateNamespaceProperties(SupportsNamespaces catalog, Namespace namespace, UpdateNamespacePropertiesRequest request) -
listTables
-
listTables
public static ListTablesResponse listTables(Catalog catalog, Namespace namespace, String pageToken, String pageSize) -
stageTableCreate
public static LoadTableResponse stageTableCreate(Catalog catalog, Namespace namespace, CreateTableRequest request) -
createTable
public static LoadTableResponse createTable(Catalog catalog, Namespace namespace, CreateTableRequest request) -
registerTable
public static LoadTableResponse registerTable(Catalog catalog, Namespace namespace, RegisterTableRequest request) -
dropTable
-
purgeTable
-
tableExists
-
loadTable
Deprecated.since 1.11.0, will be removed in 1.12.0. UseloadTable(Catalog, TableIdentifier, SnapshotMode)instead. -
loadTable
public static LoadTableResponse loadTable(Catalog catalog, TableIdentifier ident, RESTCatalogProperties.SnapshotMode mode) -
updateTable
public static LoadTableResponse updateTable(Catalog catalog, TableIdentifier ident, UpdateTableRequest request) -
renameTable
-
listViews
-
listViews
public static ListTablesResponse listViews(ViewCatalog catalog, Namespace namespace, String pageToken, String pageSize) -
createView
public static LoadViewResponse createView(ViewCatalog catalog, Namespace namespace, CreateViewRequest request) -
viewExists
-
loadView
-
updateView
public static LoadViewResponse updateView(ViewCatalog catalog, TableIdentifier ident, UpdateTableRequest request) -
renameView
-
dropView
-
registerView
public static LoadViewResponse registerView(ViewCatalog catalog, Namespace namespace, RegisterViewRequest request) -
planTableScan
public static PlanTableScanResponse planTableScan(Catalog catalog, TableIdentifier ident, PlanTableScanRequest request, Predicate<Scan<?, FileScanTask, ?>> shouldPlanAsync, ToIntFunction<Scan<?, FileScanTask, ?>> tasksPerPlanTask) -
fetchPlanningResult
public static FetchPlanningResultResponse fetchPlanningResult(Catalog catalog, TableIdentifier ident, String planId) Fetches the planning result for an async plan.- Parameters:
catalog- the catalog to use for loading the tableident- the table identifierplanId- the plan identifier- Returns:
- the fetch planning result response
-
fetchScanTasks
public static FetchScanTasksResponse fetchScanTasks(Catalog catalog, TableIdentifier ident, FetchScanTasksRequest request) Fetches scan tasks for a specific plan task.- Parameters:
catalog- the catalog to use for loading the tableident- the table identifierrequest- the fetch scan tasks request- Returns:
- the fetch scan tasks response
-
cancelPlanTableScan
Cancels a plan table scan by removing all associated state.- Parameters:
planId- the plan identifier to cancel
-