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,68 @@
|
|
1
|
+
# Makefile for sample programs of Hyper Estraier
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
#================================================================
|
6
|
+
# Setting Variables
|
7
|
+
#================================================================
|
8
|
+
|
9
|
+
|
10
|
+
# Generic settings
|
11
|
+
SHELL = /bin/sh
|
12
|
+
|
13
|
+
# Targets
|
14
|
+
MYBINS = tcrdbex tcrdbtblex
|
15
|
+
|
16
|
+
# Building binaries
|
17
|
+
CC = gcc
|
18
|
+
CFLAGS = -ansi -Wall -pedantic -I. -I.. -Wall
|
19
|
+
LDFLAGS =
|
20
|
+
LIBS = -L. -L.. -ltokyotyrant -ltokyocabinet -lz -lresolv -lnsl -lpthread -lm -lc
|
21
|
+
LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:..
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
#================================================================
|
26
|
+
# Suffix rules
|
27
|
+
#================================================================
|
28
|
+
|
29
|
+
|
30
|
+
.SUFFIXES :
|
31
|
+
.SUFFIXES : .c .o
|
32
|
+
|
33
|
+
.c.o :
|
34
|
+
$(CC) -c $(CFLAGS) $<
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
#================================================================
|
39
|
+
# Actions
|
40
|
+
#================================================================
|
41
|
+
|
42
|
+
|
43
|
+
all : $(MYBINS)
|
44
|
+
|
45
|
+
|
46
|
+
clean :
|
47
|
+
rm -rf $(MYBINS) *.exe *.o a.out check.out gmon.out leak.log casket* *~
|
48
|
+
|
49
|
+
|
50
|
+
.PHONY : all clean
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
#================================================================
|
55
|
+
# Building binaries
|
56
|
+
#================================================================
|
57
|
+
|
58
|
+
|
59
|
+
tcrdbex : tcrdbex.o
|
60
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
61
|
+
|
62
|
+
|
63
|
+
tcrdbtblex : tcrdbtblex.o
|
64
|
+
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
# END OF FILE
|
@@ -0,0 +1,88 @@
|
|
1
|
+
#! /usr/bin/perl
|
2
|
+
|
3
|
+
use strict;
|
4
|
+
use warnings;
|
5
|
+
|
6
|
+
use LWP::UserAgent;
|
7
|
+
|
8
|
+
my $err = 0;
|
9
|
+
my $ua = LWP::UserAgent->new(keep_alive => 1);
|
10
|
+
my $baseurl = 'http://localhost:1978/';
|
11
|
+
|
12
|
+
my $req = HTTP::Request->new(PUT => $baseurl . "%E5%B9%B3%E6%9E%97", [], "mikio");
|
13
|
+
my $res = $ua->request($req);
|
14
|
+
my $code = $res->code();
|
15
|
+
if($code != 201){
|
16
|
+
printf("Error: %s\n", $res->status_line());
|
17
|
+
$err = 1;
|
18
|
+
}
|
19
|
+
|
20
|
+
foreach my $i (1..100){
|
21
|
+
$req = HTTP::Request->new(PUT => $baseurl . $i, [], "mikio:$i");
|
22
|
+
$res = $ua->request($req);
|
23
|
+
if($res->code() != 201){
|
24
|
+
printf("Error: %s\n", $res->status_line());
|
25
|
+
$err = 1;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
|
29
|
+
foreach my $i (1..10){
|
30
|
+
my $pdmode = int(rand(3));
|
31
|
+
$req = HTTP::Request->new(PUT => $baseurl . $i,
|
32
|
+
["X-TT-PDMODE" => $pdmode], "mikio:$i");
|
33
|
+
$res = $ua->request($req);
|
34
|
+
$code = $res->code();
|
35
|
+
if($code != 201 && $code != 409){
|
36
|
+
printf("Error: %s\n", $res->status_line());
|
37
|
+
$err = 1;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
for(my $i = 1; $i < 107; $i += 7){
|
42
|
+
$req = HTTP::Request->new(DELETE => $baseurl . $i);
|
43
|
+
$res = $ua->request($req);
|
44
|
+
if($res->is_error() && $res->code() != 404){
|
45
|
+
printf("Error: %s\n", $res->status_line());
|
46
|
+
$err = 1;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
for(my $i = 1; $i < 100; $i += 3){
|
51
|
+
$req = HTTP::Request->new(POST => $baseurl . $i,
|
52
|
+
["X-TT-XNAME" => "echo", "X-TT-XOPTS" => 1], "hirabayashi:$i");
|
53
|
+
$res = $ua->request($req);
|
54
|
+
}
|
55
|
+
|
56
|
+
for(my $i = 1; $i < 100; $i += 3){
|
57
|
+
$req = HTTP::Request->new(POST => $baseurl . $i,
|
58
|
+
["X-TT-MNAME" => "getlist", "X-TT-MOPTS" => 1], "1=$i&2=$i");
|
59
|
+
$res = $ua->request($req);
|
60
|
+
}
|
61
|
+
|
62
|
+
foreach my $i (1..107){
|
63
|
+
$req = HTTP::Request->new(GET => $baseurl . $i);
|
64
|
+
$res = $ua->request($req);
|
65
|
+
$code = $res->code();
|
66
|
+
if($res->is_success()){
|
67
|
+
printf("%d: %s\n", $i, $res->content());
|
68
|
+
} elsif($res->code() != 404){
|
69
|
+
printf("Error: %s\n", $res->status_line());
|
70
|
+
$err = 1;
|
71
|
+
}
|
72
|
+
$req = HTTP::Request->new(HEAD => $baseurl . $i);
|
73
|
+
$res = $ua->request($req);
|
74
|
+
if($res->is_success()){
|
75
|
+
printf("%d: %s\n", $i, $res->header("content-length"));
|
76
|
+
} elsif($res->code() != 404){
|
77
|
+
printf("Error: %s\n", $res->status_line());
|
78
|
+
$err = 1;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
if($err){
|
83
|
+
printf("finished with error\n");
|
84
|
+
exit(1);
|
85
|
+
}
|
86
|
+
|
87
|
+
printf("finished successfully\n");
|
88
|
+
exit(1);
|
@@ -0,0 +1,39 @@
|
|
1
|
+
#! /usr/bin/perl
|
2
|
+
|
3
|
+
use strict;
|
4
|
+
use warnings;
|
5
|
+
|
6
|
+
use Cache::Memcached::Fast;
|
7
|
+
|
8
|
+
my $memd = Cache::Memcached::Fast->new({
|
9
|
+
servers => [{ address => "localhost:1978", noreply => 1 }],
|
10
|
+
connect_timeout => 10,
|
11
|
+
});
|
12
|
+
|
13
|
+
$memd->flush_all();
|
14
|
+
foreach my $i (1..100){
|
15
|
+
my $rnd = int(rand(10));
|
16
|
+
my $key = int(rand(100));
|
17
|
+
if($rnd == 0){
|
18
|
+
$memd->add($key, "[add:$i]");
|
19
|
+
} elsif($rnd == 1){
|
20
|
+
$memd->replace($key, "[replace:$i]");
|
21
|
+
} elsif($rnd == 2){
|
22
|
+
$memd->append($key, "[append:$i]");
|
23
|
+
} elsif($rnd == 3){
|
24
|
+
$memd->prepend($key, "[prepend:$i]");
|
25
|
+
} elsif($rnd == 4){
|
26
|
+
$memd->delete($key);
|
27
|
+
} elsif($rnd == 5){
|
28
|
+
$memd->incr($key, 1);
|
29
|
+
} elsif($rnd == 6){
|
30
|
+
$memd->decr($key, 1);
|
31
|
+
} else {
|
32
|
+
$memd->set($key, "[set:$i]");
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
foreach my $i (1..100){
|
37
|
+
my $val = $memd->get($i, $i);
|
38
|
+
printf("%d: %s\n", $i, defined($val) ? $val : "(undef)");
|
39
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#! /usr/bin/perl
|
2
|
+
|
3
|
+
use strict;
|
4
|
+
use warnings;
|
5
|
+
|
6
|
+
use Cache::Memcached;
|
7
|
+
|
8
|
+
my $memd = Cache::Memcached->new();
|
9
|
+
$memd->set_servers(["localhost:1978"]);
|
10
|
+
|
11
|
+
$memd->flush_all();
|
12
|
+
foreach my $i (1..100){
|
13
|
+
$memd->set($i, "mikio:$i");
|
14
|
+
}
|
15
|
+
foreach my $i (1..101){
|
16
|
+
$memd->add($i, "hirabayashi:$i");
|
17
|
+
}
|
18
|
+
foreach my $i (1..100){
|
19
|
+
$memd->replace($i, $i);
|
20
|
+
}
|
21
|
+
foreach my $i (1..100){
|
22
|
+
$memd->incr($i, 100);
|
23
|
+
}
|
24
|
+
foreach my $i (1..100){
|
25
|
+
$memd->decr($i, 10);
|
26
|
+
}
|
27
|
+
for(my $i = 1; $i < 100; $i += 7){
|
28
|
+
$memd->delete($i);
|
29
|
+
}
|
30
|
+
foreach my $i (1..102){
|
31
|
+
my $val = $memd->get($i, $i);
|
32
|
+
printf("%d: %s\n", $i, defined($val) ? $val : "(undef)");
|
33
|
+
}
|
34
|
+
my $stats = $memd->stats();
|
35
|
+
while(my ($key, $value) = each(%$stats)){
|
36
|
+
if(ref($value) eq 'HASH'){
|
37
|
+
while(my ($tkey, $tvalue) = each(%$value)){
|
38
|
+
printf("%s:%s:%s\n", $key, $tkey, $tvalue);
|
39
|
+
}
|
40
|
+
} else {
|
41
|
+
printf("%s:%s\n", $key, $value);
|
42
|
+
}
|
43
|
+
}
|
Binary file
|
@@ -0,0 +1,49 @@
|
|
1
|
+
#include <tcrdb.h>
|
2
|
+
#include <stdlib.h>
|
3
|
+
#include <stdbool.h>
|
4
|
+
#include <stdint.h>
|
5
|
+
|
6
|
+
int main(int argc, char **argv){
|
7
|
+
|
8
|
+
TCRDB *rdb;
|
9
|
+
int ecode;
|
10
|
+
char *value;
|
11
|
+
|
12
|
+
/* create the object */
|
13
|
+
rdb = tcrdbnew();
|
14
|
+
|
15
|
+
/* connect to the server */
|
16
|
+
if(!tcrdbopen(rdb, "localhost", 1978)){
|
17
|
+
ecode = tcrdbecode(rdb);
|
18
|
+
fprintf(stderr, "open error: %s\n", tcrdberrmsg(ecode));
|
19
|
+
}
|
20
|
+
|
21
|
+
/* store records */
|
22
|
+
if(!tcrdbput2(rdb, "foo", "hop") ||
|
23
|
+
!tcrdbput2(rdb, "bar", "step") ||
|
24
|
+
!tcrdbput2(rdb, "baz", "jump")){
|
25
|
+
ecode = tcrdbecode(rdb);
|
26
|
+
fprintf(stderr, "put error: %s\n", tcrdberrmsg(ecode));
|
27
|
+
}
|
28
|
+
|
29
|
+
/* retrieve records */
|
30
|
+
value = tcrdbget2(rdb, "foo");
|
31
|
+
if(value){
|
32
|
+
printf("%s\n", value);
|
33
|
+
free(value);
|
34
|
+
} else {
|
35
|
+
ecode = tcrdbecode(rdb);
|
36
|
+
fprintf(stderr, "get error: %s\n", tcrdberrmsg(ecode));
|
37
|
+
}
|
38
|
+
|
39
|
+
/* close the connection */
|
40
|
+
if(!tcrdbclose(rdb)){
|
41
|
+
ecode = tcrdbecode(rdb);
|
42
|
+
fprintf(stderr, "close error: %s\n", tcrdberrmsg(ecode));
|
43
|
+
}
|
44
|
+
|
45
|
+
/* delete the object */
|
46
|
+
tcrdbdel(rdb);
|
47
|
+
|
48
|
+
return 0;
|
49
|
+
}
|
Binary file
|
Binary file
|
@@ -0,0 +1,79 @@
|
|
1
|
+
#include <tcrdb.h>
|
2
|
+
#include <stdlib.h>
|
3
|
+
#include <stdbool.h>
|
4
|
+
#include <stdint.h>
|
5
|
+
|
6
|
+
int main(int argc, char **argv){
|
7
|
+
|
8
|
+
TCRDB *rdb;
|
9
|
+
int ecode, pksiz, i, rsiz;
|
10
|
+
char pkbuf[256];
|
11
|
+
const char *rbuf, *name;
|
12
|
+
TCMAP *cols;
|
13
|
+
RDBQRY *qry;
|
14
|
+
TCLIST *res;
|
15
|
+
|
16
|
+
/* create the object */
|
17
|
+
rdb = tcrdbnew();
|
18
|
+
|
19
|
+
/* connect to the server */
|
20
|
+
if(!tcrdbopen(rdb, "localhost", 1978)){
|
21
|
+
ecode = tcrdbecode(rdb);
|
22
|
+
fprintf(stderr, "open error: %s\n", tcrdberrmsg(ecode));
|
23
|
+
}
|
24
|
+
|
25
|
+
/* store a record */
|
26
|
+
pksiz = sprintf(pkbuf, "%ld", (long)tcrdbtblgenuid(rdb));
|
27
|
+
cols = tcmapnew3("name", "mikio", "age", "30", "lang", "ja,en,c", NULL);
|
28
|
+
if(!tcrdbtblput(rdb, pkbuf, pksiz, cols)){
|
29
|
+
ecode = tcrdbecode(rdb);
|
30
|
+
fprintf(stderr, "put error: %s\n", tcrdberrmsg(ecode));
|
31
|
+
}
|
32
|
+
tcmapdel(cols);
|
33
|
+
|
34
|
+
/* store a record in a naive way */
|
35
|
+
pksiz = sprintf(pkbuf, "12345");
|
36
|
+
cols = tcmapnew();
|
37
|
+
tcmapput2(cols, "name", "falcon");
|
38
|
+
tcmapput2(cols, "age", "31");
|
39
|
+
tcmapput2(cols, "lang", "ja");
|
40
|
+
if(!tcrdbtblput(rdb, pkbuf, pksiz, cols)){
|
41
|
+
ecode = tcrdbecode(rdb);
|
42
|
+
fprintf(stderr, "put error: %s\n", tcrdberrmsg(ecode));
|
43
|
+
}
|
44
|
+
tcmapdel(cols);
|
45
|
+
|
46
|
+
/* search for records */
|
47
|
+
qry = tcrdbqrynew(rdb);
|
48
|
+
tcrdbqryaddcond(qry, "age", RDBQCNUMGE, "20");
|
49
|
+
tcrdbqryaddcond(qry, "lang", RDBQCSTROR, "ja,en");
|
50
|
+
tcrdbqrysetorder(qry, "name", RDBQOSTRASC);
|
51
|
+
tcrdbqrysetlimit(qry, 10, 0);
|
52
|
+
res = tcrdbqrysearch(qry);
|
53
|
+
for(i = 0; i < tclistnum(res); i++){
|
54
|
+
rbuf = tclistval(res, i, &rsiz);
|
55
|
+
cols = tcrdbtblget(rdb, rbuf, rsiz);
|
56
|
+
if(cols){
|
57
|
+
printf("%s", rbuf);
|
58
|
+
tcmapiterinit(cols);
|
59
|
+
while((name = tcmapiternext2(cols)) != NULL){
|
60
|
+
printf("\t%s\t%s", name, tcmapget2(cols, name));
|
61
|
+
}
|
62
|
+
printf("\n");
|
63
|
+
tcmapdel(cols);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
tclistdel(res);
|
67
|
+
tcrdbqrydel(qry);
|
68
|
+
|
69
|
+
/* close the connection */
|
70
|
+
if(!tcrdbclose(rdb)){
|
71
|
+
ecode = tcrdbecode(rdb);
|
72
|
+
fprintf(stderr, "close error: %s\n", tcrdberrmsg(ecode));
|
73
|
+
}
|
74
|
+
|
75
|
+
/* delete the object */
|
76
|
+
tcrdbdel(rdb);
|
77
|
+
|
78
|
+
return 0;
|
79
|
+
}
|
Binary file
|
@@ -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
|