[置顶] c++ 函数库查询

摘要: http://www.cplusplus.com/reference/algorithm/http://www.enet.com.cn/eschool/video/c++/ 阅读全文

posted @ 2015-07-09 19:01 雨渐渐 阅读(1317) 评论(0) 推荐(0) 编辑

[置顶] python 文档

摘要: python 文档 https://docs.python.org/2/library/index.html 阅读全文

posted @ 2014-04-03 17:13 雨渐渐 阅读(261) 评论(0) 推荐(0) 编辑

2016年2月16日

top-N 抽样

 

 

 

 
1, 使用hive标记random:(如果是mr,就自己标记random值)
use ps;
set mapred.job.priority=VERY_HIGH;
set mapred.job.map.capcity=300;
set mapred.reduce.tasks=200;
 
insert overwrite directory "*"
select url, count(1), min(link_found_time), rand()
from entry
where *='20151106'
group by url;
 
2, 数据抽样:
在各个分区各使用小顶推实现top-N,
 
3, 得到top-N
TopN:使用小顶堆实现。
 

 

posted @ 2016-02-16 13:16 雨渐渐 阅读(211) 评论(0) 推荐(0) 编辑

2016年2月2日

c++ 类的堆成员的声明及使用

摘要: _reg = new boost::regex("aoe "); boost::regex_search(line, what, *_reg) 阅读全文

posted @ 2016-02-02 11:00 雨渐渐 阅读(285) 评论(0) 推荐(0) 编辑

2016年1月29日

c 时间转移函数

摘要: /* @param date @param formart of date @return time_t @author yangqijun@outlook.com */ time_t strtotime(char* const date,char* const format="%Y%m%d%H%M 阅读全文

posted @ 2016-01-29 14:53 雨渐渐 阅读(221) 评论(0) 推荐(0) 编辑

shell md5sum

摘要: md5sum out.a echo "fd_limit=(ulimitn),fdused=(ll /proc/4741/fd | wc -l)" 需找句柄,及fd使用情况 阅读全文

posted @ 2016-01-29 14:03 雨渐渐 阅读(672) 评论(0) 推荐(0) 编辑

2015年12月29日

hadoop 动态调整mapred参数

摘要: bin/hadoop job -set-reduce-capacity job_20151126032920_1142443 1000 调成map数bin/hadoop job -set-priority job_20151126032920_1160549 VERY_HIGH ... 阅读全文

posted @ 2015-12-29 11:09 雨渐渐 阅读(1492) 评论(0) 推荐(0) 编辑

2015年12月19日

python 遍历hadoop, 跟指定列表对比 包含列表中值的取出。

摘要: import sysimport tstreefname = 'high_freq_site.list'tree = tstree.TernarySearchTrie()tree.loadData(fname)token = ''counter = 0post = []# url, count, p... 阅读全文

posted @ 2015-12-19 04:25 雨渐渐 阅读(746) 评论(0) 推荐(0) 编辑

2015年12月16日

replay的意义

摘要: 数据库重放: (1) 在测试环境中重新创建实际的生产数据库工作量。 (2) 在生产中实施更改之前,确定和分析潜在的不稳定性。 (3) 捕获生产中的工作量: 阅读全文

posted @ 2015-12-16 15:04 雨渐渐 阅读(256) 评论(0) 推荐(0) 编辑

2015年12月11日

c++ 异常 warning: 'MEMORY_UNIT_NAME' defined but not used

摘要: 是开关的问题 , 将 #-g -O2 -pipe -W -Wall -Werror -fPIC -Wno-deprecated c++ 去掉。不检查。 阅读全文

posted @ 2015-12-11 17:35 雨渐渐 阅读(592) 评论(0) 推荐(0) 编辑

2015年12月8日

c++ 异常 discards qualifiers 丢弃

摘要: src/feedbackservice.cpp:76: error: passing `const ps::spider::urlreceiver::entry::ConfigManager' as `this' argument of `int ps::spider::urlreceiver::e... 阅读全文

posted @ 2015-12-08 20:25 雨渐渐 阅读(1581) 评论(0) 推荐(0) 编辑

c++ 条件变量

摘要: 1.条件变量创建静态创建:pthread_cond_t cond=PTHREAD_COND_INITIALIZER;动态创建:pthread_cond _t cond; pthread_cond_init(&cond,NULL);其中的第二个参数NULL表示条件变量的属性,虽然POSIX中定义了条... 阅读全文

posted @ 2015-12-08 13:51 雨渐渐 阅读(3917) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示