Skip to content
Mahmoud Ben Hassine edited this page Jun 5, 2017 · 14 revisions

1. How does Easy Batch read data from a data source?

Easy Batch streams data record by record from the data source. Depending on the data source type, a record can be a line in a flat file, an tag in an Xml file, a record in a database table, etc. The RecordReader abstraction is intended to be implemented with a Streaming API so that the data source is not entirely loaded in memory (which is the main cause of java.lang.OutOfMemoryError of many batch applications). There are several implementations of the RecordReader interface to read data from a variety of data sources. Please refer to the user guide for all details about available record readers.

2. How does Easy Batch write data to a data sink?

Easy Batch writes record in batches. Most APIs provide a way to write data in bulk mode for performance reasons. The RecordWriter abstraction is designed to work this way. The writeRecords method takes a batch of records and writes them as a unit to the data sink. Usually, the write operation is performed within a transaction boundary so records are written in unit or rolled back for re-processing. Easy Batch provides several implementations of the RecordWriter interface to write data to a variety of data sinks. Please refer to the user guide for all details about available record writers.

3. Can I use Easy Batch to process non-textual data?

Yes. Even though common use cases are about processing textual data, Easy Batch Record abstraction can be implemented for any type of input data. For example, in a scenario where you need to compress a set of images with Java in a batch mode, a record can be one image file. Easy Batch API is generic and can be used to process any type of input data.

4. Can I use the Bean Validation API (JSR 303/349) with Easy Batch?

Yes. Easy Batch uses the reference implementation Hibernate validator to validate domain objects. For all details about how to validate data using Bean Validation API with Easy Batch, please refer to the user guide.

5. Does Easy Batch implement the "Batch Applications for the Java Platform" API (JSR 352)?

No. Easy Batch has been designed and implemented before the JSR 352 has been submitted.

6. Can I monitor Easy Batch execution with JMX?

Yes. You can enable Jmx monitoring with JobBuilder#enableJmx(). This will register a JMX MBean named org.easybatch.core.monitor:name=YourJobName at job startup. You can use any standard JMX compliant tool to monitor your job metrics. You can also use a JobMonitorProxy and register a JobMonitoringListener to listen to push notifications sent by the job at runtime.

7. Can I use Easy Batch with Spring?

Yes. the JobFactoryBean can be used to configure and declare Easy Batch jobs as Spring beans. This factory bean can be used by importing the easybatch-spring module.

8. How does Easy Batch compare to Spring Batch?

Spring Batch is an advanced batch processing framework with a very rich features set such as flows, remoting, partitioning, automatic retry on failure, etc. Easy Batch is a bit like Spring Batch, but much smaller and not as bright! It's a simple and lightweight framework that can be learned quickly an used easily for the majority of batch processing use cases. Easy Batch does not compete with Spring Batch but tries to provide an alternative that is easier to learn, configure and use.

9. How can I configure Easy Batch logging ?

Easy Batch uses the java.util.logging API. This choice has been made to make the framework have no dependencies. By default, Easy Batch logs messages to the standard output. Please refer to the official documentation of the java.util.logging API for all details about how to customize it.

10. Is there a micro benchmark for Easy Batch jobs?

Yes, here it is. It uses JMH to measure the potential overhead of Easy Batch jobs. You can follow detailed instructions to launch the benchmark and see results.

11. I have another question, How do I do?

Feel free to ask your question on the forum or on Gitter

Clone this wiki locally