Skip to content

Commit 324565f

Browse files
committed
[rest] Remove useless loadTableToken in RESTCatalog
1 parent 9a4111f commit 324565f

2 files changed

Lines changed: 1 addition & 13 deletions

File tree

paimon-core/src/main/java/org/apache/paimon/rest/RESTCatalog.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import org.apache.paimon.rest.responses.GetDatabaseResponse;
4646
import org.apache.paimon.rest.responses.GetFunctionResponse;
4747
import org.apache.paimon.rest.responses.GetTableResponse;
48-
import org.apache.paimon.rest.responses.GetTableTokenResponse;
4948
import org.apache.paimon.rest.responses.GetViewResponse;
5049
import org.apache.paimon.schema.Schema;
5150
import org.apache.paimon.schema.SchemaChange;
@@ -972,17 +971,6 @@ RESTApi api() {
972971
return api;
973972
}
974973

975-
protected GetTableTokenResponse loadTableToken(Identifier identifier)
976-
throws TableNotExistException {
977-
try {
978-
return api.loadTableToken(identifier);
979-
} catch (NoSuchResourceException e) {
980-
throw new TableNotExistException(identifier);
981-
} catch (ForbiddenException e) {
982-
throw new TableNoPermissionException(identifier, e);
983-
}
984-
}
985-
986974
private FileIO fileIOForData(Path path, Identifier identifier) {
987975
return dataTokenEnabled
988976
? new RESTTokenFileIO(context, api, identifier, path)

paimon-core/src/test/java/org/apache/paimon/rest/RESTCatalogTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void testApiWhenTableNoPermission() throws Exception {
308308
() -> restCatalog.fastForward(identifier, "test_branch"));
309309
assertThrows(
310310
Catalog.TableNoPermissionException.class,
311-
() -> restCatalog.loadTableToken(identifier));
311+
() -> restCatalog.api().loadTableToken(identifier));
312312
assertThrows(
313313
Catalog.TableNoPermissionException.class,
314314
() -> restCatalog.loadSnapshot(identifier));

0 commit comments

Comments
 (0)