This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
doufenghu 2273acd47c fix(batch):
1. 支持单条与批量发送接口。-涉及所有各个Topic 的conf 文件,需要修改总线的文件路径
2. 解决总线负载过高,发送重定向URL,对内容进行缓存,造成内存溢出问题。
3. 增加批量回调接口与单条进行区分,单条目前支持缓存重定向后的错误数据进行重发,目前支持最大缓存10w条。
2020-10-27 17:06:02 +08:00
2020-10-17 17:22:31 +08:00
2020-10-27 17:06:02 +08:00
2020-10-21 12:32:58 +08:00

总线数据转发

Introduction

接收kafka日志,补全后按照总线接口定义的数据结构进行消息生产

  • 基于开源flume
  • 整合HttpClient

代码结构流程图

代码流程图

总线单条日志结构

数据结构图

安装部署

打包 yb_http_avro_sink_file --> maven --> package

部署

  • 更新部署

    1. 登录flume所在机器

      到达/home/mesasoft/apache-flume-1.9.0-bin/plugins.d/cusflumejar/lib路径下

      #进入/home/mesasoft/apache-flume-1.9.0-bin/plugins.d/cusflumejar/lib目录
      cd /home/mesasoft/apache-flume-1.9.0-bin/plugins.d/cusflumejar/lib
      
      #备份旧文件cus-sink-https-avro-file-log-monitor-yb-debug-开头并且.jar结尾到上级目录或者自己创建特定文件夹保存旧版本,但不能存放在lib下
      #移除旧文件示例,注意按实际修改名称
      mv cus-sink-https-avro-file-log-monitor-yb-debug-1.2.200904.jar ../
      
      #上传打好的包yb_http_avro_sink_file-1.0-SNAPSHOT.jar到/home/mesasoft/apache-flume-1.9.0-bin/plugins.d/cusflumejar/lib下修改打包后包文件名称
      mv yb_http_avro_sink_file-1.0-SNAPSHOT.jar cus-sink-https-avro-file-log-monitor-yb-debug-1.版本数字.日期.jar
      #示例指令,按照实际需求修改
      mv yb_http_avro_sink_file-1.0-SNAPSHOT.jar cus-sink-https-avro-file-log-monitor-yb-debug-1.3.101021.jar
      
      #回到/home/mesasoft/apache-flume-1.9.0-bin路径下
      #先停止所有程序
      ./stop_all.sh
      #再启动所有程序
      ./clean_start_all.sh 进程数 进程起始端口号
      #启动指令示例,进程数根据实际需要修改,需要结合kafka分区数考虑
      ./clean_start_all.sh 1 50000
      
    2. flume存在多台机器时,每台flume机器都需执行上述操作

Description
No description provided
Readme 283 KiB
Languages
Java 100%