05 2015 档案

hadoop 技巧
摘要:通过--config指定不同的集群bin/hadoop --config ./conf_time/ dfs -ls /user/rd/*/for_*/ip_table/output/rd下是都读写权限的组合多个文件hadoop fs -getmerge /user/hadoop/output loc... 阅读全文

posted @ 2015-05-28 19:25 雨渐渐 阅读(114) 评论(0) 推荐(0) 编辑

shell $变量
摘要:$0:当前脚本的文件名$num:num为从1开始的数字,$1是第一个参数,$2是第二个参数,${10}是第十个参数$#:传入脚本的参数的个数$*:所有的位置参数(作为单个字符串)$@:所有的位置参数(每个都作为独立的字符串)。$?:当前shell进程中,上一个命令的返回值,如果上一个命令成功执行则$... 阅读全文

posted @ 2015-05-19 20:54 雨渐渐 阅读(169) 评论(0) 推荐(0) 编辑

c++ linux 下的调试工具及用法
摘要:1当程序出现core的时候:gdb out[your program] core.out.45726.1431954543 可以看到程序崩溃时候的堆栈信息。2 valgrind ./out 由于valgrind 默认检查 memery check较完整的命令:valgrind --tool=me... 阅读全文

posted @ 2015-05-19 14:39 雨渐渐 阅读(217) 评论(0) 推荐(0) 编辑

内存工具
摘要:http://www.doc88.com/p-9949431121835.html 阅读全文

posted @ 2015-05-16 03:48 雨渐渐 阅读(72) 评论(0) 推荐(0) 编辑

条件变量
摘要:http://my.oschina.net/kiterunner24/blog/271611 阅读全文

posted @ 2015-05-15 19:24 雨渐渐 阅读(92) 评论(0) 推荐(0) 编辑

segment fault
摘要:http://blog.chinaunix.net/uid-23069658-id-3959636.html 阅读全文

posted @ 2015-05-15 18:53 雨渐渐 阅读(124) 评论(0) 推荐(0) 编辑

shell dev null 是什么
摘要:1:在不想把标准输出和标准出错信息输出到控制台,也不想重定向到文件时经常使用 2:不能忽略其读入功能。从/dev/null读入时都是0 3:系统的垃圾桶,类似于Windows的回收站,不同的是这个设备有去无回,而回收站还是可以回收的。如果程序有输出(标准、错误等),而你又不想让它输出到任何文件、终端... 阅读全文

posted @ 2015-05-13 12:21 雨渐渐 阅读(327) 评论(0) 推荐(0) 编辑

c++ break while
摘要:#include #include #include #include "destory_free_while.h"using namespace std;Worker::Worker() { shutdown = false; num_thread = 10;}void Worker:... 阅读全文

posted @ 2015-05-12 11:14 雨渐渐 阅读(606) 评论(0) 推荐(0) 编辑

C+= concurrent_queue 线程安全测试
摘要:更推荐使用:http://www.boost.org/doc/libs/1_56_0/doc/html/boost/lockfree/queue.html#include #include #include using namespace std;#define NUM_THREAD 10class... 阅读全文

posted @ 2015-05-08 13:23 雨渐渐 阅读(615) 评论(0) 推荐(0) 编辑

c++ 枚举 在函数中的应用
摘要:#include using namespace std;enum RespErrNo { SUCCESS = 0, INVALID_URL = 1, INVALID_SRC_ID = 2};RespErrNo fun(){ return INVALID_URL;}int m... 阅读全文

posted @ 2015-05-07 22:34 雨渐渐 阅读(628) 评论(0) 推荐(1) 编辑

shell脚本积累
摘要:统计当前目录下文件夹的大小for d in $(ls)do du -sh ./$ddone获取之前日期date +"%Y%m%d" -d "-n days"也可以这样写date -d '-6 days' +%Y%m%ddate +"%Y%m%d" -d "-6 days" http://www... 阅读全文

posted @ 2015-05-06 18:14 雨渐渐 阅读(223) 评论(0) 推荐(0) 编辑

c++ 读写锁
摘要:#ifndef THREAD_UTIL_H#define THREAD_UTIL_H#include namespace spider { class AutoLock { pthread_mutex_t * _lock; public: AutoLock(p... 阅读全文

posted @ 2015-05-04 23:36 雨渐渐 阅读(12961) 评论(0) 推荐(1) 编辑

布衣客
摘要:http://buyiker.com/龙潭斋 http://techlog.cn/html/index.php 阅读全文

posted @ 2015-05-04 10:51 雨渐渐 阅读(127) 评论(0) 推荐(0) 编辑

导航