Apache Druid 集成 Pure Storage S3 存储的解决方案
背景介绍
Apache Druid 作为一款高性能的实时分析数据库,通常需要与对象存储服务集成来持久化数据。在实际生产环境中,用户可能会选择不同的对象存储解决方案,其中 Pure Storage FlashBlade 是一种高性能的存储系统,提供了兼容 S3 协议的接口。然而,在将 Druid 与 Pure Storage S3 集成时,用户可能会遇到写入失败的问题。
问题现象
当配置 Druid 使用 Pure Storage 作为后端存储时,系统会出现以下错误:
java.lang.RuntimeException: java.io.IOException: com.amazonaws.services.s3.model.AmazonS3Exception:
A header you provided implies functionality that is not implemented.
(Service: Amazon S3; Status Code: 501; Error Code: NotImplemented)
具体表现为:
- 能够从 Pure Storage S3 读取数据段(get操作)
- 能够将数据保存到本地目录
- 但无法将数据段写入(push操作)到 Pure Storage S3
根本原因分析
这个问题的本质在于 Pure Storage 的 S3 实现与标准 AWS S3 服务存在一些功能差异。错误信息中的"501 Not Implemented"状态码表明,Druid 尝试使用的某些 S3 API 功能在 Pure Storage 的实现中尚未支持。
经过深入分析,问题主要出在 Druid 默认会尝试使用 S3 的访问控制列表(ACL)功能,而 Pure Storage 的 S3 实现可能不完全支持这些 ACL 操作。
解决方案
要解决这个问题,需要在 Druid 的配置中显式禁用 ACL 功能。具体配置如下:
对于主存储:
druid_storage_disableAcl: "true"
对于索引器日志存储:
druid_indexer_logs_disableAcl: "true"
完整配置建议
除了禁用 ACL 外,针对 Pure Storage S3 的完整推荐配置还包括:
druid_storage_type: s3
druid_storage_baseKey: warehouse
druid_storage_bucket: druid
druid_storage_storageDirectory: s3a://druid/warehouse/
druid_indexer_logs_type: s3
druid_indexer_logs_directory: s3a://druid/logs/
druid_indexer_logs_s3Bucket: druid
druid_indexer_logs_s3Prefix: logs
druid_storage_useS3aSchema: "true"
druid_s3_disableChunkedEncoding: "true"
druid_s3_credential: "your-credential"
druid_s3_secret: "your-secret"
druid_s3_protocol: http
druid_s3_enablePathStyleAccess: "true"
druid_s3_endpoint_signingRegion: us-east-1
druid_s3_endpoint_url: http://your-pure-storage-endpoint
druid_s3_forceGlobalBucketAccessEnabled: "true"
druid_storage_disableAcl: "true"
druid_indexer_logs_disableAcl: "true"
技术原理
禁用 ACL 后,Druid 将不再尝试设置对象级别的访问权限,而是依赖存储桶级别的权限控制。这种模式与许多非 AWS 的 S3 兼容存储服务更加匹配,特别是那些不完全实现 S3 ACL 功能的存储系统。
验证与测试
在实际环境中验证该解决方案时,需要注意:
- 确保 Pure Storage S3 服务正常运行
- 验证配置中的 endpoint URL 和认证信息正确无误
- 检查存储桶的权限设置是否允许 Druid 进行读写操作
- 监控初始数据写入过程,确认没有其他兼容性问题
总结
通过禁用 S3 ACL 功能,Druid 可以成功与 Pure Storage FlashBlade S3 服务集成。这个解决方案不仅适用于 Pure Storage,对于其他不完全兼容标准 S3 API 的对象存储服务也有参考价值。在实际部署时,建议先在小规模环境中验证配置,确认一切正常后再推广到生产环境。
对于企业用户来说,理解不同存储服务的 API 兼容性差异非常重要,这有助于在架构设计阶段就做出合理的技术选型,避免后期集成时遇到类似问题。
PaddleOCR-VLPaddleOCR-VL 是一款顶尖且资源高效的文档解析专用模型。其核心组件为 PaddleOCR-VL-0.9B,这是一款精简却功能强大的视觉语言模型(VLM)。该模型融合了 NaViT 风格的动态分辨率视觉编码器与 ERNIE-4.5-0.3B 语言模型,可实现精准的元素识别。Python00- DDeepSeek-OCR暂无简介Python00
openPangu-Ultra-MoE-718B-V1.1昇腾原生的开源盘古 Ultra-MoE-718B-V1.1 语言模型Python00
HunyuanWorld-Mirror混元3D世界重建模型,支持多模态先验注入和多任务统一输出Python00
AI内容魔方AI内容专区,汇集全球AI开源项目,集结模块、可组合的内容,致力于分享、交流。03
Spark-Scilit-X1-13BFLYTEK Spark Scilit-X1-13B is based on the latest generation of iFLYTEK Foundation Model, and has been trained on multiple core tasks derived from scientific literature. As a large language model tailored for academic research scenarios, it has shown excellent performance in Paper Assisted Reading, Academic Translation, English Polishing, and Review Generation, aiming to provide efficient and accurate intelligent assistance for researchers, faculty members, and students.Python00
GOT-OCR-2.0-hf阶跃星辰StepFun推出的GOT-OCR-2.0-hf是一款强大的多语言OCR开源模型,支持从普通文档到复杂场景的文字识别。它能精准处理表格、图表、数学公式、几何图形甚至乐谱等特殊内容,输出结果可通过第三方工具渲染成多种格式。模型支持1024×1024高分辨率输入,具备多页批量处理、动态分块识别和交互式区域选择等创新功能,用户可通过坐标或颜色指定识别区域。基于Apache 2.0协议开源,提供Hugging Face演示和完整代码,适用于学术研究到工业应用的广泛场景,为OCR领域带来突破性解决方案。00- HHowToCook程序员在家做饭方法指南。Programmer's guide about how to cook at home (Chinese only).Dockerfile013
Spark-Chemistry-X1-13B科大讯飞星火化学-X1-13B (iFLYTEK Spark Chemistry-X1-13B) 是一款专为化学领域优化的大语言模型。它由星火-X1 (Spark-X1) 基础模型微调而来,在化学知识问答、分子性质预测、化学名称转换和科学推理方面展现出强大的能力,同时保持了强大的通用语言理解与生成能力。Python00- PpathwayPathway is an open framework for high-throughput and low-latency real-time data processing.Python00