Add scribe 2.2, aggregating log data streamed in real time.

PR:		ports/148631
Submitted by:	Jui-Nan Lin <jnlin at csie.nctu.edu.tw>
This commit is contained in:
Li-Wen Hsu 2010-08-02 20:55:31 +00:00
parent cbc6bcbbfa
commit 4aa753d2fc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=258660
7 changed files with 226 additions and 0 deletions

View file

@ -946,6 +946,7 @@
SUBDIR += scapy
SUBDIR += scnc
SUBDIR += scr_ipfm
SUBDIR += scribe
SUBDIR += sdl_net
SUBDIR += seda
SUBDIR += sendemail

50
net/scribe/Makefile Normal file
View file

@ -0,0 +1,50 @@
# New ports collection makefile for: scribe
# Date created: 2010-07-15
# Whom: Jui-Nan Lin <jnlin@csie.nctu.edu.tw>
# $FreeBSD$
#
PORTNAME= scribe
PORTVERSION= 2.2
CATEGORIES= net
MASTER_SITES= http://cloud.github.com/downloads/facebook/scribe/
MAINTAINER= jnlin@csie.nctu.edu.tw
COMMENT= Aggregating log data streamed in real time
BUILD_DEPENDS= fb303>0:${PORTSDIR}/devel/fb303
LIB_DEPENDS= boost_system:${PORTSDIR}/devel/boost-libs \
event:${PORTSDIR}/devel/libevent \
thrift:${PORTSDIR}/devel/thrift
RUN_DEPENDS= p5-Class-Accessor>0:${PORTSDIR}/devel/p5-Class-Accessor \
p5-Thrift>0:${PORTSDIR}/devel/p5-Thrift
ACLOCAL_ARGS= -I ./aclocal
AUTOMAKE_ARGS= -a
CONFIGURE_ARGS= --with-boost-filesystem=boost_filesystem \
--with-boost-system=boost_system \
PY_PREFIX="${PREFIX}"
PLIST_SUB+= PYTHON_VERSION_SHORTNAME="${PYTHON_VERSION_SHORTNAME}"
PYTHON_VERSION_SHORTNAME= ${PYTHON_VERSION:S/thon//}
USE_AUTOTOOLS= aclocal:19 automake:19 autoconf:262
USE_GMAKE= yes
USE_PYTHON= yes
USE_RC_SUBR= ${PORTNAME}
post-extract:
${MV} ${WRKDIR}/${PORTNAME} ${WRKSRC}
post-patch:
${REINPLACE_CMD} -e 's|/usr/local/scribe|${LOCALBASE}/etc|' ${WRKSRC}/src/env_default.h
post-build:
${LOCALBASE}/bin/thrift -o ${WRKSRC} -I ${LOCALBASE}/share --gen "perl" ${WRKSRC}/if/scribe.thrift
cd ${WRKSRC} && ${PATCH} < ${FILESDIR}/scribe.pm.patch
post-install:
${MKDIR} ${PREFIX}/${SITE_PERL_REL}/Scribe/Thrift
${CP} ${WRKSRC}/gen-perl/*.pm ${PREFIX}/${SITE_PERL_REL}/Scribe/Thrift
${MKDIR} ${EXAMPLESDIR}
${CP} ${WRKSRC}/examples/* ${EXAMPLESDIR}
.include <bsd.port.mk>

3
net/scribe/distinfo Normal file
View file

@ -0,0 +1,3 @@
MD5 (scribe-2.2.tar.gz) = 8111d2722fa6a0d575f5717e56c4a47e
SHA256 (scribe-2.2.tar.gz) = 960f92a1eeef64eaeb7465976c7e16e64dbc67fc61aa041072f23eb0915e4505
SIZE (scribe-2.2.tar.gz) = 71223

View file

@ -0,0 +1,20 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: scribe
# REQUIRE: DAEMON
. /etc/rc.subr
name="scribe"
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon -p ${pidfile} %%PREFIX%%/bin/scribed"
procname="%%PREFIX%%/bin/scribed"
load_rc_config "$name"
: ${scribe_enable="NO"}
: ${scribe_flags=""}
run_rc_command "$1"

View file

@ -0,0 +1,119 @@
--- gen-perl/scribe.pm.orig 2010-07-14 18:52:03.000000000 +0800
+++ gen-perl/scribe.pm 2010-07-14 18:49:30.000000000 +0800
@@ -8,14 +8,14 @@
use warnings;
use Thrift;
-use Types;
+use Scribe::Thrift::Types;
use Facebook::FB303::FacebookService;
# HELPER FUNCTIONS AND STRUCTURES
-package scribe_Log_args;
+package Scribe::Thrift::scribe_Log_args;
use base qw(Class::Accessor);
-scribe_Log_args->mk_accessors( qw( messages ) );
+Scribe::Thrift::scribe_Log_args->mk_accessors( qw( messages ) );
sub new {
my $classname = shift;
@@ -99,9 +99,9 @@
return $xfer;
}
-package scribe_Log_result;
+package Scribe::Thrift::scribe_Log_result;
use base qw(Class::Accessor);
-scribe_Log_result->mk_accessors( qw( success ) );
+Scribe::Thrift::scribe_Log_result->mk_accessors( qw( success ) );
sub new {
my $classname = shift;
@@ -163,7 +163,7 @@
return $xfer;
}
-package scribeIf;
+package Scribe::Thrift::scribeIf;
use strict;
use base qw(Facebook::FB303::FacebookServiceIf);
@@ -175,7 +175,7 @@
die 'implement interface';
}
-package scribeRest;
+package Scribe::Thrift::scribeRest;
use strict;
use base qw(Facebook::FB303::FacebookServiceRest);
@@ -187,10 +187,10 @@
return $self->{impl}->Log($messages);
}
-package scribeClient;
+package Scribe::Thrift::scribeClient;
use base qw(Facebook::FB303::FacebookServiceClient);
-use base qw(scribeIf);
+use base qw(Scribe::Thrift::scribeIf);
sub new {
my ($classname, $input, $output) = @_;
my $self = {};
@@ -211,7 +211,7 @@
my $messages = shift;
$self->{output}->writeMessageBegin('Log', TMessageType::CALL, $self->{seqid});
- my $args = new scribe_Log_args();
+ my $args = new Scribe::Thrift::scribe_Log_args();
$args->{messages} = $messages;
$args->write($self->{output});
$self->{output}->writeMessageEnd();
@@ -232,7 +232,7 @@
$self->{input}->readMessageEnd();
die $x;
}
- my $result = new scribe_Log_result();
+ my $result = new Scribe::Thrift::scribe_Log_result();
$result->read($self->{input});
$self->{input}->readMessageEnd();
@@ -241,7 +241,7 @@
}
die "Log failed: unknown result";
}
-package scribeProcessor;
+package Scribe::Thrift::scribeProcessor;
use strict;
use base qw(Facebook::FB303::FacebookServiceProcessor);
--- gen-perl/Constants.pm.orig 2010-07-14 18:52:03.000000000 +0800
+++ gen-perl/Constants.pm 2010-07-14 18:49:30.000000000 +0800
@@ -3,7 +3,7 @@
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
-package Constants;
+package Scribe::Thrift::Constants;
require 5.6.0;
use strict;
use warnings;
--- gen-perl/Types.pm.orig 2010-07-14 18:52:03.000000000 +0800
+++ gen-perl/Types.pm 2010-07-14 18:49:30.000000000 +0800
@@ -8,12 +8,12 @@
use warnings;
use Thrift;
-package ResultCode;
+package Scribe::Thrift::ResultCode;
use constant OK => 0;
use constant TRY_LATER => 1;
-package LogEntry;
+package Scribe::Thrift::LogEntry;
use base qw(Class::Accessor);
-LogEntry->mk_accessors( qw( category message ) );
+Scribe::Thrift::LogEntry->mk_accessors( qw( category message ) );
sub new {
my $classname = shift;

6
net/scribe/pkg-descr Normal file
View file

@ -0,0 +1,6 @@
Scribe is a server for aggregating log data streamed in real time
from a large number of servers. It is designed to be scalable,
extensible without client-side modification, and robust to failure of
the network or any specific machine.
WWW: http://github.com/facebook/scribe

27
net/scribe/pkg-plist Normal file
View file

@ -0,0 +1,27 @@
@comment $FreeBSD$
%%EXAMPLESDIR%%/README
%%EXAMPLESDIR%%/example1.conf
%%EXAMPLESDIR%%/example2central.conf
%%EXAMPLESDIR%%/example2client.conf
%%EXAMPLESDIR%%/hdfs_example.conf
%%EXAMPLESDIR%%/hdfs_example2.conf
%%EXAMPLESDIR%%/scribe_cat
%%EXAMPLESDIR%%/scribe_ctrl
%%PYTHON_SITELIBDIR%%/scribe-2.0-%%PYTHON_VERSION_SHORTNAME%%.egg-info
%%PYTHON_SITELIBDIR%%/scribe/__init__.py
%%PYTHON_SITELIBDIR%%/scribe/__init__.pyc
%%PYTHON_SITELIBDIR%%/scribe/constants.py
%%PYTHON_SITELIBDIR%%/scribe/constants.pyc
%%PYTHON_SITELIBDIR%%/scribe/scribe.py
%%PYTHON_SITELIBDIR%%/scribe/scribe.pyc
%%PYTHON_SITELIBDIR%%/scribe/ttypes.py
%%PYTHON_SITELIBDIR%%/scribe/ttypes.pyc
%%SITE_PERL%%/Scribe/Thrift/Constants.pm
%%SITE_PERL%%/Scribe/Thrift/Types.pm
%%SITE_PERL%%/Scribe/Thrift/scribe.pm
bin/scribed
lib/libscribe.a
@dirrmtry %%SITE_PERL%%/Scribe/Thrift
@dirrmtry %%SITE_PERL%%/Scribe
@dirrmtry %%PYTHON_SITELIBDIR%%/scribe
@dirrmtry %%EXAMPLESDIR%%