Giter Site home page Giter Site logo

neeraj97 / kafka-connect-github-source Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simplesteph/kafka-connect-github-source

0.0 0.0 0.0 59 KB

Get a stream of issues and pull requests for your chosen GitHub repositories into Apache Kafka

License: MIT License

Shell 1.45% Java 98.12% Dockerfile 0.43%
kafka-connector kafka-connect apache-kafka kafka github-kafka-connector github source connector

kafka-connect-github-source's Introduction

Kafka Connect Source GitHub

This connector allows you to get a stream of issues and pull requests from GitHub repositories, using the GitHub Api: https://developer.github.com/v3/issues/#list-issues-for-a-repository

Issues are pulled based on updated_at field, meaning any update to an issue or pull request will appear in the stream.

The connector writes to topic that is great candidate to demonstrate log compaction. It's also a fun way to automate your GitHub workflow.

Configuration

name=GitHubSourceConnectorDemo
tasks.max=2
connector.class=com.simplesteph.kafka.GitHubSourceConnector
since.timestamp=2017-01-01T00:00:00Z
#Pattern to be followed for mentioning repositories owner/repo:topic
github.repos=kubernetes/kubernetes:github-issues-kubernetes,apache/kafka:github-issues-kafka
# I heavily recommend you set auth.accesstoken field:
#auth.username=
#auth.password=
auth.accesstoken=your_accestoken

Note: Configuration for github.repos should be set and should follow the pattern owner1/repo1:topic1,owner2/repo2:topic2 ....

You can control the number of tasks to run by using tasks.max. This allows work to be divided among tasks i.e., each task will be assigned few repositories and will fetch issues for those repositories.

Set since.timestamp to fetch the issues of repositories which have been updated after the required timestamp.

Use either auth.username and auth.password or only auth.accesstoken. Using auth.accesstoken is preferable because authentication with username and password has been deprecated and will soon be not supported by Github APIs. For generating the personal accesstoken follow the steps in https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

Running in development

Note: Java 8 is required for this connector. Make sure config/worker.properties is configured to wherever your kafka cluster is

./build.sh
./run.sh 

The simplest way to run run.sh is to have docker installed. It will pull a Dockerfile and run the connector in standalone mode above it.

Deploying

Note: Java 8 is required for this connector.

Distributed Mode

Build the project using ./build.sh.

Paste the folder target/kafka-connnect-github-source-1.1-package /share/java/kafka-connect-github-source(this folder has all jars of the project) in connect-workers' plugin.path(can be found in the connect-workers' properties) directory. The connect-worker should be able to detect GitHubSourceConnector.

Contributing

This connector can be improved much, please feel free to submit any PR you deem useful.

kafka-connect-github-source's People

Contributors

simplesteph avatar neeraj97 avatar iterrator avatar tote-cca-build-bot avatar

kafka-connect-github-source's Issues

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.