Skip to content

Instantly share code, notes, and snippets.

View duanjiong's full-sized avatar
👋
Working from home

Duan Jiong duanjiong

👋
Working from home
View GitHub Profile
大数据日知录:架构与算法
跳转至: 导航、 搜索
目录
1 当谈论大数据时我们在谈论什么
2 数据分片与路由
3 数据复制与一致性
4 大数据常用算法与数据结构
5 集群资源管理与调度
6 分布式协调系统
@duanjiong
duanjiong / killtree.sh
Created May 23, 2016 06:55
杀死进程树
#!/bin/bash
killtree() {
local _pid=$1
local _sig=${2:--TERM}
kill -stop ${_pid} # needed to stop quickly forking parent from producing children between child killing and parent killing
for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
killtree ${_child} ${_sig}
done
kill -${_sig} ${_pid}
@duanjiong
duanjiong / bench.go
Created May 23, 2016 02:11
golang benchmark interface
package bench
import (
"bytes"
"encoding/gob"
"encoding/json"
"net"
"testing"
"time"
)