Giter VIP home page Giter VIP logo

flume-regexp-interceptor's Introduction

travis-ci.org status

flume-regexp-interceptor

Flume interceptor that create new headers from other headers by regular expressions.

Example

E.g. there are too tables in hadoop - first and second. Flume watches spool directory and uploads files to hdfs to destination first and second respectively. Interceptor helps you determine table name.

Config example:

agent.sources = src
agent.sources.src.type = spooldir
agent.sources.src.channels = channel
agent.sources.src.spoolDir = /var/spool/flume
agent.sources.src.fileHeader = true
agent.sources.src.basenameHeader = true
agent.sources.src.deletePolicy = immediate
agent.sources.src.interceptors = table_detector
agent.sources.src.interceptors.table_detector.type = org.apache.hadoop.flume.interceptor.HeaderRegexInterceptor$Builder
agent.sources.src.interceptors.table_detector.header = basename
agent.sources.src.interceptors.table_detector.regex = ^(?<table>[a-zA-Z\-]+)_.*$
agent.sources.src.interceptors.table_detector.group.table = tablename

Interceptor get value of header basename and try to parse it with regex. Then it adds new header tablename with value of named group table.

flume-regexp-interceptor's People

Contributors

go1dshtein avatar

Watchers

Jon Roosevelt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.