[
https://issues.apache.org/jira/browse/BEAM-7637?focusedWorklogId=556839&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-556839
]
ASF GitHub Bot logged work on BEAM-7637:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Feb/21 10:02
Start Date: 24/Feb/21 10:02
Worklog Time Spent: 10m
Work Description: RaphaelSanamyan commented on a change in pull request
#13914:
URL: https://github.com/apache/beam/pull/13914#discussion_r581821934
##########
File path:
sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/s3/S3ResourceId.java
##########
@@ -0,0 +1,208 @@
+/*
+ * 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.aws2.s3;
+
+import static
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkArgument;
+import static
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkNotNull;
+import static
org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Preconditions.checkState;
+
+import java.util.Date;
+import java.util.Objects;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.apache.beam.sdk.io.fs.ResolveOptions;
+import org.apache.beam.sdk.io.fs.ResourceId;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Optional;
+import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.Strings;
+import org.checkerframework.checker.nullness.qual.Nullable;
+
+@SuppressWarnings({
+ "nullness" // TODO(https://issues.apache.org/jira/browse/BEAM-10402)
+})
+class S3ResourceId implements ResourceId {
+
+ static final String SCHEME = "s3";
+
+ private static final Pattern S3_URI =
+ Pattern.compile("(?<SCHEME>[^:]+)://(?<BUCKET>[^/]+)(/(?<KEY>.*))?");
+
+ /** Matches a glob containing a wildcard, capturing the portion before the
first wildcard. */
+ private static final Pattern GLOB_PREFIX =
Pattern.compile("(?<PREFIX>[^\\[*?]*)[\\[*?].*");
+
+ private final String bucket;
+ private final String key;
+ private final @Nullable Long size;
+ private final @Nullable Date lastModified;
+
+ public static void main(String[] args) {
Review comment:
removed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 556839)
Time Spent: 3h 10m (was: 3h)
> Migrate S3FileSystem to AWS SDK for Java 2
> ------------------------------------------
>
> Key: BEAM-7637
> URL: https://issues.apache.org/jira/browse/BEAM-7637
> Project: Beam
> Issue Type: Sub-task
> Components: io-java-aws
> Reporter: Ismaël Mejía
> Assignee: Sanamyan Raphael
> Priority: P3
> Fix For: 2.29.0
>
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)