This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.camel.builder.RouteBuilder; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class FileSplitterRoute extends RouteBuilder { | |
@Override | |
public void configure() throws Exception { | |
System.out.println("Configuring camel routes..."); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FilenameFilter; | |
import org.apache.camel.builder.RouteBuilder; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class FilesAggregatorRoute extends RouteBuilder { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.camel.Exchange; | |
import org.apache.camel.processor.aggregate.AggregationStrategy; | |
import org.codehaus.jettison.json.JSONArray; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class FileAggregationStrategy implements AggregationStrategy { | |
@Override | |
public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jobDefinitions": [ | |
{ | |
"jobDefinitionName": "splitter-jd", | |
"jobDefinitionArn": "arn:aws:batch:us-east-1:<YOUR-AWS-ACCOUNT-NUMBER>:job-definition/splitter-jd:1", | |
"revision": 1, | |
"status": "ACTIVE", | |
"type": "container", | |
"parameters": {}, | |
"containerProperties": { |