设为首页 收藏本站
查看: 1244|回复: 0

[经验分享] scribe 研究

[复制链接]

尚未签到

发表于 2015-11-28 16:13:41 | 显示全部楼层 |阅读模式
  <!--/* Font Definitions */@font-face{font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;mso-font-charset:2;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:0 268435456 0 0 -2147483648 0;}@font-face{font-family:宋体;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:SimSun;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 135135232 16 0 262145 0;}@font-face{font-family:黑体;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-alt:SimHei;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:1 135135232 16 0 262144 0;}@font-face{font-family:&quot;/@宋体&quot;;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:3 135135232 16 0 262145 0;}@font-face{font-family:&quot;/@黑体&quot;;panose-1:2 1 6 0 3 1 1 1 1 1;mso-font-charset:134;mso-generic-font-family:auto;mso-font-pitch:variable;mso-font-signature:1 135135232 16 0 262144 0;}/* Style Definitions */p.MsoNormal, li.MsoNormal, div.MsoNormal{mso-style-parent:&quot;&quot;;margin:0cm;margin-bottom:.0001pt;text-align:justify;text-justify:inter-ideograph;mso-pagination:none;font-size:10.5pt;mso-bidi-font-size:12.0pt;font-family:&quot;Times New Roman&quot;;mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;}h2{mso-style-next:正文;margin-top:13.0pt;margin-right:0cm;margin-bottom:13.0pt;margin-left:0cm;text-align:justify;text-justify:inter-ideograph;line-height:173%;mso-pagination:lines-together;page-break-after:avoid;mso-outline-level:2;font-size:16.0pt;font-family:Arial;mso-fareast-font-family:黑体;mso-bidi-font-family:&quot;Times New Roman&quot;;mso-font-kerning:1.0pt;font-weight:bold;}h3{mso-style-next:正文;margin-top:13.0pt;margin-right:0cm;margin-bottom:13.0pt;margin-left:0cm;text-align:justify;text-justify:inter-ideograph;line-height:173%;mso-pagination:lines-together;page-break-after:avoid;mso-outline-level:3;font-size:16.0pt;font-family:&quot;Times New Roman&quot;;mso-font-kerning:1.0pt;font-weight:bold;}p.MsoFooter, li.MsoFooter, div.MsoFooter{margin:0cm;margin-bottom:.0001pt;mso-pagination:none;tab-stops:center 207.65pt right 415.3pt;layout-grid-mode:char;font-size:9.0pt;font-family:&quot;Times New Roman&quot;;mso-fareast-font-family:宋体;mso-font-kerning:1.0pt;}a:link, span.MsoHyperlink{mso-ansi-font-size:10.0pt;mso-bidi-font-size:10.0pt;color:blue;mso-text-animation:none;text-decoration:none;text-underline:none;text-decoration:none;text-line-through:none;}a:visited, span.MsoHyperlinkFollowed{color:purple;text-decoration:underline;text-underline:single;}p{mso-margin-top-alt:auto;margin-right:0cm;mso-margin-bottom-alt:auto;margin-left:0cm;mso-pagination:widow-orphan;font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;}tt{mso-ansi-font-size:12.0pt;mso-bidi-font-size:12.0pt;font-family:宋体;mso-ascii-font-family:宋体;mso-fareast-font-family:宋体;mso-hansi-font-family:宋体;mso-bidi-font-family:宋体;}p.postmetadataalt, li.postmetadataalt, div.postmetadataalt{mso-style-name:&quot;postmetadata alt&quot;;mso-margin-top-alt:auto;margin-right:0cm;mso-margin-bottom-alt:auto;margin-left:0cm;mso-pagination:widow-orphan;font-size:12.0pt;font-family:宋体;mso-bidi-font-family:宋体;}/* Page Definitions */@page{mso-page-border-surround-header:no;mso-page-border-surround-footer:no;}@page Section1{size:595.3pt 841.9pt;margin:72.0pt 89.85pt 72.0pt 68.05pt;mso-header-margin:42.55pt;mso-footer-margin:49.6pt;mso-paper-source:0;layout-grid:15.6pt;}div.Section1{page:Section1;}/* List Definitions */@list l0{mso-list-id:1806656946;mso-list-template-ids:-1654743824;}@list l0:level1{mso-level-number-format:bullet;mso-level-text:;mso-level-tab-stop:36.0pt;mso-level-number-position:left;text-indent:-18.0pt;mso-ansi-font-size:10.0pt;font-family:Symbol;}ol{margin-bottom:0cm;}ul{margin-bottom:0cm;}-->scribe 研究- 一种分布式日志系统(facebook


http://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image001.jpg一张scribe结构图
先转一下,留作后用。
Installing Scribe For Log Collection
  Scribeis a newly releasedlogcollection tool that dumps log files from various nodes in a cluster toScribe servers, where the logs are stored for further use. Facebook describestheir usage of Scribe by saying, “[Scribe] runs on thousands of machines andreliably delivers tens of billions of messages a day.” It turns out thatScribe is rather difficult to install, so the hope of this post is to helpthose of you attempting to install Scribe. The first step is to get dependenciesinstalled.
  Dependencies
Scribe has many dependencies that must be installed in order for Scribe to bebuilt properly. They are listed here:

  • ruby(ruby and ruby-dev)
  • python(python and python-dev)
  • libevent(libevent and libevent-dev)
  • boostv1.36
  • Thrift
  • fb303 (included in Thrift incontrib/fb303)
  The order in which these are installed is important.First, you must install libevent, then libevent-dev, then boost, then Thrift,and finally fb303. I installed libevent and libevent-dev from RPMs, whereasboost, Thrift, and fb303 were installed from source. I was unable to getScribe, Thrift, and fb303 to locate the boost libraries and includescorrectly with the default boost install directories, so I installed boost in/usr/local/boost, /usr/local/boost/bin, /usr/local/boost/lib, and/usr/local/boost/include. Run ‘./configure –help’ when configuring boost tosee how to specify these options.
  When configuring Thrift and fb303, you must specify yourlocation of boost with the “–with-boost=/path/to/boost/root” option and alsoset your BOOST_ROOT environment variable.
  Finally, you must make sure your LD_LIBRARY_PATHenvironment variable contains the lib folders that house the Thrift, fb303,boost, and libevent C++ libraries. LD_LIBRARY_PATH follows the same patternas the PATH variable. That is, directories that contain libraries areseparated by colons. If you forget to set your LD_LIBRARY_PATH variable, thenyou’ll get the following error when running scribed:
scribed:error while loading shared libraries: libboost_system-gcc41-mt-1_36.so.1.36.0:cannot open shared object file: No such file or directory
Install Scribe
Once you’ve successfully installed alldependencies, installing Scribe is easy. Scribe ships with a fairlycomprehensive README file, but the instructions involving boost’sconfiguration are slightly incorrect. I needed to pass the“–with-boost=/usr/local/boost” options while configuring. However, the READMEfile says to use “–with-boost /usr/local/boost”. Here is my full configurestatement:
./configure–with-boost=/usr/local/boost –with-boost-system=boost_system-gcc41-mt-1_36–with-boost-filesystem=boost_filesystem-gcc41-mt-1_36
  We installed Scribe from trunk instead ofreleases/scribe-2.0.
Configure Scribe
Scribe ships with a few good examples in$SCRIBE_ROOT/examples; just take a look at the README in the examplesdirectory, and you should be ready to rock. However, the README doesn’tdocument that the scribe_ctrl and scribe_cat programs are in the examplesdirectory.
  I hope this tutorial was helpful! Send us anemailif you have any issues. We’ll make a follow-up post latertalking about more in-depth Scribe configurations and benchmarking.
Tuesday,October 28th, 2008 at 9:13 pm by Alex Loddengaard, filed under datacollection.
转自:
http://www.cloudera.com/blog/2008/10/28/installing-scribe-for-log-collection/

centos 5 安装
在开源ThriftHiveCassandra之后,Facebook于2008年10月29日开源了其分布式日志收集框架Scribe,而且一上来就是stable的2.0版本。Scribe是一个用于分布式收集日志的Thrift服务,Facebook描述它”运行于数以千计的节点之上,每天可靠的发送数以百亿的消息“。

Scribe本身的代码量不大,但安装相当烦琐,本文的安装环境是CentOS 5,其他distribution如Ubuntu的安装类似。Scribe安装的依赖项包括:

* ruby (ruby and ruby-dev)
* python (python and python-dev)
* libevent (libevent and libevent-dev)
* boost 1.36
* thrift
* fb303

首先是安装ruby, python和libevent,这些比较容易,
yum install ruby ruby-devel
yum install python python-devel
yum install libevent libevent-devel

然后是boost,Scribe要求1.36版本,先去boost官方(http://www.boost.org/users/download/)上下一个安装包,如果没装g++,

yum install gcc-c++

假设boost安装的目录为/usr/local/boost

tar xzvf boost_1_36_0.tar.gz
cd boost_1_36_0
./configure --prefix=/usr/local/boost
make install

boost编译需要的时间比较长,安装完boost就可以装Thrift了,注意要先thrift依赖automake,libtool等

yum install automake byacc libtool flex bison
wget -O thrift.tgz&quot;http://gitweb.thrift-rpc.org/?p=thrift.git;a=snapshot;h=HEAD;sf=tgz&quot;
tar -xzf thrift.tgz
cd thrift
./configure --with-boost=/usr/local/boost
make
make install

然后安装fb303,facebook的支持库,源文件在thrift目录下的contrib/fb303
./configure --with-boost=/usr/local/boost
make
make install

终于可以装Scribe了
设置环境变量BOOST_ROOT为boost安装路径
export BOOST_ROOT=/usr/local/boost

设置环境变量LD_LIBRARY_PATH,指定包含Thrift,fb303, boost, libevent的路径
export LD_LIBRARY_PATH=/usr/local/boost/lib::/usr/lib:/usr/local/lib

安装
./configure --with-boost=/usr/local/boost
make
make install

安装后可以试一下scribe自带的例子,在目录examples下。

转自:
http://www.hadoopchina.com/index.php?option=com_content&task=view&id=67&Itemid=39

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-144418-1-1.html 上篇帖子: Scribe配置文件解析 下篇帖子: scribe架构
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表