Apache Gobblin 使用教程

Apache Gobblin 使用教程

gobblinA distributed data integration framework that simplifies common aspects of big data integration such as data ingestion, replication, organization and lifecycle management for both streaming and batch data ecosystems.项目地址:https://gitcode.com/gh_mirrors/go/gobblin

项目介绍

Apache Gobblin 是一个分布式数据集成框架,旨在简化大数据集成中的常见任务,如数据摄取、复制、组织和生命周期管理,适用于流式和批处理数据生态系统。Gobblin 优化并设计用于 ELT 模式,支持在数据摄取时进行内联转换。

项目快速启动

环境准备

确保你已经安装了以下软件:

  • Java 8 或更高版本
  • Git
  • Gradle

克隆项目

首先,克隆 Gobblin 项目到本地:

git clone https://github.com/apache/gobblin.git
cd gobblin

构建项目

使用 Gradle 构建项目:

./gradlew build

运行示例任务

构建完成后,可以运行一个示例任务来验证安装:

./gradlew :gobblin-example:run

应用案例和最佳实践

Kafka-HDFS Ingestion

Gobblin 可以用于从 Kafka 摄取数据并存储到 HDFS。以下是一个简单的配置示例:

job.name=KafkaHDFSJob
job.group=KafkaIngestion
job.description=Ingest data from Kafka to HDFS
source.class=org.apache.gobblin.source.extractor.extract.kafka.KafkaSimpleSource
writer.builder.class=org.apache.gobblin.writer.AvroHdfsDataWriterBuilder
kafka.brokers=localhost:9092
kafka.topics=test_topic
hdfs.uri=hdfs://localhost:8020

Hive Avro-To-Orc Converter

Gobblin 支持将 Avro 格式的数据转换为 ORC 格式,并注册到 Hive 中。以下是一个配置示例:

job.name=AvroToOrcJob
job.group=DataConversion
job.description=Convert Avro data to ORC and register in Hive
source.class=org.apache.gobblin.source.extractor.file.AvroFileSource
converter.classes=org.apache.gobblin.converter.avro.AvroToOrcConverter
writer.builder.class=org.apache.gobblin.writer.OrcHdfsDataWriterBuilder
hive.registration.enabled=true

典型生态项目

Gobblin on Yarn

Gobblin 可以在 Yarn 上运行,以利用 Hadoop 集群的资源进行数据处理。配置示例如下:

job.name=GobblinYarnJob
job.group=YarnDeployment
job.description=Run Gobblin job on Yarn
gobblin.yarn.app.name=GobblinYarnApp
gobblin.yarn.queue.name=default
gobblin.yarn.am.memory=1024
gobblin.yarn.am.cores=1

Gobblin Metrics

Gobblin 提供了丰富的指标系统,可以监控 ETL 过程的性能。以下是一个简单的指标配置示例:

metrics.enabled=true
metrics.reporting.file.enabled=true
metrics.reporting.file.filePath=/path/to/metrics.log

通过以上教程,您应该能够快速启动并运行 Apache Gobblin,并了解其在实际应用中的使用方法和最佳实践。

gobblinA distributed data integration framework that simplifies common aspects of big data integration such as data ingestion, replication, organization and lifecycle management for both streaming and batch data ecosystems.项目地址:https://gitcode.com/gh_mirrors/go/gobblin

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郦祺嫒Amiable

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值