Skip to content

Commit

Permalink
[opt](iceberg) no need to check the name format of iceberg's database a…
Browse files Browse the repository at this point in the history
…pache#32977 (apache#32979)

bp apache#32977

Also fix some gson serde issue like:
```
XXX declares multiple JSON fields named runnable.
```
  • Loading branch information
morningman authored and weixingyu12 committed Apr 8, 2024
1 parent d46c504 commit f856d06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public class InternalCatalog implements CatalogIf<Database> {
@Getter
private transient EsRepository esRepository = new EsRepository();
@Getter
private IcebergTableCreationRecordMgr icebergTableCreationRecordMgr = new IcebergTableCreationRecordMgr();
private transient IcebergTableCreationRecordMgr icebergTableCreationRecordMgr = new IcebergTableCreationRecordMgr();

public InternalCatalog() {
// create internal databases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
package org.apache.doris.datasource.iceberg;

import org.apache.doris.catalog.Env;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.FeNameFormat;
import org.apache.doris.common.util.Util;
import org.apache.doris.datasource.ExternalCatalog;
import org.apache.doris.datasource.InitCatalogLog;
import org.apache.doris.datasource.SessionContext;
Expand Down Expand Up @@ -75,16 +72,7 @@ public String getIcebergCatalogType() {

protected List<String> listDatabaseNames() {
return nsCatalog.listNamespaces().stream()
.map(e -> {
String dbName = e.toString();
try {
FeNameFormat.checkDbName(dbName);
} catch (AnalysisException ex) {
Util.logAndThrowRuntimeException(LOG,
String.format("Not a supported namespace name format: %s", dbName), ex);
}
return dbName;
})
.map(e -> e.toString())
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public class EsRepository extends MasterDaemon {

private static final Logger LOG = LogManager.getLogger(EsRepository.class);

private Map<Long, EsTable> esTables;
private transient Map<Long, EsTable> esTables;

private Map<Long, EsRestClient> esClients;
private transient Map<Long, EsRestClient> esClients;

public EsRepository() {
super("es repository", Config.es_state_sync_interval_second * 1000);
Expand Down

0 comments on commit f856d06

Please sign in to comment.