You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/07/07 16:33:00 UTC

[jira] [Work logged] (BEAM-12435) Generalize S3FileSystem

     [ https://issues.apache.org/jira/browse/BEAM-12435?focusedWorklogId=620068&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-620068 ]

ASF GitHub Bot logged work on BEAM-12435:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jul/21 16:32
            Start Date: 07/Jul/21 16:32
    Worklog Time Spent: 10m 
      Work Description: aromanenko-dev commented on a change in pull request #15036:
URL: https://github.com/apache/beam/pull/15036#discussion_r665529848



##########
File path: sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3WritableByteChannelTest.java
##########
@@ -60,29 +59,29 @@
 
   @Test
   public void write() throws IOException {
-    writeFromOptions(s3Options());

Review comment:
       Should it still support write from options?

##########
File path: sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/s3/DefaultS3FileSystemSchemeRegistrar.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.beam.sdk.io.aws.s3;
+
+import static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
+
+import com.google.auto.service.AutoService;
+import javax.annotation.Nonnull;
+import org.apache.beam.sdk.annotations.Experimental;
+import org.apache.beam.sdk.annotations.Experimental.Kind;
+import org.apache.beam.sdk.io.aws.options.S3Options;
+import org.apache.beam.sdk.options.PipelineOptions;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.ImmutableList;
+
+/** Registers the "s3" uri schema to be handled by {@link S3FileSystem}. */
+@AutoService(S3FileSystemSchemeRegistrar.class)
+@Experimental(Kind.FILESYSTEM)
+public class DefaultS3FileSystemSchemeRegistrar implements S3FileSystemSchemeRegistrar {

Review comment:
       Do we need to have this class public?

##########
File path: sdks/java/io/amazon-web-services/src/test/java/org/apache/beam/sdk/io/aws/s3/S3FileSystemTest.java
##########
@@ -107,59 +106,64 @@ public static void afterClass() {
 
   @Test
   public void testGetScheme() {
-    S3FileSystem s3FileSystem = new S3FileSystem(s3Options());
+    S3FileSystem s3FileSystem = new S3FileSystem(s3Config("s3"));

Review comment:
       Would it better to keep using `s3Options()` here to make sure that schema is properly parsed from options as well?
   
   In general, I'd prefer to keep all old tests as they were before to make sure that we don't have any user API breakage.




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 620068)
    Time Spent: 1.5h  (was: 1h 20m)

> Generalize S3FileSystem
> -----------------------
>
>                 Key: BEAM-12435
>                 URL: https://issues.apache.org/jira/browse/BEAM-12435
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-aws
>            Reporter: Matt Rudary
>            Assignee: Matt Rudary
>            Priority: P2
>              Labels: aws, aws-s3
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> I'm working with multiple storage systems that speak the S3 api. I would like to support FileIO operations for these storage systems, but S3FileSystem hardcodes the s3 scheme (the various systems use different URI schemes) and it is in any case impossible to instantiate more than one in the current design.
> I'd like to refactor the code in org.apache.beam.sdk.io.aws.s3 (and maybe ...aws.options) somewhat to enable this use-case. I haven't worked out the details yet, but it will take some thought to make this work in a non-hacky way.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)