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