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

Support integrating TOS as the UnderFileSystem #18621

Merged
merged 9 commits into from
Jun 11, 2024
Merged

Support integrating TOS as the UnderFileSystem #18621

merged 9 commits into from
Jun 11, 2024

Conversation

thu-david
Copy link
Contributor

What changes are proposed in this pull request?

Created an interface for TOS, enabling Alluxio to operate and cache data specifically for TOS.

Why are the changes needed?

Tested the creation, deletion, metadata retrieval, and directory information retrieval for files of sizes 1MB, 64MB, 1GB, and 10GB. This can support the most basic TOS query requests.

Does this PR introduce any user facing changes?

This implementation continues to follow Alluxio's API. To use it, you only need to provide the TOS information in the configuration file.

@Jackson-Wang-7 Jackson-Wang-7 self-requested a review June 7, 2024 03:21
Copy link
Contributor

@Jackson-Wang-7 Jackson-Wang-7 left a comment

Choose a reason for hiding this comment

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

Mostly looks good, left some comments to fix, thanks for your contribution!

.build();
public static final PropertyKey TOS_REGION =
stringBuilder(Name.TOS_REGION)
.setDescription("The region name of TOS bucket.")
Copy link
Contributor

Choose a reason for hiding this comment

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

please align to the previous line.

<dependency>
<groupId>com.volcengine</groupId>
<artifactId>ve-tos-java-sdk</artifactId>
<version>2.7.1</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

define the version in the root pom.xml, not here

import javax.annotation.concurrent.NotThreadSafe;

/**
* A stream for reading a file from COS. This input stream returns 0 when calling read with an empty
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* A stream for reading a file from COS. This input stream returns 0 when calling read with an empty
* A stream for reading a file from TOS. This input stream returns 0 when calling read with an empty

import javax.annotation.concurrent.NotThreadSafe;

/**
* A stream for writing a file into COS. The data will be persisted to a temporary directory on the
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* A stream for writing a file into COS. The data will be persisted to a temporary directory on the
* A stream for writing a file into TOS. The data will be persisted to a temporary directory on the

return new ObjectStatus(key, output.getEtag(), output.getContentLength(),
lastModifiedTime);
} catch (TosException e) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

please check the exception, if it's 404 not found, then return null, otherwise throw a exception

}
}

String err = "TOS Credentials not available, cannot create TOS Under File System.";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
String err = "TOS Credentials not available, cannot create TOS Under File System.";
String err = "TOS Credentials or configurations not available, cannot create TOS Under File System.";

@Jackson-Wang-7 Jackson-Wang-7 added area-ufs Under File Storage type-feature This issue is a feature request labels Jun 7, 2024
@alluxio-bot
Copy link
Contributor

Automated checks report:

  • PR title follows the conventions: FAIL
    • The title of the PR does not pass all the checks. Please fix the following issues:
      • First word of title ("TOS") is not an imperative verb. Please use one of the valid words
  • Commits associated with Github account: PASS

Some checks failed. Please fix the reported issues and reply
alluxio-bot, check this please
to re-run checks.

@thu-david thu-david changed the title TOS Integration Update Tos v1 Jun 7, 2024
@alluxio-bot
Copy link
Contributor

Automated checks report:

  • PR title follows the conventions: PASS
  • Commits associated with Github account: PASS

All checks passed!

@Jackson-Wang-7 Jackson-Wang-7 changed the title Update Tos v1 Support integrating TOS as the UnderFileSystem Jun 7, 2024
Copy link
Contributor

@Jackson-Wang-7 Jackson-Wang-7 left a comment

Choose a reason for hiding this comment

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

LGTM, just remove the OSS code change

@@ -47,7 +48,8 @@ public UnderFileSystem create(String path, UnderFileSystemConfiguration conf) {
}
}

String err = "OSS Credentials not available, cannot create OSS Under File System.";
String err =
Copy link
Contributor

Choose a reason for hiding this comment

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

@thu-david this is the OSS UnderFileSystem Factory, please remove this line

@JiamingMai
Copy link
Contributor

alluxio-bot, merge this please.

@alluxio-bot alluxio-bot merged commit e9f2913 into Alluxio:master-2.x Jun 11, 2024
19 checks passed
@thu-david thu-david deleted the cwdTOS branch June 26, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ufs Under File Storage type-feature This issue is a feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants