Comments (1)
I don't have a Flink example ready to go but can give you some input.
We are going to use it soon in our data chain and when we have a decent example will also add in examples folder.
// 1) create hadoop config and set your hadoop host/stuff
Configuration hadoopConfig = new Configuration();
hadoopConfig.set("fs.defaultFS", "hdfs://yourHdfsHost:8020");
hadoopConfig.set("io.compression.codecs", "...."); // make sure to set codecs
// 2) get job conf and configure 4mc for your proto message
Job jobConf = Job.getInstance(hadoopConfig);
FourMcEbProtoInputFormat.setInputFormatClass(YOURMSG.YourProtoMessage.class, jobConf);
// 3) create input from hdfs
DataSet<Tuple2<LongWritable, ProtobufWritable>> input =
env.readHadoopFile(new FourMcEbProtoInputFormat(), LongWritable.class, ProtobufWritable.class, "hdfs://path_to_your_file.4mc", jobConf);
// 4) add more in union or selecting multiple files at once
// 5) use the data set
from 4mc.
Related Issues (20)
- Create DataSet using SparkSession HOT 1
- Commit 17c36e08653162f6956ef27f55c96c20425df4b8 breaks test units HOT 1
- Fix Typo in FourMzTextInputFormat
- Request: upload maven artifact for java library HOT 3
- Consider changing license to Apache?
- PySpark Example doesn't work HOT 3
- The Travis link is broken
- 4mz - Zstd - cannot load csv.4mz into Spark (4mc works correctly) HOT 2
- how to use 4mc/4mz when write to json or parquet HOT 1
- how to use 4mc tool for linux fs batch processing and logging HOT 2
- null pointer exception HOT 2
- Issue creating output stream
- Update lz4 and zstd version? HOT 7
- Decompressing from stdin HOT 2
- why is FourMcTextInputFormat not an InputFormat? HOT 1
- How to use 4mc in Hive? HOT 1
- Requesting to Publish FourMC Project to maven Central Repository HOT 6
- Can't load AMD 64-bit .so on a AARCH64-bit platform HOT 1
- release-3.0.0 make error on centos7.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 4mc.