Search in sources :

Example 16 with ExecutionContext

use of org.springframework.batch.item.ExecutionContext in project pinpoint by naver.

the class DefaultDivider method divide.

@Override
public Map<String, ExecutionContext> divide(String partitionNamePrefix, String batchName) {
    Map<String, ExecutionContext> mapContext = new HashMap<>();
    ExecutionContext emptyExecutionContext = new ExecutionContext();
    mapContext.put(partitionNamePrefix + 1, emptyExecutionContext);
    return mapContext;
}
Also used : ExecutionContext(org.springframework.batch.item.ExecutionContext) HashMap(java.util.HashMap)

Example 17 with ExecutionContext

use of org.springframework.batch.item.ExecutionContext in project jvarkit by lindenb.

the class VcfPartitioner method partition.

@Override
public Map<String, ExecutionContext> partition(final int gridSize) {
    LOG.info("creating partition for gridsize=" + gridSize);
    final Map<String, ExecutionContext> map = new HashMap<>(gridSize);
    for (int i = 0; i < 10; i++) {
        final ExecutionContext exec = new ExecutionContext();
        exec.put("contig", i);
        map.put(String.valueOf(i), exec);
    }
    return map;
}
Also used : ExecutionContext(org.springframework.batch.item.ExecutionContext) HashMap(java.util.HashMap)

Aggregations

ExecutionContext (org.springframework.batch.item.ExecutionContext)17 Test (org.junit.Test)6 StepExecution (org.springframework.batch.core.StepExecution)5 HashMap (java.util.HashMap)4 Rule (com.navercorp.pinpoint.web.alarm.vo.Rule)2 AlarmServiceImpl (com.navercorp.pinpoint.web.service.AlarmServiceImpl)2 LinkedList (java.util.LinkedList)2 Line (org.baeldung.taskletsvschunks.model.Line)2 Resource (org.springframework.core.io.Resource)2 DefaultDivider (com.navercorp.pinpoint.batch.common.DefaultDivider)1 AlarmDao (com.navercorp.pinpoint.web.dao.AlarmDao)1 WebhookSendInfoDao (com.navercorp.pinpoint.web.dao.WebhookSendInfoDao)1 AbstractTest (cz.mzk.recordmanager.server.AbstractTest)1 LongValueRowMapper (cz.mzk.recordmanager.server.jdbc.LongValueRowMapper)1 SAMSequenceDictionary (htsjdk.samtools.SAMSequenceDictionary)1 CloserUtil (htsjdk.samtools.util.CloserUtil)1 IOUtil (htsjdk.samtools.util.IOUtil)1 StringUtil (htsjdk.samtools.util.StringUtil)1 SAMSequenceDictionaryExtractor (htsjdk.variant.utils.SAMSequenceDictionaryExtractor)1 VariantContext (htsjdk.variant.variantcontext.VariantContext)1