Merge branch 'script_gj' into 'master'

update

See merge request !569
This commit is contained in:
2023-03-09 14:17:16 +08:00
@@ -58,7 +58,7 @@ class BigdataForsaleBatch extends BaseBatch{
}
public static final String[] TAGS = ["独栋", "联排", "叠加", "双拼", "花园面积", "泳池", "别墅", "带花园", "洋房", "叠拼", "独院", "联体", "微墅", "大平墅"];
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(60)
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1)
public static ExecutorService fixedThreadPool2 = Executors.newFixedThreadPool(200)
@@ -78,6 +78,7 @@ class BigdataForsaleBatch extends BaseBatch{
//目前查询库中是否已存在,用的是Oracle
def index = 0
def citys = CcbCommonUtils.getRunningCitys(args)
citys = ["迪庆州"]
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
@@ -152,8 +153,8 @@ class BigdataForsaleBatch extends BaseBatch{
for(def i=0;i<districts.size();i++){
final def rMap = districts[i];
fixedThreadPool.execute(new Runnable() {
void run() {
// fixedThreadPool.execute(new Runnable() {
// void run() {
try {
totalCount.addAndGet(1)
def commId = rMap.get("_id").toString()
@@ -209,8 +210,8 @@ class BigdataForsaleBatch extends BaseBatch{
} finally {
latch.countDown()
}
};
})
// };
// })
}
latch.await()
return retMap
@@ -1105,11 +1106,11 @@ class BigdataForsaleBatch extends BaseBatch{
// 创建布隆过滤器对象
BloomFilter<CharSequence> filter = BloomFilter.create(Funnels.stringFunnel(StandardCharsets.UTF_8), 200000000, 0.000001);
// def houseIds = new HashSet()
pgsqlInstance.eachRow("SELECT gujia_sell_id FROM base.t0831_bigdata_forsale_gj_h",{it->
pgsqlInstance.eachRow("SELECT gujia_sell_id FROM base.t0831_bigdata_forsale_gj_h where urbn_id='533400'",{it->
filter.put(it.gujia_sell_id)
});
pgsqlInstance.eachRow("SELECT gujia_sell_id FROM base.t0831_bigdata_forsale_gj_h_2021",{it->
pgsqlInstance.eachRow("SELECT gujia_sell_id FROM base.t0831_bigdata_forsale_gj_h_2021 where urbn_id='533400'",{it->
filter.put(it.gujia_sell_id)
});
return filter;