Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.
Scott Stafford edited this page Feb 1, 2018 · 24 revisions

What is MarkLogic Spring Batch?

MarkLogic Spring Batch (MSB) is an extension of the Spring Batch project. An understanding of Spring Batch and the Spring Framework is necessary to utilize this project.

Spring Batch is a comprehensive batch framework designed to enable the development of robust batch applications. The framework alone is not an Java executable application but provides plenty of standard and configurable components so you are not starting from scratch.

GitHub version

Branch Status
master master
dev dev

Why use Spring Batch and MarkLogic Spring Batch?

  1. Write less code to create custom batch processing jobs using MarkLogic
  2. Built in fault tolerance and performance optimization
  3. Code that will be easier to maintain

How do I get started?

  • Getting Started - a tutorial to build a sample program which builds random JSON and loads into MarkLogic.
  • Read the Spring Batch Cookbook to view some existing programs utilizing SB and MSB.

Benefits

Reusable Components

This project offers reusable ItemReaders, ItemProcessors, ItemWriters, Tasklets, Listeners, and other support classes to quickly create batch processing jobs around MarkLogic.

MarkLogic JobRepository

Spring Batch has the concept of a JobRepository that serves as a persistent mechanism for the metadata generated from running batch processing jobs. This project offers an implementation of the JobRepository using MarkLogic.

To setup the MarkLogicJobRepository, use the mlJobRepo utility to bootstrap a JobRepository using MarkLogic.

Once setup, then your JobConfig must access the required Job Properties to use the MarkLogic JobRepo.

Launching a Job

CommandLineJobRunner

The CommandLineJobRunner allows the launching of a job through a command line Java executable instance.

If you wish to launch a job through an alternative method like a HTTP endpoint or some other trigger, then that is the responsibility of the developer.

Other Projects

  • ml-migration-starter - Starter kit for migrating data from any database into MarkLogic using Spring Batch