Skip to content

Commit

Permalink
Config blank check
Browse files Browse the repository at this point in the history
  • Loading branch information
orenccl committed Dec 17, 2024
1 parent b9972ee commit f1449de
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.util.Map;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang3.StringUtils;
import org.apache.gravitino.Config;
import org.apache.gravitino.config.ConfigBuilder;
import org.apache.gravitino.config.ConfigConstants;
Expand All @@ -35,34 +36,39 @@ public class ADLSCredentialConfig extends Config {
.doc("The name of the Azure Data Lake Storage account.")
.version(ConfigConstants.VERSION_0_7_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();

public static final ConfigEntry<String> AZURE_STORAGE_ACCOUNT_KEY =
new ConfigBuilder(AzureProperties.GRAVITINO_AZURE_STORAGE_ACCOUNT_KEY)
.doc("The key of the Azure Data Lake Storage account.")
.version(ConfigConstants.VERSION_0_7_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();

public static final ConfigEntry<String> AZURE_TENANT_ID =
new ConfigBuilder(AzureProperties.GRAVITINO_AZURE_TENANT_ID)
.doc("The Azure Active Directory (AAD) tenant ID used for authentication.")
.version(ConfigConstants.VERSION_0_7_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();

public static final ConfigEntry<String> AZURE_CLIENT_ID =
new ConfigBuilder(AzureProperties.GRAVITINO_AZURE_CLIENT_ID)
.doc("The client ID used for authenticating with Azure Active Directory (AAD).")
.version(ConfigConstants.VERSION_0_7_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();

public static final ConfigEntry<String> AZURE_CLIENT_SECRET =
new ConfigBuilder(AzureProperties.GRAVITINO_AZURE_CLIENT_SECRET)
.doc("The client secret used for authenticating with Azure Active Directory (AAD).")
.version(ConfigConstants.VERSION_0_7_0)
.stringConf()
.checkValue(StringUtils::isNotBlank, ConfigConstants.NOT_BLANK_ERROR_MSG)
.create();

public static final ConfigEntry<Integer> ADLS_TOKEN_EXPIRE_IN_SECS =
Expand Down

0 comments on commit f1449de

Please sign in to comment.