Skip to content

Commit

Permalink
Revert "[fix](multi-catalog)fix paimon meta properties convert"
Browse files Browse the repository at this point in the history
This reverts commit 1e2377d.
  • Loading branch information
wsjz committed Jul 15, 2024
1 parent b08bee5 commit 58db9b6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
import org.apache.doris.common.DdlException;
import org.apache.doris.common.security.authentication.AuthenticationConfig;
import org.apache.doris.common.security.authentication.HadoopUGI;
import org.apache.doris.datasource.CatalogProperty;
import org.apache.doris.datasource.ExternalCatalog;
import org.apache.doris.datasource.InitCatalogLog;
import org.apache.doris.datasource.SessionContext;
import org.apache.doris.datasource.property.PropertyConverter;
import org.apache.doris.datasource.property.constants.HMSProperties;
import org.apache.doris.datasource.property.constants.PaimonProperties;
import org.apache.doris.fs.remote.dfs.DFSFileSystem;
Expand Down Expand Up @@ -57,11 +55,8 @@ public abstract class PaimonExternalCatalog extends ExternalCatalog {
PaimonProperties.WAREHOUSE
);

public PaimonExternalCatalog(long catalogId, String name, String resource,
Map<String, String> props, String comment) {
public PaimonExternalCatalog(long catalogId, String name, String comment) {
super(catalogId, name, InitCatalogLog.Type.PAIMON, comment);
props = PropertyConverter.convertToMetaProperties(props);
catalogProperty = new CatalogProperty(resource, props);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.doris.datasource.paimon;

import org.apache.doris.datasource.CatalogProperty;
import org.apache.doris.datasource.property.PropertyConverter;
import org.apache.doris.datasource.property.constants.CosProperties;
import org.apache.doris.datasource.property.constants.ObsProperties;
Expand All @@ -33,7 +34,8 @@ public class PaimonFileExternalCatalog extends PaimonExternalCatalog {

public PaimonFileExternalCatalog(long catalogId, String name, String resource,
Map<String, String> props, String comment) {
super(catalogId, name, resource, props, comment);
super(catalogId, name, comment);
catalogProperty = new CatalogProperty(resource, props);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.doris.datasource.paimon;

import org.apache.doris.common.DdlException;
import org.apache.doris.datasource.CatalogProperty;
import org.apache.doris.datasource.property.constants.HMSProperties;
import org.apache.doris.datasource.property.constants.PaimonProperties;

Expand All @@ -36,7 +37,8 @@ public class PaimonHMSExternalCatalog extends PaimonExternalCatalog {

public PaimonHMSExternalCatalog(long catalogId, String name, String resource,
Map<String, String> props, String comment) {
super(catalogId, name, resource, props, comment);
super(catalogId, name, comment);
catalogProperty = new CatalogProperty(resource, props);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ public static Map<String, String> convertToMetaProperties(Map<String, String> pr
metaProperties = convertToDLFProperties(props, DLFProperties.getCredential(props));
} else if (props.containsKey(S3Properties.Env.ENDPOINT)) {
if (!hasS3Properties(props)) {
String type = props.get(CatalogMgr.CATALOG_TYPE_PROP);
// paimon do not need old s3 properties
if (type != null && type.equalsIgnoreCase(Type.PAIMON.toString())) {
return props;
}
// checkout env in the end
// if meet AWS_XXX properties, convert to s3 properties
return convertToS3EnvProperties(props, S3Properties.getEnvironmentCredentialWithEndpoint(props), true);
Expand Down

0 comments on commit 58db9b6

Please sign in to comment.