Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature-13428][Resource Center] Add support for Google Cloud Storage in the resource center #13562

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

rickchengx
Copy link
Contributor

Purpose of the pull request

Brief change log

  • Add support for writing task logs to Google Cloud Storage

Verify this pull request

UT and manually tested

  1. configure in the common.properties
resource.storage.type=GCS
# the location of the google cloud credential, required if you set resource.storage.type=GCS
resource.google.cloud.storage.credential=/path/to/credential
# gcs bucket name, required if you set resource.storage.type=GCS
resource.google.cloud.storage.bucket.name=<your-bucket>
  1. Upload files and directory in the resource center

截屏2023-02-08 15 11 10

  1. Check files in the GCS

截屏2023-02-08 15 10 54

@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2023

Codecov Report

Merging #13562 (4d0300d) into dev (2bd65fb) will decrease coverage by 0.05%.
The diff coverage is 33.75%.

❗ Current head 4d0300d differs from pull request most recent head a5a00e2. Consider uploading reports for the commit a5a00e2 to get more accurate results

@@             Coverage Diff              @@
##                dev   #13562      +/-   ##
============================================
- Coverage     39.47%   39.43%   -0.05%     
- Complexity     4382     4401      +19     
============================================
  Files          1102     1104       +2     
  Lines         41437    41675     +238     
  Branches       4733     4754      +21     
============================================
+ Hits          16359    16436      +77     
- Misses        23262    23413     +151     
- Partials       1816     1826      +10     
Impacted Files Coverage Δ
...e/dolphinscheduler/common/constants/Constants.java 75.00% <ø> (ø)
...ler/server/master/event/TaskStateEventHandler.java 0.00% <0.00%> (ø)
.../plugin/storage/gcs/GcsStorageOperatorFactory.java 0.00% <0.00%> (ø)
...heduler/plugin/storage/gcs/GcsStorageOperator.java 35.39% <35.39%> (ø)
...e/dolphinscheduler/common/enums/ResUploadType.java 100.00% <100.00%> (ø)
...r/plugin/task/sqoop/parameter/SqoopParameters.java 28.57% <0.00%> (-9.53%) ⬇️
...org/apache/dolphinscheduler/remote/utils/Host.java 42.55% <0.00%> (-2.13%) ⬇️
...e/dolphinscheduler/remote/NettyRemotingClient.java 51.38% <0.00%> (-1.39%) ⬇️
...lphinscheduler/plugin/task/sqoop/SqoopJobType.java 88.88% <0.00%> (+88.88%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rickchengx rickchengx changed the title [Feature-13428][Resource Center] Add support for writing task logs to Google Cloud Storage [Feature-13428][Resource Center] Add support for Google Cloud Storage in the resource center Feb 15, 2023
@rickchengx rickchengx force-pushed the Feature-13428 branch 2 times, most recently from dd15daf to 649ebaf Compare February 20, 2023 02:18
@sonarcloud
Copy link

sonarcloud bot commented Feb 20, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 27 Code Smells

37.2% 37.2% Coverage
7.2% 7.2% Duplication

@rickchengx
Copy link
Contributor Author

rickchengx commented Feb 20, 2023

Hi, @zhongjiajie , @SbloodyS , @EricGao888 ,could you please help review this?

}

@Override
public boolean delete(String filePath, boolean recursive) throws IOException {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems the parameter recursive not use in this method, so GCS does not support delete recursive in this method?

Copy link
Contributor Author

@rickchengx rickchengx Mar 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @zhongjiajie , thanks a lot for your kind review. Perhaps for some historical reasons, recursive is not used (also in the S3StorageOperator and OssStorageOperator).

Another interface below is called when deleting with a childrenPathList.

@Override
    public boolean delete(String fullName, List<String> childrenPathList, boolean recursive) throws IOException {
        // append the resource fullName to the list for deletion.
        childrenPathList.add(fullName);

        boolean result = true;
        for (String filePath : childrenPathList) {
            if (!delete(filePath, recursive)) {
                result = false;
            }
        }

        return result;
    }

@zhongjiajie zhongjiajie merged commit 2dceb6b into apache:dev Mar 15, 2023
zhaohehuhu pushed a commit to zhaohehuhu/dolphinscheduler that referenced this pull request Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.0 for 3.2.0 version backend document e2e e2e test feature new feature test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature][Resource Center] Add support for Google Cloud Storage in the resource center
4 participants