amazon-s3 - 从 Presto / Trino 连接超时到 Amazon S3
问题描述
我目前在 AWS 之外有一个 Kubernetes 设置,其中使用 Presto v348 查询驻留在 Amazon S3 中的数据湖。数据以 parquet 文件格式存储。附加组件是 Hive 元存储。
我遇到以下错误,并且在解决潜在问题时不知所措:
io.prestosql.spi.PrestoException: Unable to execute HTTP request: Connect to s3-eu-central-1.amazonaws.com:80 [s3-eu-central-1.amazonaws.com] failed: connect timed out
这个问题有时会随着更大的查询而出现,并且有趣的是会使系统进入所有后续查询都超时的状态。在某些情况下,在 1/5 的尝试中查询会成功。较小的查询通常工作得很好。大约 10-20 分钟后情况会好转。重启 Presto 并不能解决 10-20 分钟的问题。因此,我怀疑肯定还有另一个问题。
我知道我可能会遇到性能上限这一事实,但事实上只有超时而不是错误并且整个系统无法使用 10-20 分钟这一事实是不可接受的。
我已经增加hive.s3.max-connections
了 Presto 和fs.s3a.connection.maximum
Metastore 配置中的配置,但它似乎并没有解决问题。除此之外,我没有发现有关如何调整设置以防止错误发生的建议。
Presto 连接器配置:
connector.name=hive-hadoop2
hive.metastore.uri=thrift://hive-metastore:9083
hive.metastore.username=prestodb
hive.s3.aws-access-key="S3_ACCESS_KEY"
hive.s3.aws-secret-key="S3_SECRET_KEY"
hive.s3.endpoint=s3-eu-central-1.amazonaws.com
hive.s3.ssl.enabled=false
hive.s3.path-style-access=true
hive.parquet.use-column-names=true
hive.allow-drop-table=true
hive.s3-file-system-type=PRESTO
hive.s3.max-connections=50000
hive.s3select-pushdown.max-connections=50000
hive.s3.connect-timeout=60s
hive.allow-rename-column=true
元数据配置:
core-site.xml: |
<configuration>
<property>
<name>fs.s3a.connection.ssl.enabled</name>
<value>false</value>
</property>
<property>
<name>fs.s3a.access.key</name>
<value>xxx</value>
</property>
<property>
<name>fs.s3a.secret.key</name>
<value>xxx</value>
</property>
<property>
<name>fs.s3a.fast.upload</name>
<value>true</value>
</property>
<property>
<name>fs.s3a.connection.maximum</name>
<value>50000</value>
</property>
<property>
<name>fs.s3a.connection.establish.timeout</name>
<value>60000</value>
</property>
<property>
<name>fs.s3a.threads.max</name>
<value>64</value>
</property>
<property>
<name>fs.s3a.max.total.tasks</name>
<value>128</value>
</property>
</configuration>
解决方案
推荐阅读
- matlab - 我正在尝试从文本文件数据中提取并将其添加到音频读取函数 Matlab
- python - 如何在 CSV 文件中导入 csv 格式的邻接矩阵主题标签网络?
- java - 我需要在java中的列表中找到重复元素的数量
- ios - 为什么我的颜色目录中的动态颜色在我的导航栏上不起作用?
- javascript - 使用 nginx 和 Gunicorn 的生产服务器的 Django 应用程序
- excel - 将工作簿 1 中的单元格值与工作簿 2 中的多个单元格进行比较,如果匹配,则在 WB2 的下方单元格中 +1
- ruby-on-rails - 当我运行 rails server 时,Webpacker 无法编译
- docker - 无法在具有桥接网络的 VM 中访问 docker 网络
- java - 如何在 QueryDSL BooleanExpression 中使用 SubQeryExpression
- c - Linux内核中的字符设备问题