steveloughran commented on code in PR #7942:
URL: https://github.com/apache/hadoop/pull/7942#discussion_r2376222445


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java:
##########
@@ -573,8 +573,11 @@ private static void addDeprecatedKeys() {
    */
   public void initialize(URI name, Configuration originalConf)
       throws IOException {
-    // get the host; this is guaranteed to be non-null, non-empty
+    // get the host; fallback to authority if getHost() returns null
     bucket = name.getHost();
+    if (bucket == null) {

Review Comment:
   pull this out, stick it in `S3AUtils`, add unit tests that now try to break 
things. Use everywhere



##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/AbstractFileSystem.java:
##########
@@ -335,7 +335,7 @@ private URI getUri(URI uri, String supportedScheme,
     int port = uri.getPort();
     port = (port == -1 ? defaultPort : port);
     if (port == -1) { // no port supplied and default port is not specified
-      return new URI(supportedScheme, authority, "/", null);
+      return URI.create(supportedScheme + "://" + authority + "/");

Review Comment:
   why this change?



##########
hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md:
##########
@@ -31,6 +31,12 @@ before 2021.
 Consult [S3A and Directory Markers](directory_markers.html) for
 full details.
 
+### <a name="bucket-name-compatibility"></a> S3 Bucket Name Compatibility
+
+This release adds support for S3 bucket names containing dots followed by 
numbers
+(e.g., `my-bucket-v1.1`, `data-store.v2.3`). Previous versions of the Hadoop 
S3A
+client failed to initialize such buckets due to URI parsing limitations.
+

Review Comment:
   * highlight that per-bucket settings do not work for dotted buckets (they 
don't, do they?), so the ability to use them is still very much downgraded.
   * Explain that AWS do not recommend dotted buckets for anything other than 
web site serving
   * highlight that path style access is needed to access (correct? never tried)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to