diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy index e313fe216..4a7adf2b1 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy @@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicLong @BatchOwner(Watcher.GaoJuan) class GaoDePoiDataProcess extends BaseBatch{ - public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20) + public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(5) static main(args) { runBatch(new GaoDePoiDataProcess(), args) @@ -43,8 +43,7 @@ class GaoDePoiDataProcess extends BaseBatch{ def results = CommonDatautils.findAmapDetailBySql(city) println results.size() def rows = running(results) - save(rows) - println city + " 完成"+new Date().toString() + save(city, rows) } } @@ -132,7 +131,7 @@ class GaoDePoiDataProcess extends BaseBatch{ return map } - def save(rows){ + def save(city,rows){ BulkRequest request = new BulkRequest(); int batchSize = 1000; int processedCount = 0; @@ -172,7 +171,7 @@ class GaoDePoiDataProcess extends BaseBatch{ } } - println "结束时间 "+new Date() + println "[${city}] 结束时间 "+new Date() }