品牌单没法展示排查

排查过程:sql

1,查看单子是否在内存中; satool 登陆线上机器less

for campid in 164890874 164888366 164690854 163607808 162845617 162844063 ; do
echo $campid ;
grep $campid campaign_list.txt |wc -l
done
结果:都在内存生效

2,设备求交集,查看设备重合度oop

2.1 获取设备google

下载设备到本地文件unix

for campid in 164890874 164888366 164690854 163607808 162845617 162844063 ; do
echo $campid ;
query_campaign $campid > "$campid"
devid=`cat "$campid" |grep deviceId |awk -F"\"" '{print $4}' `
wget $devid
done

 

3,将设备上传到s3 进行计算 code

aws s3 cp file   s3://mob-emr-test/shenlei.zhong/tmp_job/imp/info内存

4,hive 查询:hadoop

sql="use adn_dsp ; select dev.devid ,req.googleadid from dsp_dev.devid as dev left join
(select googleadid from
log_adn_dsp_request_hour where concat ( yr,mt,dt)= '20170807' and countrycode = 'KR' group by googleadid ) as req on( dev.devid = req.googleadid ) ;"
hive -e "$sql" > count.out文档

5, 导出韩国某天全部设备get

34.226.89.5机器

sql="use adn_dsp ; select dev.devid ,req.googleadid from dsp_dev.devid as dev left join
(select googleadid from
log_adn_dsp_request_hour where concat ( yr,mt,dt)= '20170807' and countrycode = 'KR' group by googleadid ) as req on( dev.devid = req.googleadid ) ;"

sql="use adn_dsp ; INSERT OVERWRITE DIRECTORY 's3://emr-test/ha/cpcm-dev/kr-devids.txt'
select googleadid from
log_adn_dsp_request_hour where concat ( yr,mt,dt)= '20170807' and countrycode = 'KR' group by googleadid ;"

hive -e "$sql" >kr-req-devids.txt

6,韩国设备导出到本地

hadoop fs -getmerge  s3://emr-test/hao/cpcm-dev/kr-devids.txt/    devid.txt

7, 设备计算交集

cat xxx.txt |sort -u > 1

cat  1  krdev.txt   |sort |uniq -c |awk -F"  " '$1 >1 '

获取交集

cat  1  krdev.txt   |sort |uniq -c |awk -F"  " '$1 >1 ' |wc -l

8,能够先去devIdList.txt查看生成的设备列表

/data/model_update/model_from_rsync

grep    162844063   devIdList.txt  |less 

9,设备列表格式转换

notepad++ 编辑 里面 文档格式转换  选择unix格式

从新上传设备列表

 

10, s3词表同步

aws s3 cp      s3://mob-dict/beijing/dsp/  .    --recursive   &

相关文章
相关标签/搜索