Skip to content

Commit 9ec8abb

Browse files
authored
[fix](paimon) add rest external catalog for gson comaptiblity (apache#60916)
Some user from old version will create and persist PaimonRestExternalCatalog instance.
1 parent 9d2f65e commit 9ec8abb

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
package org.apache.doris.datasource.paimon;
19+
20+
import java.util.Map;
21+
22+
@Deprecated
23+
public class PaimonRestExternalCatalog extends PaimonExternalCatalog {
24+
25+
public PaimonRestExternalCatalog(long catalogId, String name, String resource,
26+
Map<String, String> props, String comment) {
27+
super(catalogId, name, resource, props, comment);
28+
}
29+
}

fe/fe-core/src/main/java/org/apache/doris/persist/gson/GsonUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@
169169
import org.apache.doris.datasource.paimon.PaimonExternalTable;
170170
import org.apache.doris.datasource.paimon.PaimonFileExternalCatalog;
171171
import org.apache.doris.datasource.paimon.PaimonHMSExternalCatalog;
172+
import org.apache.doris.datasource.paimon.PaimonRestExternalCatalog;
172173
import org.apache.doris.datasource.test.TestExternalCatalog;
173174
import org.apache.doris.datasource.test.TestExternalDatabase;
174175
import org.apache.doris.datasource.test.TestExternalTable;
@@ -420,6 +421,7 @@ public class GsonUtils {
420421
.registerSubtype(PaimonExternalCatalog.class, PaimonExternalCatalog.class.getSimpleName())
421422
.registerSubtype(PaimonHMSExternalCatalog.class, PaimonHMSExternalCatalog.class.getSimpleName())
422423
.registerSubtype(PaimonFileExternalCatalog.class, PaimonFileExternalCatalog.class.getSimpleName())
424+
.registerSubtype(PaimonRestExternalCatalog.class, PaimonRestExternalCatalog.class.getSimpleName())
423425
.registerSubtype(MaxComputeExternalCatalog.class, MaxComputeExternalCatalog.class.getSimpleName())
424426
.registerSubtype(
425427
TrinoConnectorExternalCatalog.class, TrinoConnectorExternalCatalog.class.getSimpleName())

0 commit comments

Comments
 (0)