zhihu / kids Goto Github PK
View Code? Open in Web Editor NEWKids Is Data Stream
License: Other
Kids Is Data Stream
License: Other
we are investigating kids system, looks quite promising. just wondering if data compression supported when agents sending data to another agent/server?
since log data probably contains quite a lot duplicated msg, I think data compression would be very helpful.
thanks!
int ret = fread(data, size, 1, file_);
if (size == 0 || ret == 0) return false;
if (ret == -1) {}
上面是你的filesystem.cc的代码,这段代码有错误,fread不会返回-1,当返回0的时候应该用feof,ferror来检测是什么原因导致返回的数目比1少,发生错误到关闭
引用下面这段话:
RETURN VALUE
fread and fwrite return the number of items successfully read or written (i.e., not the number of
characters). If an error occurs, or the end-of-file is reached, the return value is a short item
count (or zero).
fread does not distinguish between end-of-file and error, and callers must use feof(3) and ferror(3)
to determine which occurred.
master在PutMessage的时候,是这样的:
for (auto it : workers_) {
it->AddNotify(worker_id);
}
这样就对msg_wait_to_notify_[worker_id]增加了4次。
请问为啥不是wokers[worker_Id]->AddNofify(),只对msg_wait_to_notify_加1 ?
麻烦大神给讲解一下,有点看不懂了。 :-)
const Buffer& Buffer::operator=(const Buffer& other) {
Free();
ShallowCopy(other);
return *this;
}
你好,请问这个函数是否没有考虑 a=a这种自我赋值的情况呢
有相关的性能测试么?
RT
Here's the error message.
➜ kids git:(master) sudo docker build -t zhihu/kids . [sudo] password for tobe: [18/131]
Sending build context to Docker daemon 2.293 MB
Sending build context to Docker daemon
Step 0 : FROM debian:wheezy
Pulling repository debian
479215127fa7: Download complete
511136ea3c5a: Download complete
1aeada447715: Download complete
---> 479215127fa7
Step 1 : MAINTAINER Li Yichao <[email protected]>
---> Running in 5ce60c1353ee
---> a1eeb46c4294
Removing intermediate container 5ce60c1353ee
Step 2 : RUN apt-get update && apt-get install -yq --no-install-recommends build-essential libtool automake
---> Running in 59f4d348c2c7
Get:1 http://security.debian.org wheezy/updates Release.gpg [836 B]
Get:2 http://security.debian.org wheezy/updates Release [102 kB]
Get:3 http://http.debian.net wheezy Release.gpg [1655 B]
Get:4 http://security.debian.org wheezy/updates/main amd64 Packages [291 kB]
Get:5 http://http.debian.net wheezy-updates Release.gpg [836 B]
Get:6 http://http.debian.net wheezy-updates Release [124 kB]
Ign http://http.debian.net wheezy Release
Get:7 http://http.debian.net wheezy/main amd64 Packages [7625 kB]
Get:8 http://http.debian.net wheezy-updates/main amd64 Packages [3329 B]
Fetched 8148 kB in 47s (172 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
The following extra packages will be installed:
autoconf autotools-dev binutils bzip2 cpp cpp-4.7 dpkg-dev file g++ g++-4.7
gcc gcc-4.7 libc-dev-bin libc6-dev libclass-isa-perl libdpkg-perl libgdbm3
libgmp10 libgomp1 libitm1 libmagic1 libmpc2 libmpfr4 libquadmath0
libstdc++6-4.7-dev libswitch-perl libtimedate-perl linux-libc-dev m4 make
patch perl perl-modules
Suggested packages:
autoconf2.13 autoconf-archive gnu-standards autoconf-doc gettext
binutils-doc bzip2-doc cpp-doc gcc-4.7-locales debian-keyring g++-multilib
g++-4.7-multilib gcc-4.7-doc libstdc++6-4.7-dbg gcc-multilib manpages-dev
automake1.9 flex bison gdb gcc-doc gcc-4.7-multilib libmudflap0-4.7-dev
libgcc1-dbg libgomp1-dbg libitm1-dbg libquadmath0-dbg libmudflap0-dbg
libcloog-ppl0 libppl-c2 libppl7 binutils-gold glibc-doc libstdc++6-4.7-doc
libtool-doc automaken gfortran fortran95-compiler gcj make-doc ed
diffutils-doc perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl
libpod-plainer-perl
Recommended packages:
fakeroot libalgorithm-merge-perl libfile-fcntllock-perl libltdl-dev
The following NEW packages will be installed:
autoconf automake autotools-dev binutils build-essential bzip2 cpp cpp-4.7
dpkg-dev file g++ g++-4.7 gcc gcc-4.7 libc-dev-bin libc6-dev
libclass-isa-perl libdpkg-perl libgdbm3 libgmp10 libgomp1 libitm1 libmagic1
libmpc2 libmpfr4 libquadmath0 libstdc++6-4.7-dev libswitch-perl
libtimedate-perl libtool linux-libc-dev m4 make patch perl perl-modules
0 upgraded, 36 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.3 MB of archives.
After this operation, 135 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
libgdbm3 libgmp10 libgomp1 libitm1 libmpfr4 libquadmath0 libmpc2 bzip2
libclass-isa-perl perl-modules perl libswitch-perl m4 patch autoconf
autotools-dev automake binutils libc-dev-bin libc6-dev cpp-4.7 cpp gcc-4.7
gcc libstdc++6-4.7-dev g++-4.7 g++ make libtimedate-perl build-essential
libtool
E: There are problems and -y was used without --force-yes
2015/01/04 10:53:28 The command [/bin/sh -c apt-get update && apt-get install -yq --no-install-recommends build-essential libtool automake] returned a non-zero code: 255
Hi there,
We don't have support for redis command PUNSUBSCRIBE
, so there is not really a way to unsubscribe patterns except reconnecting to KIDS. I would like to submit a PR to fix this issue.
Cheers,
Andy
[root@localhost kids]# docker build -t zhihu/kids .
Sending build context to Docker daemon 1.031 MB
Sending build context to Docker daemon
Step 0 : FROM debian:wheezy
---> b3d362b23ec1
Step 1 : MAINTAINER Li Yichao [email protected]
---> Using cache
---> ea4ce3653add
Step 2 : COPY ./docker/sources.list /etc/apt/sources.list
---> Using cache
---> ffe4209fc1a8
Step 3 : RUN apt-get update && apt-get install -y --no-install-recommends build-essential libtool automake
---> Using cache
---> fa15d470609a
Step 4 : WORKDIR /kids
---> Using cache
---> b79173be6352
Step 5 : COPY . /kids
---> Using cache
---> 2bcbbeb3db40
Step 6 : RUN ./autogen.sh && ./configure && make
---> Running in 6b3b4fff6928
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autoreconf: configure.ac: tracing autoreconf: configure.ac: adding subdirectory deps/ae to autoreconf autoreconf: Entering directory
deps/ae'
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:9: installing ./ar-lib' configure.ac:3: installing
./install-sh'
configure.ac:3: installing ./missing' Makefile.am: installing
./depcomp'
autoreconf: Leaving directory deps/ae' configure.ac:15: installing
./compile'
configure.ac:19: installing ./config.guess' configure.ac:19: installing
./config.sub'
configure.ac:4: installing ./install-sh' configure.ac:4: installing
./missing'
src/Makefile.am: installing ./depcomp' configure.ac:83: required file
doc/Makefile.in' not found
configure.ac:83: required file `test/Makefile.in' not found
Makefile.am:1: required directory ./doc does not exist
Makefile.am:1: required directory ./test does not exist
autoreconf: automake failed with exit status: 1
INFO[0010] The command [/bin/sh -c ./autogen.sh && ./configure && make] returned a non-zero code: 1
kids version is: 1.0.0
*.conf file is like this:
...
store file {
path /data/kids/logs/[topic];
name [date].log;
flush 5s;
}
...
when start kids, I met:
2016/11/07 19:34:43 [FATAL] Parse config file error
Unkonw store field(19): flush 5s
could someone give me help, tks.
我尝试使用了NetworkStore将kids的数据转发到logstash上,但是没有成功。
void Worker::Stop() {
eventl_->stop = 1;
void *ret;
pthread_join(tid_, &ret);
}
大神,可以请教个问题吗,我看多线程访问了ae_loop的stop变量,不是需要把stop变量加个volatile防止编译器从寄存器里读取值导致死循环吗
Currently we have to re-build the docker image manual. I think it would better to provide the official image so that I can simply run docker run -d -p 3388:3388 zhihu/kids
.
Tencent Cloud Ubuntu Server 18.04.1 LTS 64
ubuntu@VM-0-17-ubuntu:~/kids$ sudo docker build -t zhihu/kids .
Sending build context to Docker daemon 2.438MB
Step 1/9 : FROM debian:wheezy
wheezy: Pulling from library/debian
2b15b7abe8b3: Pull complete
Digest: sha256:2259b099d947443e44bbd1c94967c785361af8fd22df48a08a3942e2d5630849
Status: Downloaded newer image for debian:wheezy
---> 10fcec6d95c4
Step 2/9 : MAINTAINER Li Yichao [email protected]
---> Running in 580c463c606e
Removing intermediate container 580c463c606e
---> 7ebb705db8ce
Step 3/9 : COPY ./docker/sources.list /etc/apt/sources.list
---> 4ef49fd0a7c6
Step 4/9 : RUN apt-get update && apt-get install -y --no-install-recommends build-essential libtool automake
---> Running in fe6def64cffc
Ign http://http.us.debian.org wheezy Release.gpg
Ign http://mirrors.163.com wheezy Release.gpg
Ign http://mirrors.163.com wheezy-proposed-updates Release.gpg
Ign http://mirrors.163.com wheezy/updates Release.gpg
Ign http://mirrors.163.com wheezy Release
Ign http://mirrors.163.com wheezy-proposed-updates Release
Ign http://mirrors.163.com wheezy/updates Release
Ign http://http.us.debian.org wheezy Release
Ign http://security.debian.org wheezy/updates Release.gpg
Ign http://security.debian.org wheezy/updates Release
Err http://security.debian.org wheezy/updates/contrib amd64 Packages
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
Err http://security.debian.org wheezy/updates/contrib amd64 Packages
Err http://http.us.debian.org wheezy/main amd64 Packages
404 Not Found [IP: 208.80.154.15 80]
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
Err http://security.debian.org wheezy/updates/main amd64 Packages
Err http://security.debian.org wheezy/updates/contrib amd64 Packages
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
Err http://security.debian.org wheezy/updates/main amd64 Packages
404 Not Found
Err http://http.us.debian.org wheezy/contrib amd64 Packages
404 Not Found [IP: 208.80.154.15 80]
Err http://security.debian.org wheezy/updates/contrib amd64 Packages
404 Not Found
Err http://http.us.debian.org wheezy/non-free amd64 Packages
404 Not Found [IP: 208.80.154.15 80]
Err http://security.debian.org wheezy/updates/non-free amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy/main Sources
404 Not Found
Err http://mirrors.163.com wheezy/non-free Sources
404 Not Found
Err http://mirrors.163.com wheezy/contrib Sources
404 Not Found
Err http://mirrors.163.com wheezy/main amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy/non-free amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy/contrib amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy-proposed-updates/main Sources
404 Not Found
Err http://mirrors.163.com wheezy-proposed-updates/contrib Sources
404 Not Found
Err http://mirrors.163.com wheezy-proposed-updates/non-free Sources
404 Not Found
Err http://mirrors.163.com wheezy-proposed-updates/main amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy-proposed-updates/contrib amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy-proposed-updates/non-free amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy/updates/main Sources
404 Not Found
Err http://mirrors.163.com wheezy/updates/contrib Sources
404 Not Found
Err http://mirrors.163.com wheezy/updates/non-free Sources
404 Not Found
Err http://mirrors.163.com wheezy/updates/main amd64 Packages
404 Not Found
Err http://mirrors.163.com wheezy/updates/contrib amd64 Packages
404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/main/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/non-free/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/contrib/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/non-free/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy/contrib/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy-proposed-updates/main/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy-proposed-updates/contrib/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy-proposed-updates/non-free/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy-proposed-updates/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy-proposed-updates/contrib/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian/dists/wheezy-proposed-updates/non-free/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian-security/dists/wheezy/updates/main/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian-security/dists/wheezy/updates/contrib/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian-security/dists/wheezy/updates/non-free/source/Sources 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian-security/dists/wheezy/updates/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian-security/dists/wheezy/updates/contrib/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://mirrors.163.com/debian-security/dists/wheezy/updates/non-free/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://http.us.debian.org/debian/dists/wheezy/main/binary-amd64/Packages 404 Not Found [IP: 208.80.154.15 80]
W: Failed to fetch http://http.us.debian.org/debian/dists/wheezy/contrib/binary-amd64/Packages 404 Not Found [IP: 208.80.154.15 80]
W: Failed to fetch http://http.us.debian.org/debian/dists/wheezy/non-free/binary-amd64/Packages 404 Not Found [IP: 208.80.154.15 80]
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/main/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/contrib/binary-amd64/Packages 404 Not Found
W: Failed to fetch http://security.debian.org/dists/wheezy/updates/non-free/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
Err http://mirrors.163.com wheezy/updates/non-free amd64 Packages
404 Not Found
The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends build-essential libtool automake' returned a non-zero code: 100
kids是否有做详细的性能测试分析?我在两台内网机器上分别部署了kids,一台做agent,另一台做server,agent端跑echo2kids程序,server端跑subscribe程序,agent端内存不停地往上飙,CPU占100%~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.