我们可以通过Google Cloud Dataflow访问gsutil吗?如果是的话,那么有人可以请示例解释吗? [英] Can we access gsutil from Google Cloud Dataflow? if yes, then could someone please explain with example?

查看:166
本文介绍了我们可以通过Google Cloud Dataflow访问gsutil吗?如果是的话,那么有人可以请示例解释吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Google云端数据流新手,我需要将GCS(Google云端存储)中的文件从一个存储桶复制到另一个存储并重命名。以示例回答将非常感谢。

I'm new with google cloud dataflow and I need to copy files in GCS (Google Cloud Storage) from one bucket to another and rename. Answer with example would highly appreciated.

推荐答案

从技术上讲,您可以做到这一点,但如果您使用Dataflow来获取文件并移动它们会更好而不是作为gustil的包装。

Technically yes you can do this, but it would be better if you used Dataflow to just pick up the files and move them over to the new bucket instead of as a wrapper around gustil.

您需要的类应该是beam.io.gcsio.GcsIO(),并且应该能够选择也可以放在你需要的地方。

The class you need should be beam.io.gcsio.GcsIO() and that should be able to pick up and put down files where you need it too.

这篇关于我们可以通过Google Cloud Dataflow访问gsutil吗?如果是的话,那么有人可以请示例解释吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆