[
https://issues.apache.org/jira/browse/BEAM-5959?focusedWorklogId=191199&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-191199
]
ASF GitHub Bot logged work on BEAM-5959:
----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jan/19 18:58
Start Date: 28/Jan/19 18:58
Worklog Time Spent: 10m
Work Description: udim commented on pull request #7629: [BEAM-5959] DO
NOT MERGE: KMS support for FileBasedSink, GCS
URL: https://github.com/apache/beam/pull/7629#discussion_r251535294
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/FileSystem.java
##########
@@ -102,8 +107,52 @@ protected abstract WritableByteChannel create(ResourceIdT
resourceId, CreateOpti
* resource might or might not be copied. In such scenarios, callers can
use {@code match()}
* to determine the state of the resources.
*/
- protected abstract void copy(List<ResourceIdT> srcResourceIds,
List<ResourceIdT> destResourceIds)
- throws IOException;
+ @Deprecated
+ protected void copy(List<ResourceIdT> srcResourceIds, List<ResourceIdT>
destResourceIds)
+ throws IOException {
+ throw new UnsupportedOperationException("deprecated - do not implement
this method");
+ }
+
+ /**
+ * Copies a {@link List} of file-like resources from one location to another.
+ *
+ * <p>The number of source resources must equal the number of destination
resources. Destination
+ * resources will be created recursively.
+ *
+ * @param srcResourceIds the references of the source resources
+ * @param destResourceIds the references of the destination resources
+ * @param moveOptions additional settings passed to the underlying
implementation
+ * @throws FileNotFoundException if the source resources are missing. When
copy throws, each
+ * resource might or might not be copied. In such scenarios, callers can
use {@code match()}
+ * to determine the state of the resources.
+ */
+ protected void copy(
+ List<ResourceIdT> srcResourceIds, List<ResourceIdT> destResourceIds,
MoveOptions moveOptions)
+ throws IOException {
+ LOG.warn("Using deprecated copy");
Review comment:
The idea is to add a warning to the implementer of a FileSystem that's not
in the Beam repo to implement this method. I could remove it if it's too spammy.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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: 191199)
Time Spent: 18h (was: 17h 50m)
> Add Cloud KMS support to GCS creates and copies
> -----------------------------------------------
>
> Key: BEAM-5959
> URL: https://issues.apache.org/jira/browse/BEAM-5959
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp, sdk-py-core
> Reporter: Udi Meiri
> Assignee: Udi Meiri
> Priority: Major
> Time Spent: 18h
> Remaining Estimate: 0h
>
> Beam SDK currently uses the CopyTo GCS API call, which doesn't support
> copying objects that Customer Managed Encryption Keys (CMEK).
> CMEKs are managed in Cloud KMS.
> Items (for Java and Python SDKs):
> - Update clients to versions that support KMS keys.
> - Change copyTo API calls to use rewriteTo (Python - directly, Java -
> possibly convert copyTo API call to use client library)
> - Add unit tests.
> - Add basic tests (DirectRunner and GCS buckets with CMEK).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)