AliyunProperties.java org::apache::iceberg::aliyun::AliyunProperties org::apache::iceberg::aliyun /* *LicensedtotheApacheSoftwareFoundation(ASF)underone *ormorecontributorlicenseagreements.SeetheNOTICEfile *distributedwiththisworkforadditionalinformation *regardingcopyrightownership.TheASFlicensesthisfile *toyouundertheApacheLicense,Version2.0(the *"License");youmaynotusethisfileexceptincompliance *withtheLicense.YoumayobtainacopyoftheLicenseat * *http://www.apache.org/licenses/LICENSE-2.0 * *Unlessrequiredbyapplicablelaworagreedtoinwriting, *softwaredistributedundertheLicenseisdistributedonan *"ASIS"BASIS,WITHOUTWARRANTIESORCONDITIONSOFANY *KIND,eitherexpressorimplied.SeetheLicenseforthe *specificlanguagegoverningpermissionsandlimitations *undertheLicense. */ packageorg.apache.iceberg.aliyun; importjava.io.Serializable; importjava.util.Map; importorg.apache.iceberg.relocated.com.google.common.collect.ImmutableMap; importorg.apache.iceberg.util.PropertyUtil; publicclassAliyunPropertiesimplementsSerializable{ publicstaticfinalStringOSS_ENDPOINT="oss.endpoint"; publicstaticfinalStringCLIENT_ACCESS_KEY_ID="client.access-key-id"; publicstaticfinalStringCLIENT_ACCESS_KEY_SECRET="client.access-key-secret"; publicstaticfinalStringCLIENT_SECURITY_TOKEN="client.security-token"; publicstaticfinalStringCLIENT_FACTORY="client.factory-impl"; publicstaticfinalStringOSS_STAGING_DIRECTORY="oss.staging-dir"; privatefinalStringossEndpoint; privatefinalStringaccessKeyId; privatefinalStringaccessKeySecret; privatefinalStringsecurityToken; privatefinalStringossStagingDirectory; publicAliyunProperties(){ this(ImmutableMap.of()); } publicAliyunProperties(Map<String,String>properties){ //OSSendpoint,accessKeyId,accessKeySecret. this.ossEndpoint=properties.get(OSS_ENDPOINT); this.accessKeyId=properties.get(CLIENT_ACCESS_KEY_ID); this.accessKeySecret=properties.get(CLIENT_ACCESS_KEY_SECRET); this.securityToken=properties.get(CLIENT_SECURITY_TOKEN); this.ossStagingDirectory= PropertyUtil.propertyAsString( properties,OSS_STAGING_DIRECTORY,System.getProperty("java.io.tmpdir")); } publicStringossEndpoint(){ returnossEndpoint; } publicStringaccessKeyId(){ returnaccessKeyId; } publicStringaccessKeySecret(){ returnaccessKeySecret; } publicStringsecurityToken(){ returnsecurityToken; } publicStringossStagingDirectory(){ returnossStagingDirectory; } }