- 明确哪个agent出现了问题。
- 查看这个agent的哪个channel发生了问题。
ps aux | grep <这个agent的名字>
,kill -15 <pid>
停掉这个agent。- 确认agent停掉后(ps aux | grep不到),调大对应agent中对应channel的sink.batchSize,但不能>=2000。配置文件位置
:~/local/flume/flume-ng/conf/<agent>/<pkg_name>.properties
cat ~/local/flume/flume-ng/start.sh
后,找到对应agent的启动命令。比如Main的agent:nohup bin/flume-ng agent --conf conf/main --conf-file conf/main/Main.properties --name Main -Dflume.monitoring.type=http -Dflume.monitoring.port=30005 > /dev/null 2>&1 </dev/null &
- 用这个命令启动这个agent。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from subprocess import check_call | |
filenames = list(os.walk("."))[0][2] | |
for filename in filenames: | |
if filename.endswith(".java"): | |
classname = filename.partition(".java")[0] | |
check_call(["git", "add", filename]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Gemfile b/Gemfile | |
index 195de7b..84bb745 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -164,7 +164,7 @@ gem "jquery-ui-rails", "2.0.2" | |
gem "raphael-rails", "~> 2.1.2" | |
gem 'bootstrap-sass', '~> 3.0' | |
gem "font-awesome-rails", '~> 3.2' | |
-gem "gitlab_emoji", "~> 0.0.1.1" | |
+gem "gemoji", "~> 1.3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/env/python | |
# coding: utf-8 | |
from subprocess import check_output, PIPE, Popen | |
import sys | |
import re | |
BADREV = "0000000000000000000000000000000000000000" |
(a)
- ExtractMin: 堆顶元素依然是最小值,取出后Heapify一次。时间复杂度:O(logdn*d(注意logdn中d是底数)
- DecreaseKey:减少一个节点的值可能使这个值比它的父亲更小,需要递归的与它当前的父亲比较和交换,直到当前父亲的值更小。时间复杂度O(logdn)
- Heapify:比较当前子堆的堆顶是否比它的儿子小,若不是就将它最小的儿子交换,递归下去。时间复杂度:O(logdn*d)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import os | |
class M15(object): | |
'''Every 15mins data''' | |
def __init__(self): | |
self.size = 0 |