Skip to content

Instantly share code, notes, and snippets.

@dimzak
dimzak / main.sql
Last active September 12, 2019 23:36
Useful SQL queries for spring-batch metadata(MySql)
-- select job-time of the last 4 COMPLETED jobs
SELECT TIMESTAMPDIFF(SECOND,START_TIME,END_TIME),batch_job_execution.JOB_INSTANCE_ID from batch_job_execution
where(STATUS='COMPLETED')
order by JOB_EXECUTION_ID DESC LIMIT 4;
--select job-time from COMPLETED jobs named 'csvtoxml' limit:last 4
SELECT TIMESTAMPDIFF(SECOND,START_TIME,END_TIME),
batch_job_execution.JOB_INSTANCE_ID, batch_job_execution.END_TIME
from batch_job_execution
package testclient.cloudkit;
import org.apache.http.HttpEntity;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;