diff --git a/README b/README index 504f8374..bffed114 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ Scribe -Last Modified: 2010-Jun-18 +Last Modified: 2010-Oct-14 Introduction @@ -65,8 +65,8 @@ Requirements [libevent] Event Notification library [boost] Boost C++ library (version 1.36 or later) -[thrift] Thrift framework -[fb303] Facebook Bassline (included in thrift/contrib/fb303/) +[thrift] Thrift framework (version 0.5.0 or later) +[fb303] Facebook Bassline (included in contrib/fb303/) fb303 r697294 or later is required. [hadoop] optional. version 0.19.1 or higher (http://hadoop.apache.org) @@ -82,14 +82,6 @@ Helpful tips: scribe or fb303, try setting the environment variable PYTHONPATH to the location of the installed packages. This path gets output during 'make install'. (Eg: PYTHONPATH='/usr/lib/python2.5/site-packages'). --The current version of scribe_cat does not work with the stable version of - thrift, as of 5th March 2010. To get it to work change - log_entry = scribe.LogEntry(category=category, message=sys.stdin.read()) - to - log_entry = scribe.LogEntry(dict(category=category, message=sys.stdin.read())) - The current scribe_cat works with latest thrift code if you clone their dev - repository. - Resources ========= diff --git a/contrib/fb303/cpp/Makefile.am b/contrib/fb303/cpp/Makefile.am index 45e1b3e3..f6ec051b 100644 --- a/contrib/fb303/cpp/Makefile.am +++ b/contrib/fb303/cpp/Makefile.am @@ -74,7 +74,13 @@ endif # Set up Thrift specific activity here. # We assume that a +types.cpp will always be built from .thrift. -$(eval $(call thrift_template,$(srcdir),$(IFDIR)/fb303.thrift,--gen cpp )) +$(eval $(call thrift_template,$(srcdir),$(IFDIR)/fb303.thrift,--gen cpp:pure_enums)) + +include_fb303dir = $(includedir)/thrift/fb303 +include_fb303_HEADERS = FacebookBase.h ServiceTracker.h gen-cpp/FacebookService.h gen-cpp/fb303_constants.h gen-cpp/fb303_types.h + +include_fb303ifdir = $(prefix)/share/fb303/if +include_fb303if_HEADERS = ../if/fb303.thrift BUILT_SOURCES = fb303style diff --git a/if/bucketupdater.thrift b/if/bucketupdater.thrift index f2cd6593..01ca1bae 100644 --- a/if/bucketupdater.thrift +++ b/if/bucketupdater.thrift @@ -1,4 +1,4 @@ -#!/usr/local/bin/thrift --cpp --php +#!/usr/local/bin/thrift --gen cpp:pure_enums --gen php ## Copyright (c) 2009- Facebook ## diff --git a/if/scribe.thrift b/if/scribe.thrift index 6bdcea62..1476e48f 100644 --- a/if/scribe.thrift +++ b/if/scribe.thrift @@ -1,4 +1,4 @@ -#!/usr/local/bin/thrift --cpp --php +#!/usr/local/bin/thrift --gen cpp:pure_enums --gen php ## Copyright (c) 2007-2008 Facebook ## @@ -17,7 +17,7 @@ ## See accompanying file LICENSE or visit the Scribe site at: ## http://developers.facebook.com/scribe/ -include "fb303.thrift" +include "fb303/if/fb303.thrift" namespace cpp scribe.thrift namespace java scribe.thrift diff --git a/src/Makefile.am b/src/Makefile.am index 156f1bd4..1a6409a7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,6 +33,8 @@ all: # hadoop_home # THRIFT = $(thrift_home)/bin/thrift +THRIFT_INCLUDES = -I $(fb303_home)/share/ +THRIFT_OPTS = $(THRIFT_INCLUDES) --gen cpp:pure_enums --gen py --gen php --gen java THRIFT_CPPFLAGS = -I$(thrift_home)/include -I$(thrift_home)/include/thrift # User defined conditionals and conditonal statements set up in configure.ac. @@ -51,7 +53,7 @@ endif # Set libraries external to this component. -EXTERNAL_LIBS = -L$(thrift_home)/lib -L$(fb303_home)/cpp -L$(hadoop_home)/lib -lfb303 -lthrift -lthriftnb +EXTERNAL_LIBS = -L$(thrift_home)/lib -L$(fb303_home)/lib -L$(hadoop_home)/lib -lfb303 -lthrift -lthriftnb EXTERNAL_LIBS += -levent -lpthread if USE_SCRIBE_HDFS EXTERNAL_LIBS += -lhdfs -ljvm @@ -63,7 +65,7 @@ endif # USE flags AM_CXXFLAGS, AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS, LDADD in this section. AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/contrib -AM_CPPFLAGS += -I$(fb303_home)/cpp/gen-cpp +AM_CPPFLAGS += -I$(fb303_home)/include/thrift/fb303 AM_CPPFLAGS += -I$(hadoop_home)/include AM_CPPFLAGS += $(BOOST_CPPFLAGS) AM_CPPFLAGS += $(THRIFT_CPPFLAGS) @@ -114,8 +116,8 @@ endif # Set up Thrift specific activity here. # We assume that a +types.cpp will always be built from .thrift. -$(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift, -I $(fb303_home)/if/ --gen cpp --gen py --gen php --gen java)) -$(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift, -I $(fb303_home)/if/ --gen cpp --gen py --gen php --gen java)) +$(eval $(call thrift_template,.,$(srcdir)/../if/scribe.thrift,$(THRIFT_OPTS))) +$(eval $(call thrift_template,.,$(srcdir)/../if/bucketupdater.thrift,$(THRIFT_OPTS))) if FACEBOOK $(eval $(call thrift_template,.,$(smc_home)/if/ServiceManager.thrift,--gen cpp))