Skip to content

Commit

Permalink
Code Review Update 2nd:
Browse files Browse the repository at this point in the history
- Removed redundant dependency: `bcprov-jdk15on-1.69.jar`
- Relocated Tencent COS Constants
  • Loading branch information
Mighten committed Sep 20, 2024
1 parent b1238bc commit 01be125
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ public final class Constants {
public static final String HUAWEI_CLOUD_OBS_BUCKET_NAME = "resource.huawei.cloud.obs.bucket.name";
public static final String HUAWEI_CLOUD_OBS_END_POINT = "resource.huawei.cloud.obs.endpoint";

public static final String TENCENT_CLOUD_COS_BUCKET_NAME = "resource.tencent.cloud.cos.bucket.name";
public static final String TENCENT_CLOUD_COS_REGION = "resource.tencent.cloud.cos.region";

/**
* fetch applicationId way
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.dolphinscheduler.plugin.storage.cos;

public class CosStorageConstants {

public static final String TENCENT_CLOUD_COS_BUCKET_NAME = "resource.tencent.cloud.cos.bucket.name";
public static final String TENCENT_CLOUD_COS_REGION = "resource.tencent.cloud.cos.region";
public static final String TENCENT_CLOUD_ACCESS_KEY_ID = "resource.tencent.cloud.access.key.id";
public static final String TENCENT_CLOUD_ACCESS_KEY_SECRET = "resource.tencent.cloud.access.key.secret";
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.dolphinscheduler.plugin.storage.api.StorageOperator;
import org.apache.dolphinscheduler.plugin.storage.api.StorageOperatorFactory;
import org.apache.dolphinscheduler.plugin.storage.api.StorageType;
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants;

import java.util.Map;

Expand All @@ -47,10 +46,10 @@ private CosStorageProperties getCosStorageProperties() {
Map<String, String> cosPropertiesMap = PropertyUtils.getByPrefix("resource.tencent.cloud");

return CosStorageProperties.builder()
.region(cosPropertiesMap.get(Constants.TENCENT_CLOUD_COS_REGION))
.accessKeyId(cosPropertiesMap.get(TaskConstants.TENCENT_CLOUD_ACCESS_KEY_ID))
.accessKeySecret(cosPropertiesMap.get(TaskConstants.TENCENT_CLOUD_ACCESS_KEY_SECRET))
.bucketName(cosPropertiesMap.get(Constants.TENCENT_CLOUD_COS_BUCKET_NAME))
.region(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_COS_REGION))
.accessKeyId(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_ACCESS_KEY_ID))
.accessKeySecret(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_ACCESS_KEY_SECRET))
.bucketName(cosPropertiesMap.get(CosStorageConstants.TENCENT_CLOUD_COS_BUCKET_NAME))
.resourceUploadPath(cosPropertiesMap.getOrDefault(Constants.RESOURCE_UPLOAD_PATH, "/dolphinscheduler"))
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ private TaskConstants() {
/**
* tencent cloud config
*/
public static final String TENCENT_CLOUD_ACCESS_KEY_ID = "resource.tencent.cloud.access.key.id";
public static final String TENCENT_CLOUD_ACCESS_KEY_SECRET = "resource.tencent.cloud.access.key.secret";

/**
* use for k8s task
Expand Down
1 change: 0 additions & 1 deletion tools/dependencies/known-dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ aws-java-sdk-dms-1.12.300.jar
aws-json-protocol-2.17.282.jar
bcpkix-jdk15on-1.69.jar
bcprov-ext-jdk15on-1.69.jar
bcprov-jdk15on-1.69.jar
bcutil-jdk15on-1.69.jar
bonecp-0.8.0.RELEASE.jar
bucket4j-core-6.2.0.jar
Expand Down

0 comments on commit 01be125

Please sign in to comment.