Google Bigquery 插入流
Google Bigquery insert streaming
我浏览了 Google 官方网站上的 Bigquery 文档。
我对 Google 的插入流配额政策有点困惑。 Here
网页上提到了以下几点。
1]Maximum row size: 1 MB
2]HTTP request size limit: 10 MB
3]Maximum rows per second: 100,000 rows per second, per table. Exceeding this amount will cause quota_exceeded errors.
4]Maximum rows per request: 500
5]Maximum bytes per second: 100 MB per second, per table. Exceeding this amount will cause quota_exceeded errors.
第3点和第4点我看不懂。
我们可以使用 new TableDataInsertAllRequest().setRows(rowList); 来设置数据;
rowList.size() 最多为 100,000。对于插入,我们可以使用 table().insertAll().execute().
但我对第3点和第4点仍然感到困惑。
谁能详细解释一下?
提前致谢。
假设您使用大量并行工作器来发送流式插入,例如同时有数千台服务器。
如果您将计算机流式传输的所有这些行加起来,则可能会产生每秒超过 10 万行的结果。每个服务器单独传输最多 500 个,但一个大型集群在一起每秒可以传输超过 100k。如果达到该限制,您可能需要联系支持人员以提高限制。
因此,您需要了解一个有效载荷需要很小并且适合 500 行。如果您想流式传输更多内容,则需要并行进行流式传输。要实现这一点,最好有一个像 Beanstalkd 这样的消息队列系统,你可以使用 beanstalkd admin console.
来监视你的工作。
我浏览了 Google 官方网站上的 Bigquery 文档。 我对 Google 的插入流配额政策有点困惑。 Here 网页上提到了以下几点。
1]Maximum row size: 1 MB
2]HTTP request size limit: 10 MB
3]Maximum rows per second: 100,000 rows per second, per table. Exceeding this amount will cause quota_exceeded errors.
4]Maximum rows per request: 500
5]Maximum bytes per second: 100 MB per second, per table. Exceeding this amount will cause quota_exceeded errors.
第3点和第4点我看不懂。 我们可以使用 new TableDataInsertAllRequest().setRows(rowList); 来设置数据; rowList.size() 最多为 100,000。对于插入,我们可以使用 table().insertAll().execute().
但我对第3点和第4点仍然感到困惑。 谁能详细解释一下? 提前致谢。
假设您使用大量并行工作器来发送流式插入,例如同时有数千台服务器。
如果您将计算机流式传输的所有这些行加起来,则可能会产生每秒超过 10 万行的结果。每个服务器单独传输最多 500 个,但一个大型集群在一起每秒可以传输超过 100k。如果达到该限制,您可能需要联系支持人员以提高限制。
因此,您需要了解一个有效载荷需要很小并且适合 500 行。如果您想流式传输更多内容,则需要并行进行流式传输。要实现这一点,最好有一个像 Beanstalkd 这样的消息队列系统,你可以使用 beanstalkd admin console.
来监视你的工作。