Skip to content

bi-geek/flink-connector-bitcoin

Repository files navigation

Bitcoin Flink Connector

Build Status codecov Maven Central GitHub stars

Flink connector for Bitcoin.

Table of Contents

Overview

Bitcoin Flink connector provides an InputFormat implementation for reading data from the Bitcoin blockchain.

Getting started

Add dependency

<dependency>
    <groupId>com.github.bi-geek</groupId>
    <artifactId>flink-connector-bitcoin</artifactId>
    <version>1.0.0</version>
</dependency>

Code example

public class BitcoinJob {

	private static Logger logger = LoggerFactory.getLogger(BitcoinJob.class);

	public static void main(String[] args) throws Exception {
		final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
		DataSource<EthBlock> list = env.createInput(new BitcoinInputSource());
		logger.info("counter: "+ list.count());
		env.execute("Job");


	}
}

License

Bitcoin Flink Connector is licensed under the MIT License. See LICENSE for details.

Copyright (c) 2018 BI-Geek