+11
-10
@@ -18,9 +18,9 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
class PoiWash {
|
||||
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
DBCollection MAPPOI_CONN = MongoUtils.getCollectionByName2("fangjia", "map_poi_all_8", MAP_POI_URL)
|
||||
DBCollection MAPPOI_CONN = MongoUtils.getCollectionByName2("fangjia", "map_poi_all", MAP_POI_URL)
|
||||
|
||||
DBCollection MAPPOI_CONN2 = MongoUtils.getCollectionByName2("fangjia", "map_poi_all", MAP_POI_URL)
|
||||
// DBCollection MAPPOI_CONN2 = MongoUtils.getCollectionByName2("fangjia", "map_poi_all", MAP_POI_URL)
|
||||
|
||||
DBCollection TOWNSHIP_CONN = MongoUtils.getCollectionByName2("fangjia", "township", MAP_POI_URL)
|
||||
|
||||
@@ -31,11 +31,12 @@ class PoiWash {
|
||||
|
||||
static main(args) {
|
||||
def task = new PoiWash()
|
||||
task.updateId()
|
||||
// task.run()
|
||||
// task.updateId()
|
||||
task.run()
|
||||
// task.synch()
|
||||
task.check()
|
||||
|
||||
// task.checkSpecialSymbols()
|
||||
task.synch()
|
||||
// task.check()
|
||||
}
|
||||
|
||||
def updateId(){
|
||||
@@ -155,8 +156,8 @@ class PoiWash {
|
||||
def count = results.size()
|
||||
for(def i=0;i<results.size();i++){
|
||||
def map = results[i]
|
||||
// fixedThreadPool.execute(new Runnable() {
|
||||
// void run() {
|
||||
fixedThreadPool.execute(new Runnable() {
|
||||
void run() {
|
||||
try{
|
||||
totalCount.addAndGet(1)
|
||||
def newAddr = washing(map)
|
||||
@@ -172,8 +173,8 @@ class PoiWash {
|
||||
} finally {
|
||||
latch.countDown()
|
||||
}
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
latch.await()
|
||||
|
||||
Reference in New Issue
Block a user