hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-hadoop Wiki] Update of "DevelopmentHints" by OwenOMalley
Date Fri, 14 Sep 2007 18:03:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-hadoop Wiki" for change notification.

The following page has been changed by OwenOMalley:

New page:
= Development Hints =

I wanted a page to put my little framework development hints.

== Server Log Scanning ==

When trying to find how many rpc calls were dropped per a second, I use:

grep ' discard'  < logfile | sed -e 's/[^ ]* //' -e 's/,.*//' | sort | uniq -c

When RPCs timeout on the server side, the server dumps the thread stacks, but the stacks have
newlines in them so they don't work well with the normal unix tools. So I wrote a little sed
script that scans a log file and produces one line for each thread:

sed -n -e ':start' -e '/^Thread /{h;b inner;}' -e 'd' \
       -e ':inner' -e n -e '/^ /{H;b inner;}' -e '{x;s/\n/ /g;p;x;b start}' < logfile

View raw message