Skip to content
Mahmoud Ben Hassine edited this page Jun 4, 2017 · 15 revisions

What is Easy Batch?

Welcome to the Easy Batch wiki! Easy Batch is a framework that aims to simplify batch processing with Java. It's goal is to free you from boilerplate code for tedious tasks such as reading, writing, filtering, parsing, validating data and let you concentrate on your batch processing business logic.

The motivation behind the framework is to make your life easier. Easy Batch is a lightweight framework that you can configure easily with a fluent Java API and run in a standalone mode or embedded in an application server.

Task You Easy Batch
Implement business logic x
Handle resources I/O x
Data filtering / validation x
Type conversion x
Objects marshalling / unmarshalling x
Transaction management x
Logging / Reporting x
Job Monitoring / Scheduling x

How does it work?

Easy Batch jobs are simple processing pipelines. Records are read in sequence from a data source, processed in pipeline and written in batches to a data sink:

batch-process

Easy Batch provides the Record and Batch APIs to abstract data format and process records in a consistent way regardless of the data source type.

Show me the code!

Let's suppose you have to deal with tweets represented by a Tweet class. Here is an example:

Job job = JobBuilder.aNewJob()
    .named("transform tweets")
    .reader(new FlatFileRecordReader("tweets.csv"))
    .filter(new HeaderRecordFilter())
    .mapper(new DelimitedRecordMapper(Tweet.class))
    .marshaller(new XmlRecordMarshaller(Tweet.class))
    .writer(new FileRecordWriter("tweets.xml"))
    .batchSize(10)
    .build();

JobReport report = new JobExecutor().execute(job);

Can you guess what does this example do? Easy, isn't it?

This is what Easy Batch is all about! Making your code declarative, intuitive, easy to read, understand, test and maintain.

Acknowledgments

yourkit

  • JETBRAINS : Many thanks to JetBrains for providing a free license of IntelliJ IDEA to kindly support the development of Easy Batch.

intellijidea

  • TRAVIS CI : Many thanks to Travis CI for providing a free continuous integration service for open source projects.

travisci

Clone this wiki locally