if (results == null || (results != null && results.size() == 0))
return;
resultPool = results.get(results.size() - 1);
WriteLock writeLock = job.getTrunkLock().writeLock();
try
{
if (writeLock.tryLock(10, TimeUnit.MINUTES))
{
try
{
Map<String, Map<String, Object>> jobResult = job.getJobResult();
if (jobResult != null)
jobResult.clear();
jobResult = null;
job.setJobResult(resultPool);
job.getEpoch().set(Integer.valueOf(1));
logger.warn("success load data to jobTrunk.");
}
finally
{
writeLock.unlock();
}
}
else
{
logger.error("loadData error, can't get writeLock! ");