Upgrade suasync to 1.3.1.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Update javassist's version to match what's in Maven.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Fix make distcheck by adding a missing file to Makefile.am.
Provide a pom.xml for Maven users.

This starts to address #103 and closes #134.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Finish integration with Maven.

This closes #103.
Improve TSD write throughput by 10x.

This fixes an important performance bug in TSD.  The bug is triggered
when large TCP frames are handled by TSD's telnet-style decoding logic.
TSD is trying to split the input lines, however it was using a Netty
class that exhibits very poor performance for this job.  This due to
the fact Netty's DelimiterBasedFrameDecoder is built to handle multiple
delimiters (e.g. "\n" or "\r\n"), and it would always attempt to match
all delimiters to the input buffer to try to find the smallest match.

So on large input buffers, which is particularly worse when the client
is connected from localhost as the MTU of loopback interfaces tend to
be very large, the code would always attempt to look for a "\r\n" in
the entire input, thereby wasting a great deal of CPU cycles.

This code replaces Netty's DelimiterBasedFrameDecoder with a simpler
decoder that only supports splitting lines on "\n" or "\r\n" and
always works in one pass.  Single-socket throughput has been seen
to increase by as much as 20x, and overall throughput with several
clients contending for CPU time has been seen to increase around 10x.

This closes #120.
Fix check_tsd -v when IPv6 is used.
Fix coding style a bit in tsd_check.

Mostly prevent lines from being longer than 80 columns and remove some
unnecessary cruft when parsing command-line arguments.  This change is
mostly a no-op.
Properly parse floating point values in scientific notations.

They do not always contain a period.  So check also for an 'e'
in lower or upper case.

Bug reported by Paula Keezer.
Make sure the .git directory exists before writing HEAD.

This closes #136.
Allow tuning the number of worker threads or using OIO.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Cache auto-completion results even if we don't use them.
Don't leak scanners when fetching suggestions from HBase.
Fetch the correct number of suggestions from HBase.

This bug had a subtle side-effect: the `break' in the while loop
was actually nested in a `for' loop, and was only breaking out of
the `for' loop, which had the weird consequence that we'd scan the
first 25 results from HBase, then because of the incorrect check
we'd iterate once more, get one more row from the next batch of
rows, then break out of the `for' loop, scan more rows, get the
first one in that batch, break out again, and so on and so forth
until the scanner reached the end key (generally rather quickly
given how the end key is crafted).

The net result is that we'd return the first 25 suggestions,
followed by 1 out of every 25 subsequent suggestion until the
end key.  This could confuse the web UI, as it relies on the
last suggestion returned to know whether to scan more.

This closes #63.
Add a small helper script to clean the --cachedir from cron.

This is only useful when the --cachedir is a tmpfs mount.
Ship the misc tools in the tarball.
Drop redundant call to AC_PROG_MKDIR_P.

This reverts commit fc792d9edf4cb8b08cbad5bdf349a0c5b99228e6.

After 70b8d1c, Automake's mkdir_p is now used. Automake provides mkdir_p
via AM_INIT_AUTOMAKE since 1.7b [1]; Automake >= 1.10 provides mkdir_p too,
by wrapping around Autoconf's MKDIR_P (via AC_PROG_MKDIR_P) [2]. Thus we
need not call anything to provide mkdir_p.

[1] http://git.savannah.gnu.org/cgit/automake.git/tree/ChangeLog?id=Release-1-7b#n51
[2] http://git.savannah.gnu.org/cgit/automake.git/tree/ChangeLog?id=Release-1-9b#n219

This also benefits older Autoconfs (ie. < 2.60) which do not provide
AC_PROG_MKDIR_P.

Tested on:
 - Solaris, Autoconf 2.59, Automake 1.8.3
 - Ubuntu,  Autoconf 2.68, Automake 1.11.3

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
Allow -w and -c to accept floats.

Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>