Permalink
Browse files

* added "eofs" and "timeouts" metrics to stats (NetworkStore)

* added deb packaging stuff for both hdfs and nonhdfs builds
  • Loading branch information...
1 parent b86cc95 commit 69eafaf7acee5c7b1c0c8e72be173b993f96506e @praddy praddy committed Feb 17, 2012
Showing with 2,714 additions and 2 deletions.
  1. +1 −0 debian
  2. +6 −0 debian_hdfs/README.Debian
  3. +9 −0 debian_hdfs/README.source
  4. +17 −0 debian_hdfs/changelog
  5. +1 −0 debian_hdfs/compat
  6. +13 −0 debian_hdfs/control
  7. +35 −0 debian_hdfs/copyright
  8. +4 −0 debian_hdfs/cron.d.ex
  9. +1 −0 debian_hdfs/debian_nonhdfs
  10. +1 −0 debian_hdfs/docs
  11. +45 −0 debian_hdfs/emacsen-install.ex
  12. +15 −0 debian_hdfs/emacsen-remove.ex
  13. +25 −0 debian_hdfs/emacsen-startup.ex
  14. +157 −0 debian_hdfs/init.d.ex
  15. +296 −0 debian_hdfs/init.d.lsb.ex
  16. +59 −0 debian_hdfs/manpage.1.ex
  17. +154 −0 debian_hdfs/manpage.sgml.ex
  18. +291 −0 debian_hdfs/manpage.xml.ex
  19. +2 −0 debian_hdfs/menu.ex
  20. +39 −0 debian_hdfs/postinst.ex
  21. +37 −0 debian_hdfs/postrm.ex
  22. +35 −0 debian_hdfs/preinst.ex
  23. +38 −0 debian_hdfs/prerm.ex
  24. +17 −0 debian_hdfs/rules
  25. +10 −0 debian_hdfs/scribe-server-hdfs-orig.default.ex
  26. +20 −0 debian_hdfs/scribe-server-hdfs-orig.doc-base.EX
  27. +23 −0 debian_hdfs/watch.ex
  28. +6 −0 debian_nonhdfs/README.Debian
  29. +9 −0 debian_nonhdfs/README.source
  30. +17 −0 debian_nonhdfs/changelog
  31. +1 −0 debian_nonhdfs/compat
  32. +13 −0 debian_nonhdfs/control
  33. +35 −0 debian_nonhdfs/copyright
  34. +4 −0 debian_nonhdfs/cron.d.ex
  35. +1 −0 debian_nonhdfs/debian_hdfs
  36. +1 −0 debian_nonhdfs/docs
  37. +45 −0 debian_nonhdfs/emacsen-install.ex
  38. +15 −0 debian_nonhdfs/emacsen-remove.ex
  39. +25 −0 debian_nonhdfs/emacsen-startup.ex
  40. +157 −0 debian_nonhdfs/init.d.ex
  41. +296 −0 debian_nonhdfs/init.d.lsb.ex
  42. +59 −0 debian_nonhdfs/manpage.1.ex
  43. +154 −0 debian_nonhdfs/manpage.sgml.ex
  44. +291 −0 debian_nonhdfs/manpage.xml.ex
  45. +2 −0 debian_nonhdfs/menu.ex
  46. +39 −0 debian_nonhdfs/postinst.ex
  47. +37 −0 debian_nonhdfs/postrm.ex
  48. +35 −0 debian_nonhdfs/preinst.ex
  49. +38 −0 debian_nonhdfs/prerm.ex
  50. +17 −0 debian_nonhdfs/rules
  51. +10 −0 debian_nonhdfs/scribe-server-orig.default.ex
  52. +20 −0 debian_nonhdfs/scribe-server-orig.doc-base.EX
  53. +23 −0 debian_nonhdfs/watch.ex
  54. +6 −1 src/conn_pool.cpp
  55. +2 −0 src/conn_pool.h
  56. +5 −1 src/store.cpp
View
1 debian
@@ -0,0 +1,6 @@
+scribe-server-hdfs-orig for Debian
+----------------------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Pradeep Jindal <pradeep.jindal@inmobi.com> Wed, 30 Nov 2011 20:57:56 +0530
@@ -0,0 +1,9 @@
+scribe-server-hdfs-orig for Debian
+----------------------------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+
View
@@ -0,0 +1,17 @@
+scribe-server-hdfs-orig (0.2.2-1) lucid; urgency=low
+
+ * added metrics to capture per category timesouts and eofs for the network store
+
+ -- Pradeep Jindal <praddy@ubuntu> Fri, 17 Feb 2012 17:57:45 +0530
+
+scribe-server-hdfs-orig (0.2.1-1) lucid; urgency=low
+
+ * added signal handlers for graceful terminates, sending HUP reinitializes the stores
+
+ -- Pradeep Jindal <praddy@ubuntu> Fri, 17 Feb 2012 17:57:03 +0530
+
+scribe-server-hdfs-orig (0.2.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
+
+ -- Pradeep Jindal <praddy@ubuntu> Fri, 17 Feb 2012 17:54:00 +0530
View
@@ -0,0 +1 @@
+7
View
@@ -0,0 +1,13 @@
+Source: scribe-server-hdfs-orig
+Section: unknown
+Priority: extra
+Maintainer: Pradeep Jindal <pradeep.jindal@inmobi.com>
+Build-Depends: debhelper (>= 7), autotools-dev, libthrift-dev, libfb303, libboost-system-dev, libboost-filesystem-dev, libc6-dev, libstdc++6-4.4-dev, libevent-dev, libhdfs0-dev, thrift-compiler
+Standards-Version: 3.8.3
+Homepage: <insert the upstream URL, if relevant>
+
+Package: scribe-server-hdfs-orig
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: scribe server with HDFS support, installs in /usr
+ <insert long description, indented with spaces>
View
@@ -0,0 +1,35 @@
+This work was packaged for Debian by:
+
+ Pradeep Jindal <pradeep.jindal@inmobi.com> on Wed, 30 Nov 2011 20:57:56 +0530
+
+It was downloaded from <url://example.com>
+
+Upstream Author(s):
+
+ <put author's name and email here>
+ <likewise for another author>
+
+Copyright:
+
+ <Copyright (C) YYYY Name OfAuthor>
+ <likewise for another author>
+
+License:
+
+ <Put the license of the package here indented by 4 spaces>
+
+The Debian packaging is:
+
+ Copyright (C) 2011 Pradeep Jindal <pradeep.jindal@inmobi.com>
+
+# Please chose a license for your packaging work. If the program you package
+# uses a mainstream license, using the same license is the safest choice.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
+# If you just want it to be GPL version 3, leave the following lines in.
+
+and is licensed under the GPL version 3,
+see `/usr/share/common-licenses/GPL-3'.
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
View
@@ -0,0 +1,4 @@
+#
+# Regular cron jobs for the scribe-server-hdfs-orig package
+#
+0 4 * * * root [ -x /usr/bin/scribe-server-hdfs-orig_maintenance ] && /usr/bin/scribe-server-hdfs-orig_maintenance
View
@@ -0,0 +1 @@
+README
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/scribe-server-hdfs-orig
+
+# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+FLAVOR=$1
+PACKAGE=scribe-server-hdfs-orig
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+# SITEFLAG="-no-site-file"
+#else
+# SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+ echo install/${PACKAGE}: install Info links for ${FLAVOR}
+ install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/scribe-server-hdfs-orig
+
+FLAVOR=$1
+PACKAGE=scribe-server-hdfs-orig
+
+if [ ${FLAVOR} != emacs ]; then
+ if test -x /usr/sbin/install-info-altdir; then
+ echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+ install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/scribe-server-hdfs-orig.info.gz
+ fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
@@ -0,0 +1,25 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file, e.g. /etc/emacs/site-start.d/50scribe-server-hdfs-orig.el
+;; for the Debian scribe-server-hdfs-orig package
+;;
+;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd@debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
+
+;; The scribe-server-hdfs-orig package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...). The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(let ((package-dir (concat "/usr/share/"
+ (symbol-name flavor)
+ "/site-lisp/scribe-server-hdfs-orig")))
+;; If package-dir does not exist, the scribe-server-hdfs-orig package must have
+;; removed but not purged, and we should skip the setup.
+ (when (file-directory-p package-dir)
+ (setq load-path (cons package-dir load-path))
+ (autoload 'scribe-server-hdfs-orig-mode "scribe-server-hdfs-orig-mode"
+ "Major mode for editing scribe-server-hdfs-orig files." t)
+ (add-to-list 'auto-mode-alist '("\\.scribe-server-hdfs-orig$" . scribe-server-hdfs-orig-mode))))
+
View
@@ -0,0 +1,157 @@
+#! /bin/sh
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/scribe-server-hdfs-orig
+NAME=scribe-server-hdfs-orig
+DESC=scribe-server-hdfs-orig
+
+test -x $DAEMON || exit 0
+
+LOGDIR=/var/log/scribe-server-hdfs-orig
+PIDFILE=/var/run/$NAME.pid
+DODTIME=1 # Time to wait for the server to die, in seconds
+ # If this value is set too low you might not
+ # let some servers to die gracefully and
+ # 'restart' will not work
+
+# Include scribe-server-hdfs-orig defaults if available
+if [ -f /etc/default/scribe-server-hdfs-orig ] ; then
+ . /etc/default/scribe-server-hdfs-orig
+fi
+
+set -e
+
+running_pid()
+{
+ # Check if a given process pid's cmdline matches a given name
+ pid=$1
+ name=$2
+ [ -z "$pid" ] && return 1
+ [ ! -d /proc/$pid ] && return 1
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+ # Is this the expected child?
+ [ "$cmd" != "$name" ] && return 1
+ return 0
+}
+
+running()
+{
+# Check if the process is running looking at /proc
+# (works for all users)
+
+ # No pidfile, probably no daemon present
+ [ ! -f "$PIDFILE" ] && return 1
+ # Obtain the pid and check it against the binary name
+ pid=`cat $PIDFILE`
+ running_pid $pid $DAEMON || return 1
+ return 0
+}
+
+force_stop() {
+# Forcefully kill the process
+ [ ! -f "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+ # Is it really dead?
+ [ -n "$DODTIME" ] && sleep "$DODTIME"s
+ if running ; then
+ kill -9 $pid
+ [ -n "$DODTIME" ] && sleep "$DODTIME"s
+ if running ; then
+ echo "Cannot kill $LABEL (pid=$pid)!"
+ exit 1
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
+ return 0
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON -- $DAEMON_OPTS
+ if running ; then
+ echo "$NAME."
+ else
+ echo " ERROR."
+ fi
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+ echo "$NAME."
+ ;;
+ force-stop)
+ echo -n "Forcefully stopping $DESC: "
+ force_stop
+ if ! running ; then
+ echo "$NAME."
+ else
+ echo " ERROR."
+ fi
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # echo "Reloading $DESC configuration files."
+ # start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ # /var/run/$NAME.pid --exec $DAEMON
+ #;;
+ force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart" except that it does nothing if the
+ # daemon isn't already running.
+ # check wether $DAEMON is running. If so, restart
+ start-stop-daemon --stop --test --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON \
+ && $0 restart \
+ || exit 0
+ ;;
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON
+ [ -n "$DODTIME" ] && sleep $DODTIME
+ start-stop-daemon --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ status)
+ echo -n "$LABEL is "
+ if running ; then
+ echo "running"
+ else
+ echo " not running."
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Oops, something went wrong.

0 comments on commit 69eafaf

Please sign in to comment.