heroku-tokyotyrant 0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING +504 -0
- data/README.rdoc +231 -0
- data/Rakefile +72 -0
- data/benchmarks/balancer.rb +101 -0
- data/benchmarks/bulk_db.rb +74 -0
- data/benchmarks/bulk_table.rb +87 -0
- data/benchmarks/db.rb +114 -0
- data/benchmarks/table.rb +161 -0
- data/ext/extconf.rb +43 -0
- data/ext/tokyo/bin/tcamgr +0 -0
- data/ext/tokyo/bin/tcamttest +0 -0
- data/ext/tokyo/bin/tcatest +0 -0
- data/ext/tokyo/bin/tcbmgr +0 -0
- data/ext/tokyo/bin/tcbmttest +0 -0
- data/ext/tokyo/bin/tcbtest +0 -0
- data/ext/tokyo/bin/tcfmgr +0 -0
- data/ext/tokyo/bin/tcfmttest +0 -0
- data/ext/tokyo/bin/tcftest +0 -0
- data/ext/tokyo/bin/tchmgr +0 -0
- data/ext/tokyo/bin/tchmttest +0 -0
- data/ext/tokyo/bin/tchtest +0 -0
- data/ext/tokyo/bin/tcrmgr +0 -0
- data/ext/tokyo/bin/tcrmttest +0 -0
- data/ext/tokyo/bin/tcrtest +0 -0
- data/ext/tokyo/bin/tctmgr +0 -0
- data/ext/tokyo/bin/tctmttest +0 -0
- data/ext/tokyo/bin/tcttest +0 -0
- data/ext/tokyo/bin/tcucodec +0 -0
- data/ext/tokyo/bin/tcumttest +0 -0
- data/ext/tokyo/bin/tcutest +0 -0
- data/ext/tokyo/bin/ttserver +0 -0
- data/ext/tokyo/bin/ttulmgr +0 -0
- data/ext/tokyo/bin/ttultest +0 -0
- data/ext/tokyo/include/tcadb.h +548 -0
- data/ext/tokyo/include/tcbdb.h +1101 -0
- data/ext/tokyo/include/tcfdb.h +858 -0
- data/ext/tokyo/include/tchdb.h +871 -0
- data/ext/tokyo/include/tcrdb.h +801 -0
- data/ext/tokyo/include/tctdb.h +1086 -0
- data/ext/tokyo/include/tculog.h +392 -0
- data/ext/tokyo/include/tcutil.h +4184 -0
- data/ext/tokyo/include/ttutil.h +494 -0
- data/ext/tokyo/lib/libtokyocabinet.9.4.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.9.dylib +0 -0
- data/ext/tokyo/lib/libtokyocabinet.a +0 -0
- data/ext/tokyo/lib/libtokyocabinet.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.22.0.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.3.dylib +0 -0
- data/ext/tokyo/lib/libtokyotyrant.a +0 -0
- data/ext/tokyo/lib/libtokyotyrant.dylib +0 -0
- data/ext/tokyo/lib/pkgconfig/tokyocabinet.pc +14 -0
- data/ext/tokyo/lib/pkgconfig/tokyotyrant.pc +14 -0
- data/ext/tokyo/lib/ttskeldir.bundle +0 -0
- data/ext/tokyo/lib/ttskelmock.bundle +0 -0
- data/ext/tokyo/lib/ttskelnull.bundle +0 -0
- data/ext/tokyo/lib/ttskelproxy.bundle +0 -0
- data/ext/tokyo/libexec/tcawmgr.cgi +0 -0
- data/ext/tokyo/sbin/ttservctl +163 -0
- data/ext/tokyo/share/man/man1/tcamgr.1 +97 -0
- data/ext/tokyo/share/man/man1/tcamttest.1 +35 -0
- data/ext/tokyo/share/man/man1/tcatest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcbmgr.1 +125 -0
- data/ext/tokyo/share/man/man1/tcbmttest.1 +81 -0
- data/ext/tokyo/share/man/man1/tcbtest.1 +107 -0
- data/ext/tokyo/share/man/man1/tcfmgr.1 +98 -0
- data/ext/tokyo/share/man/man1/tcfmttest.1 +62 -0
- data/ext/tokyo/share/man/man1/tcftest.1 +73 -0
- data/ext/tokyo/share/man/man1/tchmgr.1 +110 -0
- data/ext/tokyo/share/man/man1/tchmttest.1 +85 -0
- data/ext/tokyo/share/man/man1/tchtest.1 +95 -0
- data/ext/tokyo/share/man/man1/tcrmgr.1 +164 -0
- data/ext/tokyo/share/man/man1/tcrmttest.1 +55 -0
- data/ext/tokyo/share/man/man1/tcrtest.1 +89 -0
- data/ext/tokyo/share/man/man1/tctmgr.1 +140 -0
- data/ext/tokyo/share/man/man1/tctmttest.1 +92 -0
- data/ext/tokyo/share/man/man1/tcttest.1 +105 -0
- data/ext/tokyo/share/man/man1/tcucodec.1 +162 -0
- data/ext/tokyo/share/man/man1/tcumttest.1 +41 -0
- data/ext/tokyo/share/man/man1/tcutest.1 +81 -0
- data/ext/tokyo/share/man/man1/ttserver.1 +84 -0
- data/ext/tokyo/share/man/man1/ttulmgr.1 +40 -0
- data/ext/tokyo/share/man/man1/ttultest.1 +16 -0
- data/ext/tokyo/share/man/man3/tcadb.3 +676 -0
- data/ext/tokyo/share/man/man3/tcbdb.3 +1355 -0
- data/ext/tokyo/share/man/man3/tcfdb.3 +975 -0
- data/ext/tokyo/share/man/man3/tchdb.3 +898 -0
- data/ext/tokyo/share/man/man3/tclist.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmap.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmdb.3 +1 -0
- data/ext/tokyo/share/man/man3/tcmpool.3 +1 -0
- data/ext/tokyo/share/man/man3/tcrdb.3 +1309 -0
- data/ext/tokyo/share/man/man3/tctdb.3 +1110 -0
- data/ext/tokyo/share/man/man3/tctree.3 +1 -0
- data/ext/tokyo/share/man/man3/tculog.3 +15 -0
- data/ext/tokyo/share/man/man3/tcutil.3 +4518 -0
- data/ext/tokyo/share/man/man3/tcxstr.3 +1 -0
- data/ext/tokyo/share/man/man3/tokyocabinet.3 +132 -0
- data/ext/tokyo/share/man/man3/ttutil.3 +14 -0
- data/ext/tokyo/share/man/man8/ttservctl.8 +37 -0
- data/ext/tokyo/share/tokyocabinet/COPYING +504 -0
- data/ext/tokyo/share/tokyocabinet/ChangeLog +1252 -0
- data/ext/tokyo/share/tokyocabinet/THANKS +12 -0
- data/ext/tokyo/share/tokyocabinet/doc/benchmark.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/common.css +211 -0
- data/ext/tokyo/share/tokyocabinet/doc/icon16.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.html +156 -0
- data/ext/tokyo/share/tokyocabinet/doc/index.ja.html +197 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo-ja.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/logo.png +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-en.html +7145 -0
- data/ext/tokyo/share/tokyocabinet/doc/spex-ja.html +7476 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyo/share/tokyocabinet/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyo/share/tokyotyrant/COPYING +504 -0
- data/ext/tokyo/share/tokyotyrant/ChangeLog +578 -0
- data/ext/tokyo/share/tokyotyrant/THANKS +15 -0
- data/ext/tokyo/share/tokyotyrant/doc/common.css +211 -0
- data/ext/tokyo/share/tokyotyrant/doc/index.html +79 -0
- data/ext/tokyo/share/tokyotyrant/doc/spex.html +2264 -0
- data/ext/tokyo/share/tokyotyrant/ext/mapreduce.lua +57 -0
- data/ext/tokyo/share/tokyotyrant/ext/queue.lua +55 -0
- data/ext/tokyo/share/tokyotyrant/ext/senatus.lua +532 -0
- data/ext/tokyo/share/tokyotyrant/ext/usherette.lua +438 -0
- data/ext/tokyo_tyrant.c +147 -0
- data/ext/tokyo_tyrant.h +48 -0
- data/ext/tokyo_tyrant_db.c +227 -0
- data/ext/tokyo_tyrant_db.h +8 -0
- data/ext/tokyo_tyrant_module.c +453 -0
- data/ext/tokyo_tyrant_module.h +10 -0
- data/ext/tokyo_tyrant_query.c +226 -0
- data/ext/tokyo_tyrant_query.h +9 -0
- data/ext/tokyo_tyrant_table.c +319 -0
- data/ext/tokyo_tyrant_table.h +8 -0
- data/ext/tokyocabinet-1.4.41/COPYING +504 -0
- data/ext/tokyocabinet-1.4.41/ChangeLog +1252 -0
- data/ext/tokyocabinet-1.4.41/Makefile.in +825 -0
- data/ext/tokyocabinet-1.4.41/README +38 -0
- data/ext/tokyocabinet-1.4.41/THANKS +12 -0
- data/ext/tokyocabinet-1.4.41/bros/Makefile +133 -0
- data/ext/tokyocabinet-1.4.41/bros/bdbtest.c +438 -0
- data/ext/tokyocabinet-1.4.41/bros/cdbtest.c +219 -0
- data/ext/tokyocabinet-1.4.41/bros/cmpsqltctest.c +186 -0
- data/ext/tokyocabinet-1.4.41/bros/gdbmtest.c +216 -0
- data/ext/tokyocabinet-1.4.41/bros/mapreporter +72 -0
- data/ext/tokyocabinet-1.4.41/bros/maptest.cc +677 -0
- data/ext/tokyocabinet-1.4.41/bros/ndbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/qdbmtest.c +375 -0
- data/ext/tokyocabinet-1.4.41/bros/reporter +141 -0
- data/ext/tokyocabinet-1.4.41/bros/result.xls +0 -0
- data/ext/tokyocabinet-1.4.41/bros/sdbmtest.c +204 -0
- data/ext/tokyocabinet-1.4.41/bros/sqltest.c +404 -0
- data/ext/tokyocabinet-1.4.41/bros/tctest.c +748 -0
- data/ext/tokyocabinet-1.4.41/bros/tdbtest.c +205 -0
- data/ext/tokyocabinet-1.4.41/configure +7402 -0
- data/ext/tokyocabinet-1.4.41/configure.in +362 -0
- data/ext/tokyocabinet-1.4.41/doc/benchmark.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/common.css +211 -0
- data/ext/tokyocabinet-1.4.41/doc/icon16.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/index.html +156 -0
- data/ext/tokyocabinet-1.4.41/doc/index.ja.html +197 -0
- data/ext/tokyocabinet-1.4.41/doc/logo-ja.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/logo.png +0 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-en.html +7145 -0
- data/ext/tokyocabinet-1.4.41/doc/spex-ja.html +7476 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.pdf +0 -0
- data/ext/tokyocabinet-1.4.41/doc/tokyoproducts.ppt +0 -0
- data/ext/tokyocabinet-1.4.41/example/Makefile +113 -0
- data/ext/tokyocabinet-1.4.41/example/tcadbex.c +55 -0
- data/ext/tokyocabinet-1.4.41/example/tcbdbex.c +64 -0
- data/ext/tokyocabinet-1.4.41/example/tcfdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tchdbex.c +60 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.c +97 -0
- data/ext/tokyocabinet-1.4.41/example/tctchat.tmpl +141 -0
- data/ext/tokyocabinet-1.4.41/example/tctdbex.c +85 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.c +95 -0
- data/ext/tokyocabinet-1.4.41/example/tctsearch.tmpl +122 -0
- data/ext/tokyocabinet-1.4.41/example/tcutilex.c +77 -0
- data/ext/tokyocabinet-1.4.41/f.tsv +2 -0
- data/ext/tokyocabinet-1.4.41/lab/calccomp +118 -0
- data/ext/tokyocabinet-1.4.41/lab/datechange +56 -0
- data/ext/tokyocabinet-1.4.41/lab/diffcheck +45 -0
- data/ext/tokyocabinet-1.4.41/lab/htmltotsv +102 -0
- data/ext/tokyocabinet-1.4.41/lab/magic +19 -0
- data/ext/tokyocabinet-1.4.41/lab/printenv.cgi +27 -0
- data/ext/tokyocabinet-1.4.41/lab/stepcount +26 -0
- data/ext/tokyocabinet-1.4.41/lab/stopwatch +61 -0
- data/ext/tokyocabinet-1.4.41/lab/tabcheck +43 -0
- data/ext/tokyocabinet-1.4.41/lab/wgettsv +239 -0
- data/ext/tokyocabinet-1.4.41/lab/widthcheck +57 -0
- data/ext/tokyocabinet-1.4.41/man/htmltoman +104 -0
- data/ext/tokyocabinet-1.4.41/man/tcadb.3 +676 -0
- data/ext/tokyocabinet-1.4.41/man/tcamgr.1 +97 -0
- data/ext/tokyocabinet-1.4.41/man/tcamttest.1 +35 -0
- data/ext/tokyocabinet-1.4.41/man/tcatest.1 +55 -0
- data/ext/tokyocabinet-1.4.41/man/tcbdb.3 +1355 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmgr.1 +125 -0
- data/ext/tokyocabinet-1.4.41/man/tcbmttest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcbtest.1 +107 -0
- data/ext/tokyocabinet-1.4.41/man/tcfdb.3 +975 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmgr.1 +98 -0
- data/ext/tokyocabinet-1.4.41/man/tcfmttest.1 +62 -0
- data/ext/tokyocabinet-1.4.41/man/tcftest.1 +73 -0
- data/ext/tokyocabinet-1.4.41/man/tchdb.3 +898 -0
- data/ext/tokyocabinet-1.4.41/man/tchmgr.1 +110 -0
- data/ext/tokyocabinet-1.4.41/man/tchmttest.1 +85 -0
- data/ext/tokyocabinet-1.4.41/man/tchtest.1 +95 -0
- data/ext/tokyocabinet-1.4.41/man/tclist.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmap.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmdb.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcmpool.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tctdb.3 +1110 -0
- data/ext/tokyocabinet-1.4.41/man/tctmgr.1 +140 -0
- data/ext/tokyocabinet-1.4.41/man/tctmttest.1 +92 -0
- data/ext/tokyocabinet-1.4.41/man/tctree.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tcttest.1 +105 -0
- data/ext/tokyocabinet-1.4.41/man/tcucodec.1 +162 -0
- data/ext/tokyocabinet-1.4.41/man/tcumttest.1 +41 -0
- data/ext/tokyocabinet-1.4.41/man/tcutest.1 +81 -0
- data/ext/tokyocabinet-1.4.41/man/tcutil.3 +4518 -0
- data/ext/tokyocabinet-1.4.41/man/tcxstr.3 +1 -0
- data/ext/tokyocabinet-1.4.41/man/tokyocabinet.3 +132 -0
- data/ext/tokyocabinet-1.4.41/md5.c +381 -0
- data/ext/tokyocabinet-1.4.41/md5.h +101 -0
- data/ext/tokyocabinet-1.4.41/myconf.c +493 -0
- data/ext/tokyocabinet-1.4.41/myconf.h +549 -0
- data/ext/tokyocabinet-1.4.41/tcadb.c +4339 -0
- data/ext/tokyocabinet-1.4.41/tcadb.h +548 -0
- data/ext/tokyocabinet-1.4.41/tcamgr.c +1019 -0
- data/ext/tokyocabinet-1.4.41/tcamttest.c +542 -0
- data/ext/tokyocabinet-1.4.41/tcatest.c +1845 -0
- data/ext/tokyocabinet-1.4.41/tcawmgr.c +482 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.c +4180 -0
- data/ext/tokyocabinet-1.4.41/tcbdb.h +1101 -0
- data/ext/tokyocabinet-1.4.41/tcbmgr.c +1012 -0
- data/ext/tokyocabinet-1.4.41/tcbmttest.c +1810 -0
- data/ext/tokyocabinet-1.4.41/tcbtest.c +2586 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.c +2746 -0
- data/ext/tokyocabinet-1.4.41/tcfdb.h +858 -0
- data/ext/tokyocabinet-1.4.41/tcfmgr.c +786 -0
- data/ext/tokyocabinet-1.4.41/tcfmttest.c +1220 -0
- data/ext/tokyocabinet-1.4.41/tcftest.c +1695 -0
- data/ext/tokyocabinet-1.4.41/tchdb.c +5153 -0
- data/ext/tokyocabinet-1.4.41/tchdb.h +871 -0
- data/ext/tokyocabinet-1.4.41/tchmgr.c +842 -0
- data/ext/tokyocabinet-1.4.41/tchmttest.c +1757 -0
- data/ext/tokyocabinet-1.4.41/tchtest.c +2129 -0
- data/ext/tokyocabinet-1.4.41/tctdb.c +6199 -0
- data/ext/tokyocabinet-1.4.41/tctdb.h +1086 -0
- data/ext/tokyocabinet-1.4.41/tctmgr.c +1241 -0
- data/ext/tokyocabinet-1.4.41/tctmttest.c +1563 -0
- data/ext/tokyocabinet-1.4.41/tcttest.c +2062 -0
- data/ext/tokyocabinet-1.4.41/tcucodec.c +1357 -0
- data/ext/tokyocabinet-1.4.41/tcumttest.c +578 -0
- data/ext/tokyocabinet-1.4.41/tcutest.c +1875 -0
- data/ext/tokyocabinet-1.4.41/tcutil.c +10528 -0
- data/ext/tokyocabinet-1.4.41/tcutil.h +4184 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.idl +336 -0
- data/ext/tokyocabinet-1.4.41/tokyocabinet.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/COPYING +504 -0
- data/ext/tokyotyrant-1.1.39/ChangeLog +578 -0
- data/ext/tokyotyrant-1.1.39/Makefile.in +365 -0
- data/ext/tokyotyrant-1.1.39/README +38 -0
- data/ext/tokyotyrant-1.1.39/THANKS +15 -0
- data/ext/tokyotyrant-1.1.39/configure +6979 -0
- data/ext/tokyotyrant-1.1.39/configure.in +300 -0
- data/ext/tokyotyrant-1.1.39/doc/common.css +211 -0
- data/ext/tokyotyrant-1.1.39/doc/index.html +79 -0
- data/ext/tokyotyrant-1.1.39/doc/spex.html +2264 -0
- data/ext/tokyotyrant-1.1.39/example/Makefile +68 -0
- data/ext/tokyotyrant-1.1.39/example/httptest.pl +88 -0
- data/ext/tokyotyrant-1.1.39/example/mcftest.pl +39 -0
- data/ext/tokyotyrant-1.1.39/example/mctest.pl +43 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.c +49 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbex.o +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex +0 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.c +79 -0
- data/ext/tokyotyrant-1.1.39/example/tcrdbtblex.o +0 -0
- data/ext/tokyotyrant-1.1.39/ext/mapreduce.lua +57 -0
- data/ext/tokyotyrant-1.1.39/ext/queue.lua +55 -0
- data/ext/tokyotyrant-1.1.39/ext/senatus.lua +532 -0
- data/ext/tokyotyrant-1.1.39/ext/usherette.lua +438 -0
- data/ext/tokyotyrant-1.1.39/lab/datechange +56 -0
- data/ext/tokyotyrant-1.1.39/lab/diffcheck +45 -0
- data/ext/tokyotyrant-1.1.39/lab/fibonacci.lua +20 -0
- data/ext/tokyotyrant-1.1.39/lab/footprint.lua +67 -0
- data/ext/tokyotyrant-1.1.39/lab/highlow.lua +88 -0
- data/ext/tokyotyrant-1.1.39/lab/killdualmaster +12 -0
- data/ext/tokyotyrant-1.1.39/lab/rundualmaster +38 -0
- data/ext/tokyotyrant-1.1.39/lab/stepcount +26 -0
- data/ext/tokyotyrant-1.1.39/lab/tabcheck +43 -0
- data/ext/tokyotyrant-1.1.39/lab/ushrtregister.pl +55 -0
- data/ext/tokyotyrant-1.1.39/lab/widthcheck +57 -0
- data/ext/tokyotyrant-1.1.39/man/htmltoman +100 -0
- data/ext/tokyotyrant-1.1.39/man/tcrdb.3 +1309 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmgr.1 +164 -0
- data/ext/tokyotyrant-1.1.39/man/tcrmttest.1 +55 -0
- data/ext/tokyotyrant-1.1.39/man/tcrtest.1 +89 -0
- data/ext/tokyotyrant-1.1.39/man/tculog.3 +15 -0
- data/ext/tokyotyrant-1.1.39/man/ttservctl.8 +37 -0
- data/ext/tokyotyrant-1.1.39/man/ttserver.1 +84 -0
- data/ext/tokyotyrant-1.1.39/man/ttulmgr.1 +40 -0
- data/ext/tokyotyrant-1.1.39/man/ttultest.1 +16 -0
- data/ext/tokyotyrant-1.1.39/man/ttutil.3 +14 -0
- data/ext/tokyotyrant-1.1.39/myconf.c +169 -0
- data/ext/tokyotyrant-1.1.39/myconf.h +408 -0
- data/ext/tokyotyrant-1.1.39/scrext.c +2394 -0
- data/ext/tokyotyrant-1.1.39/scrext.h +96 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.c +2637 -0
- data/ext/tokyotyrant-1.1.39/tcrdb.h +801 -0
- data/ext/tokyotyrant-1.1.39/tcrmgr.c +1559 -0
- data/ext/tokyotyrant-1.1.39/tcrmttest.c +915 -0
- data/ext/tokyotyrant-1.1.39/tcrtest.c +1542 -0
- data/ext/tokyotyrant-1.1.39/tculog.c +1211 -0
- data/ext/tokyotyrant-1.1.39/tculog.h +392 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.idl +143 -0
- data/ext/tokyotyrant-1.1.39/tokyotyrant.pc.in +14 -0
- data/ext/tokyotyrant-1.1.39/ttservctl +163 -0
- data/ext/tokyotyrant-1.1.39/ttserver.c +3583 -0
- data/ext/tokyotyrant-1.1.39/ttskeldir.c +141 -0
- data/ext/tokyotyrant-1.1.39/ttskelmock.c +64 -0
- data/ext/tokyotyrant-1.1.39/ttskelnull.c +79 -0
- data/ext/tokyotyrant-1.1.39/ttskelproxy.c +74 -0
- data/ext/tokyotyrant-1.1.39/ttulmgr.c +266 -0
- data/ext/tokyotyrant-1.1.39/ttultest.c +371 -0
- data/ext/tokyotyrant-1.1.39/ttutil.c +1510 -0
- data/ext/tokyotyrant-1.1.39/ttutil.h +494 -0
- data/lib/tokyo_tyrant/balancer.rb +189 -0
- data/spec/ext.lua +4 -0
- data/spec/plu_db.rb +538 -0
- data/spec/spec.rb +1 -0
- data/spec/spec_base.rb +17 -0
- data/spec/start_tyrants.sh +36 -0
- data/spec/stop_tyrants.sh +9 -0
- data/spec/tokyo_tyrant_balancer_db_spec.rb +160 -0
- data/spec/tokyo_tyrant_balancer_table_spec.rb +177 -0
- data/spec/tokyo_tyrant_query_spec.rb +159 -0
- data/spec/tokyo_tyrant_spec.rb +254 -0
- data/spec/tokyo_tyrant_table_spec.rb +301 -0
- metadata +402 -0
@@ -0,0 +1,57 @@
|
|
1
|
+
--
|
2
|
+
-- MapReduce implementation by the Lua extension of Tokyo Tyrant
|
3
|
+
--
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
----------------------------------------------------------------
|
8
|
+
-- public functions
|
9
|
+
----------------------------------------------------------------
|
10
|
+
|
11
|
+
|
12
|
+
-- count words of all records
|
13
|
+
function wordcount(texpr)
|
14
|
+
local targets = nil
|
15
|
+
if texpr and #texpr > 0 then
|
16
|
+
targets = {}
|
17
|
+
table.insert(targets, texpr)
|
18
|
+
end
|
19
|
+
function mapper(key, value, mapemit)
|
20
|
+
for word in string.gmatch(string.lower(value), "%w+") do
|
21
|
+
mapemit(word, 1)
|
22
|
+
end
|
23
|
+
return true
|
24
|
+
end
|
25
|
+
local res = ""
|
26
|
+
function reducer(key, values)
|
27
|
+
res = res .. key .. "\t" .. #values .. "\n"
|
28
|
+
return true
|
29
|
+
end
|
30
|
+
if not _mapreduce(mapper, reducer, targets) then
|
31
|
+
res = nil
|
32
|
+
end
|
33
|
+
return res
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
----------------------------------------------------------------
|
39
|
+
-- private functions
|
40
|
+
----------------------------------------------------------------
|
41
|
+
|
42
|
+
|
43
|
+
-- call back function when starting
|
44
|
+
function _begin()
|
45
|
+
_log("Lua processor started")
|
46
|
+
_tmpdir_ = "/tmp"
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
-- call back function when ending
|
51
|
+
function _end()
|
52
|
+
_log("Lua processor finished")
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
-- END OF FILE
|
@@ -0,0 +1,55 @@
|
|
1
|
+
--
|
2
|
+
-- Queue mechanism by the Lua extension of Tokyo Tyrant
|
3
|
+
--
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
----------------------------------------------------------------
|
8
|
+
-- public functions
|
9
|
+
----------------------------------------------------------------
|
10
|
+
|
11
|
+
|
12
|
+
-- enqueue a record
|
13
|
+
function enqueue(key, value)
|
14
|
+
local id = _adddouble(key, 1)
|
15
|
+
if not id then
|
16
|
+
return nil
|
17
|
+
end
|
18
|
+
key = string.format("%s\t%012d", key, id)
|
19
|
+
if not _putkeep(key, value) then
|
20
|
+
return nil
|
21
|
+
end
|
22
|
+
return "ok"
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
-- dequeue a record
|
27
|
+
function dequeue(key, max)
|
28
|
+
max = tonumber(max)
|
29
|
+
if not max or max < 1 then
|
30
|
+
max = 1
|
31
|
+
end
|
32
|
+
key = string.format("%s\t", key)
|
33
|
+
local keys = _fwmkeys(key, max)
|
34
|
+
local res = ""
|
35
|
+
for i = 1, #keys do
|
36
|
+
local key = keys[i]
|
37
|
+
local value = _get(key)
|
38
|
+
if _out(key) and value then
|
39
|
+
res = res .. value .. "\n"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
return res
|
43
|
+
end
|
44
|
+
|
45
|
+
|
46
|
+
-- get the queue size
|
47
|
+
function queuesize(key)
|
48
|
+
key = string.format("%s\t", key)
|
49
|
+
local keys = _fwmkeys(key)
|
50
|
+
return #keys
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
-- END OF FILE
|
@@ -0,0 +1,532 @@
|
|
1
|
+
--
|
2
|
+
-- Sample functions of the Lua extension of Tokyo Tyrant
|
3
|
+
--
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
-- echo back the key and the value
|
8
|
+
function echo(key, value)
|
9
|
+
return key .. "\t" .. value .. "\n"
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
-- store a record
|
14
|
+
function put(key, value)
|
15
|
+
if not _put(key, value) then
|
16
|
+
return nil
|
17
|
+
end
|
18
|
+
return "ok"
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
-- store a new record
|
23
|
+
function putkeep(key, value)
|
24
|
+
if not _putkeep(key, value) then
|
25
|
+
return nil
|
26
|
+
end
|
27
|
+
return "ok"
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
-- concatenate a value at the end of the existing record
|
32
|
+
function putcat(key, value)
|
33
|
+
if not _putcat(key, value) then
|
34
|
+
return nil
|
35
|
+
end
|
36
|
+
return "ok"
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
-- remove a record
|
41
|
+
function out(key, value)
|
42
|
+
if not _out(key) then
|
43
|
+
return nil
|
44
|
+
end
|
45
|
+
return "ok"
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
-- retrieve a record
|
50
|
+
function get(key, value)
|
51
|
+
return _get(key)
|
52
|
+
end
|
53
|
+
|
54
|
+
|
55
|
+
-- get the size of the value of a record
|
56
|
+
function vsiz(key, value)
|
57
|
+
local vsiz = _vsiz(key)
|
58
|
+
if vsiz < 0 then
|
59
|
+
return nil
|
60
|
+
end
|
61
|
+
return vsiz
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
-- initialize the iterator
|
66
|
+
function iterinit(key, value)
|
67
|
+
if not _iterinit() then
|
68
|
+
return nil
|
69
|
+
end
|
70
|
+
return "ok"
|
71
|
+
end
|
72
|
+
|
73
|
+
|
74
|
+
-- get the next key of the iterator
|
75
|
+
function iternext(key, value)
|
76
|
+
return _iternext()
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
-- get forward matching keys
|
81
|
+
function fwmkeys(key, value)
|
82
|
+
value = tonumber(value)
|
83
|
+
local keys = _fwmkeys(key, value)
|
84
|
+
local res = ""
|
85
|
+
for i = 1, #keys do
|
86
|
+
res = res .. keys[i] .. "\n"
|
87
|
+
end
|
88
|
+
return res
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
-- add an integer to a record
|
93
|
+
function addint(key, value)
|
94
|
+
value = tonumber(value)
|
95
|
+
if not value then
|
96
|
+
return nil
|
97
|
+
end
|
98
|
+
return _addint(key, value)
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
-- add a real number to a record
|
103
|
+
function adddouble(key, value)
|
104
|
+
value = tonumber(value)
|
105
|
+
if not value then
|
106
|
+
return nil
|
107
|
+
end
|
108
|
+
return _adddouble(key, value)
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
-- remove all records
|
113
|
+
function vanish(key, value)
|
114
|
+
if not _vanish() then
|
115
|
+
return nil
|
116
|
+
end
|
117
|
+
return "ok"
|
118
|
+
end
|
119
|
+
|
120
|
+
|
121
|
+
-- get the number of records
|
122
|
+
function rnum(key, value)
|
123
|
+
return _rnum()
|
124
|
+
end
|
125
|
+
|
126
|
+
|
127
|
+
-- get the size of the database
|
128
|
+
function size(key, value)
|
129
|
+
return _size()
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
-- get records whose key matches a pattern
|
134
|
+
function find(key, value)
|
135
|
+
local res = ""
|
136
|
+
function proc(tkey, tvalue)
|
137
|
+
if string.match(tkey, key) then
|
138
|
+
res = res .. tkey .. "\t" .. tvalue .. "\n"
|
139
|
+
end
|
140
|
+
return true
|
141
|
+
end
|
142
|
+
_foreach(proc)
|
143
|
+
return res
|
144
|
+
end
|
145
|
+
|
146
|
+
|
147
|
+
-- get records whose key matches a pattern
|
148
|
+
function finddist(key, value)
|
149
|
+
value = tonumber(value)
|
150
|
+
if not value then
|
151
|
+
value = 0
|
152
|
+
end
|
153
|
+
local res = ""
|
154
|
+
function proc(tkey, tvalue)
|
155
|
+
if _dist(tkey, key) <= value then
|
156
|
+
res = res .. tkey .. "\t" .. tvalue .. "\n"
|
157
|
+
end
|
158
|
+
return true
|
159
|
+
end
|
160
|
+
_foreach(proc)
|
161
|
+
return res
|
162
|
+
end
|
163
|
+
|
164
|
+
|
165
|
+
-- store a record into tha stash
|
166
|
+
function stashput(key, value)
|
167
|
+
if not _stashput(key, value) then
|
168
|
+
return nil
|
169
|
+
end
|
170
|
+
return "ok"
|
171
|
+
end
|
172
|
+
|
173
|
+
|
174
|
+
-- remove a record of the stash
|
175
|
+
function stashout(key, value)
|
176
|
+
if not _stashout(key) then
|
177
|
+
return nil
|
178
|
+
end
|
179
|
+
return "ok"
|
180
|
+
end
|
181
|
+
|
182
|
+
|
183
|
+
-- retrieve a record in the stash
|
184
|
+
function stashget(key, value)
|
185
|
+
return _stashget(key)
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
-- retrieve all records in the stash
|
190
|
+
function stashlist(key, value)
|
191
|
+
key = tonumber(key)
|
192
|
+
if not key or key < 0 then
|
193
|
+
key = math.pow(2, 31)
|
194
|
+
end
|
195
|
+
local res = ""
|
196
|
+
function proc(tkey, tvalue)
|
197
|
+
if key < 1 then
|
198
|
+
return false
|
199
|
+
end
|
200
|
+
key = key - 1
|
201
|
+
res = res .. tkey .. "\t" .. tvalue .. "\n"
|
202
|
+
return true
|
203
|
+
end
|
204
|
+
_stashforeach(proc)
|
205
|
+
return res
|
206
|
+
end
|
207
|
+
|
208
|
+
|
209
|
+
-- lock an arbitrary key
|
210
|
+
function lock(key, value)
|
211
|
+
if not _lock(key) then
|
212
|
+
return nil
|
213
|
+
end
|
214
|
+
return "ok"
|
215
|
+
end
|
216
|
+
|
217
|
+
|
218
|
+
-- unlock an arbitrary key
|
219
|
+
function unlock(key, value)
|
220
|
+
if not _unlock(key) then
|
221
|
+
return nil
|
222
|
+
end
|
223
|
+
return "ok"
|
224
|
+
end
|
225
|
+
|
226
|
+
|
227
|
+
-- get the status information
|
228
|
+
function stat(key, value)
|
229
|
+
local msg = ""
|
230
|
+
msg = msg .. "version\t" .. _version .. "\n"
|
231
|
+
msg = msg .. "time\t" .. string.format("%.6f", _time()) .. "\n"
|
232
|
+
msg = msg .. "pid\t" .. _pid .. "\n"
|
233
|
+
msg = msg .. "sid\t" .. _sid .. "\n"
|
234
|
+
msg = msg .. "thid\t" .. _thid .. "\n"
|
235
|
+
msg = msg .. "rnum\t" .. _rnum() .. "\n"
|
236
|
+
msg = msg .. "size\t" .. _size() .. "\n"
|
237
|
+
return msg
|
238
|
+
end
|
239
|
+
|
240
|
+
|
241
|
+
-- increment the value as decimal number, store as string
|
242
|
+
function incr(key, value)
|
243
|
+
value = tonumber(value)
|
244
|
+
if not value then
|
245
|
+
return nil
|
246
|
+
end
|
247
|
+
local old = tonumber(_get(key))
|
248
|
+
if old then
|
249
|
+
value = value + old
|
250
|
+
end
|
251
|
+
if not _put(key, value) then
|
252
|
+
return nil
|
253
|
+
end
|
254
|
+
return value
|
255
|
+
end
|
256
|
+
|
257
|
+
|
258
|
+
-- increment the value as decimal number, store as int32 binary
|
259
|
+
function incrint32(key, value)
|
260
|
+
value = tonumber(value)
|
261
|
+
if not value then
|
262
|
+
return nil
|
263
|
+
end
|
264
|
+
local old = _unpack("i", _get(key))
|
265
|
+
if old and #old == 1 then
|
266
|
+
value = value + old[1]
|
267
|
+
end
|
268
|
+
if not _put(key, _pack("i", value)) then
|
269
|
+
return nil
|
270
|
+
end
|
271
|
+
return value
|
272
|
+
end
|
273
|
+
|
274
|
+
|
275
|
+
-- increment the value as decimal number, store as int64 binary
|
276
|
+
function incrint64(key, value)
|
277
|
+
value = tonumber(value)
|
278
|
+
if not value then
|
279
|
+
return nil
|
280
|
+
end
|
281
|
+
local old = _unpack("l", _get(key))
|
282
|
+
if old and #old == 1 then
|
283
|
+
value = value + old[1]
|
284
|
+
end
|
285
|
+
if not _put(key, _pack("l", value)) then
|
286
|
+
return nil
|
287
|
+
end
|
288
|
+
return value
|
289
|
+
end
|
290
|
+
|
291
|
+
|
292
|
+
-- increment the value as decimal number, store as double binary
|
293
|
+
function incrdouble(key, value)
|
294
|
+
value = tonumber(value)
|
295
|
+
if not value then
|
296
|
+
return nil
|
297
|
+
end
|
298
|
+
local old = _unpack("d", _get(key))
|
299
|
+
if old and #old == 1 then
|
300
|
+
value = value + old[1]
|
301
|
+
end
|
302
|
+
if not _put(key, _pack("d", value)) then
|
303
|
+
return nil
|
304
|
+
end
|
305
|
+
return value
|
306
|
+
end
|
307
|
+
|
308
|
+
|
309
|
+
-- call a versatile function of the misc function
|
310
|
+
function misc(key, value)
|
311
|
+
local args = {}
|
312
|
+
for arg in string.gmatch(value, "[^\t\n]+") do
|
313
|
+
table.insert(args, arg)
|
314
|
+
end
|
315
|
+
local res = _misc(key, args)
|
316
|
+
if not res then
|
317
|
+
return nil
|
318
|
+
end
|
319
|
+
local rbuf = ""
|
320
|
+
for i = 1, #res do
|
321
|
+
rbuf = rbuf .. res[i] .. "\n"
|
322
|
+
end
|
323
|
+
return rbuf
|
324
|
+
end
|
325
|
+
|
326
|
+
|
327
|
+
-- split a string
|
328
|
+
function split(key, value)
|
329
|
+
if #value < 1 then
|
330
|
+
value = nil
|
331
|
+
end
|
332
|
+
local elems = _split(key, value)
|
333
|
+
local res = ""
|
334
|
+
for i = 1, #elems do
|
335
|
+
res = res .. elems[i] .. "\n"
|
336
|
+
end
|
337
|
+
return res
|
338
|
+
end
|
339
|
+
|
340
|
+
|
341
|
+
-- encode or decode a string
|
342
|
+
function codec(key, value)
|
343
|
+
if key == "ucs" then
|
344
|
+
local ary = _ucs(value)
|
345
|
+
return _pack("n*", ary)
|
346
|
+
elseif key == "~ucs" then
|
347
|
+
local ary = _unpack("n*", value)
|
348
|
+
return _ucs(ary)
|
349
|
+
end
|
350
|
+
return _codec(key, value)
|
351
|
+
end
|
352
|
+
|
353
|
+
|
354
|
+
-- get the hash value
|
355
|
+
function hash(key, value)
|
356
|
+
return _hash(key, value)
|
357
|
+
end
|
358
|
+
|
359
|
+
|
360
|
+
-- get the bitwise-and of two integers
|
361
|
+
function bitand(key, value)
|
362
|
+
key = tonumber(key)
|
363
|
+
value = tonumber(value)
|
364
|
+
if not key or not value then
|
365
|
+
return nil
|
366
|
+
end
|
367
|
+
return _bit("and", key, value)
|
368
|
+
end
|
369
|
+
|
370
|
+
|
371
|
+
-- check substring matching
|
372
|
+
function strstr(key, value)
|
373
|
+
return tostring(_strstr(key, value))
|
374
|
+
end
|
375
|
+
|
376
|
+
|
377
|
+
-- check matching with regular expressions
|
378
|
+
function regex(key, value)
|
379
|
+
return tostring(_regex(key, value))
|
380
|
+
end
|
381
|
+
|
382
|
+
|
383
|
+
-- calculate the edit distance
|
384
|
+
function dist(key, value)
|
385
|
+
return _dist(key, value)
|
386
|
+
end
|
387
|
+
|
388
|
+
|
389
|
+
-- get the currnet time
|
390
|
+
function time(key, value)
|
391
|
+
return string.format("%.6f",_time())
|
392
|
+
end
|
393
|
+
|
394
|
+
|
395
|
+
-- sleep and notice
|
396
|
+
function sleep(key, value)
|
397
|
+
key = tonumber(key)
|
398
|
+
if not key or key < 0 then
|
399
|
+
return nil
|
400
|
+
end
|
401
|
+
_sleep(key)
|
402
|
+
return "ok"
|
403
|
+
end
|
404
|
+
|
405
|
+
|
406
|
+
-- get status of a file
|
407
|
+
function statfile(key, value)
|
408
|
+
local stat = _stat(key)
|
409
|
+
if not stat then
|
410
|
+
return nil
|
411
|
+
end
|
412
|
+
local res = ""
|
413
|
+
for tkey, tval in pairs(stat) do
|
414
|
+
res = res .. tkey .. "\t" .. tostring(tval) .. "\n"
|
415
|
+
end
|
416
|
+
return res
|
417
|
+
end
|
418
|
+
|
419
|
+
|
420
|
+
-- find pathnames matching a pattern
|
421
|
+
function glob(key, value)
|
422
|
+
local paths = _glob(key)
|
423
|
+
local res = ""
|
424
|
+
for i = 1, #paths do
|
425
|
+
res = res .. paths[i] .. "\n"
|
426
|
+
end
|
427
|
+
return res
|
428
|
+
end
|
429
|
+
|
430
|
+
|
431
|
+
-- remove a file or a directory and its sub ones recursively
|
432
|
+
function remove(key, value)
|
433
|
+
if not _remove(key) then
|
434
|
+
return nil
|
435
|
+
end
|
436
|
+
return "ok"
|
437
|
+
end
|
438
|
+
|
439
|
+
|
440
|
+
-- create a directory
|
441
|
+
function mkdir(key, value)
|
442
|
+
if not _mkdir(key) then
|
443
|
+
return nil
|
444
|
+
end
|
445
|
+
return "ok"
|
446
|
+
end
|
447
|
+
|
448
|
+
|
449
|
+
-- evaluate a string
|
450
|
+
function eval(key, value)
|
451
|
+
if not _eval(key) then
|
452
|
+
return nil
|
453
|
+
end
|
454
|
+
return "ok"
|
455
|
+
end
|
456
|
+
|
457
|
+
|
458
|
+
-- log a string
|
459
|
+
function log(key, value)
|
460
|
+
local level = tonumber(value)
|
461
|
+
if not level then
|
462
|
+
level = 1
|
463
|
+
end
|
464
|
+
_log(key, level)
|
465
|
+
return "ok"
|
466
|
+
end
|
467
|
+
|
468
|
+
|
469
|
+
-- log the current time
|
470
|
+
function logtime(key, value)
|
471
|
+
_log("current time: " .. _time())
|
472
|
+
end
|
473
|
+
|
474
|
+
|
475
|
+
-- remove expired records of a table database
|
476
|
+
function expire()
|
477
|
+
local args = {};
|
478
|
+
local cdate = string.format("%d", _time())
|
479
|
+
table.insert(args, "addcond\0x\0NUMLE\0" .. cdate)
|
480
|
+
table.insert(args, "out")
|
481
|
+
local res = _misc("search", args)
|
482
|
+
if not res then
|
483
|
+
_log("expiration was failed", 2)
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
|
488
|
+
-- remove expired records of a table database
|
489
|
+
function expire2()
|
490
|
+
local args = {};
|
491
|
+
local xdate = string.format("%d", _time() - 3600)
|
492
|
+
table.insert(args, "addcond\0d\0NUMLE\0" .. xdate)
|
493
|
+
table.insert(args, "out")
|
494
|
+
local res = _misc("search", args)
|
495
|
+
if not res then
|
496
|
+
_log("expiration was failed", 2)
|
497
|
+
end
|
498
|
+
end
|
499
|
+
|
500
|
+
|
501
|
+
-- defrag the database file
|
502
|
+
function defrag()
|
503
|
+
local time = tonumber(os.date("%H%M"))
|
504
|
+
if time >= 2230 or time <= 0130 then
|
505
|
+
return nil
|
506
|
+
end
|
507
|
+
if not _misc("defrag") then
|
508
|
+
_log("defragmentation was failed", 2)
|
509
|
+
end
|
510
|
+
end
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
----------------------------------------------------------------
|
515
|
+
-- private functions
|
516
|
+
----------------------------------------------------------------
|
517
|
+
|
518
|
+
|
519
|
+
-- call back function when starting
|
520
|
+
function _begin()
|
521
|
+
_log("Lua processor started")
|
522
|
+
end
|
523
|
+
|
524
|
+
|
525
|
+
-- call back function when ending
|
526
|
+
function _end()
|
527
|
+
_log("Lua processor finished")
|
528
|
+
end
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
-- END OF FILE
|