如何从Apache Beam中的HTTP响应读取大文件? [英] How to read large files from HTTP response in Apache Beam?

查看:60
本文介绍了如何从Apache Beam中的HTTP响应读取大文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apache Beam的TextIO可用于读取某些文件系统中的JSON文件,但是如何从Java SDK中HTTP响应产生的大型JSON(InputStream)中创建PCollection?

Apache Beam's TextIO can be used to read JSON files in some filesystems, but how can I create a PCollection out of a large JSON (InputStream) resulted from a HTTP response in Java SDK?

推荐答案

我不认为Beam中目前有通用的内置解决方案可以做到这一点,

I don't think there's a generic built-in solution in Beam to do this at the moment, see the list of supported IOs.

我可以想到多种解决方法,哪种对您有效,可能取决于您的要求:

I can think of multiple approaches to this, whichever works for you may depend on your requirements:

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