| 301 |
ashish |
1 |
Introduction
|
|
|
2 |
============
|
|
|
3 |
|
|
|
4 |
Scribe is a server for aggregating log data that's streamed in real
|
|
|
5 |
time from clients. It is designed to be scalable and reliable.
|
|
|
6 |
|
|
|
7 |
See the Scribe Wiki for documentation:
|
|
|
8 |
http://wiki.github.com/facebook/scribe
|
|
|
9 |
|
|
|
10 |
Keep up to date on Scribe development by joining the Scribe Discussion Group:
|
|
|
11 |
http://groups.google.com/group/scribe-server/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
License (See LICENSE file for full license)
|
|
|
15 |
===========================================
|
|
|
16 |
Copyright 2007-2008 Facebook
|
|
|
17 |
|
|
|
18 |
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
19 |
you may not use this file except in compliance with the License.
|
|
|
20 |
You may obtain a copy of the License at
|
|
|
21 |
|
|
|
22 |
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
23 |
|
|
|
24 |
Unless required by applicable law or agreed to in writing, software
|
|
|
25 |
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
26 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
27 |
See the License for the specific language governing permissions and
|
|
|
28 |
limitations under the License.
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
Heirarchy
|
|
|
32 |
=========
|
|
|
33 |
|
|
|
34 |
scribe/
|
|
|
35 |
|
|
|
36 |
aclocal/
|
|
|
37 |
Contains scripts for building/linking with Boost
|
|
|
38 |
|
|
|
39 |
examples/
|
|
|
40 |
Contains simple examples of using Scribe
|
|
|
41 |
|
|
|
42 |
if/
|
|
|
43 |
Contains Thrift interface for Scribe
|
|
|
44 |
|
|
|
45 |
lib/
|
|
|
46 |
Contains Python package for Scribe
|
|
|
47 |
|
|
|
48 |
src/
|
|
|
49 |
Contains Scribe source
|
|
|
50 |
|
|
|
51 |
test/
|
|
|
52 |
Contain php scripts for testing scribe
|
|
|
53 |
|
|
|
54 |
|
|
|
55 |
Requirements
|
|
|
56 |
============
|
|
|
57 |
|
|
|
58 |
[libevent] Event Notification library
|
|
|
59 |
[boost] Boost C++ library (version 1.36 or later)
|
|
|
60 |
[thrift] Thrift framework
|
|
|
61 |
[fb303] Facebook Bassline (included in thrift/contrib/fb303/)
|
|
|
62 |
fb303 r697294 or later is required.
|
|
|
63 |
[hadoop] optional. version 0.19.1 or higher (http://hadoop.apache.org)
|
|
|
64 |
|
|
|
65 |
These libraries are open source and may be freely obtained, but they are not
|
|
|
66 |
provided as a part of this distribution.
|
|
|
67 |
|
|
|
68 |
|
|
|
69 |
Helpful tips:
|
|
|
70 |
-Thrift, fb303, and scribe installation expects python to be installed
|
|
|
71 |
under /usr. See PY_PREFIX option in 'configure --help' to change this path.
|
|
|
72 |
-Some python installs do not include python site-packages in the default
|
|
|
73 |
python include path. If python cannot find the installed packages for
|
|
|
74 |
scribe or fb303, try setting the environment variable PYTHONPATH to the
|
|
|
75 |
location of the installed packages. This path gets output during
|
|
|
76 |
'make install'. (Eg: PYTHONPATH='/usr/lib/python2.5/site-packages').
|
|
|
77 |
-The current version of scribe_cat does not work with the stable version of
|
|
|
78 |
thrift, as of 5th March 2010. To get it to work change
|
|
|
79 |
log_entry = scribe.LogEntry(category=category, message=sys.stdin.read())
|
|
|
80 |
to
|
|
|
81 |
log_entry = scribe.LogEntry(dict(category=category, message=sys.stdin.read()))
|
|
|
82 |
The current scribe_cat works with latest thrift code if you clone their dev
|
|
|
83 |
repository.
|
|
|
84 |
|
|
|
85 |
Resources
|
|
|
86 |
=========
|
|
|
87 |
|
|
|
88 |
More information about Scribe can be obtained on the Scribe webpage at:
|
|
|
89 |
|
|
|
90 |
http://developers.facebook.com/scribe
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
To build
|
|
|
94 |
========
|
|
|
95 |
|
|
|
96 |
./bootstrap.sh <configure options>
|
|
|
97 |
make
|
|
|
98 |
|
|
|
99 |
(If you have multiple versions of Boost installed, see Boost configure options below.)
|
|
|
100 |
|
|
|
101 |
Subsequent builds
|
|
|
102 |
=================
|
|
|
103 |
|
|
|
104 |
./bootstrap <configure options>
|
|
|
105 |
make
|
|
|
106 |
|
|
|
107 |
OR
|
|
|
108 |
|
|
|
109 |
./configure <configure options>
|
|
|
110 |
make
|
|
|
111 |
|
|
|
112 |
NOTE: After the first run with bootstrap.sh you can use "[ ./bootstrap | ./configure ] <options>" followed by "make"
|
|
|
113 |
to create builds with different configurations. "bootstrap" can be passed the same arguments as "configure".
|
|
|
114 |
|
|
|
115 |
Make sure that if you change configure.ac and|or add macros run "bootstrap.sh".
|
|
|
116 |
to regenerate configure. In short whenever in doubt run "bootstrap.sh".
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
Configure options
|
|
|
120 |
=================
|
|
|
121 |
|
|
|
122 |
To find all available configure options run
|
|
|
123 |
./configure --help
|
|
|
124 |
|
|
|
125 |
Use *only* the listed options.
|
|
|
126 |
|
|
|
127 |
Examples:
|
|
|
128 |
# To disable optimized builds and turn on debug. [ default has been set to optimized]
|
|
|
129 |
./configure --disable-opt
|
|
|
130 |
|
|
|
131 |
# To disable static libraries and enable shared libraries. [ default has been set to static]
|
|
|
132 |
./configure --disable-static
|
|
|
133 |
|
|
|
134 |
# To build scribe with Hadoop support
|
|
|
135 |
./configure --enable-hdfs
|
|
|
136 |
|
|
|
137 |
# If the build process cannot find your Hadoop/Jvm installs, you may need to specify them manually:
|
|
|
138 |
./configure --with-hadooppath=/usr/local/hadoop --enable-hdfs CPPFLAGS="-I/usr/local/java/include -I/usr/local/java/include/linux" LDFLAGS="-ljvm -lhdfs"
|
|
|
139 |
|
|
|
140 |
# To set thrift home to a non-default location
|
|
|
141 |
./configure --with-thriftpath=/myhome/local/thrift
|
|
|
142 |
|
|
|
143 |
# If Boost is installed in a non-default location or there are multiple Boost versions
|
|
|
144 |
# installed, you will need to specify the Boost path and library names
|
|
|
145 |
./configure --with-boost=/usr/local --with-boost-system=boost_system-gcc40-mt-1_36 --with-boost-filesystem=boost_filesystem-gcc40-mt-1_36
|
|
|
146 |
|
|
|
147 |
|
|
|
148 |
Install
|
|
|
149 |
=======
|
|
|
150 |
|
|
|
151 |
as root:
|
|
|
152 |
make install
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
Run
|
|
|
156 |
===
|
|
|
157 |
|
|
|
158 |
See the examples directory to learn how to use Scribe.
|
|
|
159 |
|
|
|
160 |
|
|
|
161 |
Acknowledgements
|
|
|
162 |
================
|
|
|
163 |
The build process for Scribe uses autoconf macros to compile/link with Boost.
|
|
|
164 |
These macros were written by Thomas Porschberg, Michael Tindal, and
|
|
|
165 |
Daniel Casimiro. See the m4 files in the aclocal subdirectory for more
|
|
|
166 |
information.
|