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,438 @@
|
|
1
|
+
--
|
2
|
+
-- Inverted index by the Lua extension of Tokyo Tyrant
|
3
|
+
--
|
4
|
+
|
5
|
+
|
6
|
+
-- constants
|
7
|
+
DELIMS = " \t\r\n" -- delimiters of tokenizing
|
8
|
+
LIMNUM = 2000 -- limit number of kept occurrence
|
9
|
+
DEFMAX = 10 -- default maximum number of search
|
10
|
+
IDPREFIX = "\t#" -- prefix to get the ID from the URI
|
11
|
+
URIPREFIX = "\t@" -- prefix to get the URI from the ID
|
12
|
+
TEXTPREFIX = "\t|" -- prefix of get the text from the ID
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
----------------------------------------------------------------
|
17
|
+
-- public functions
|
18
|
+
----------------------------------------------------------------
|
19
|
+
|
20
|
+
|
21
|
+
-- register a record with the ID and the text
|
22
|
+
function put(id, text)
|
23
|
+
id = tonumber(id)
|
24
|
+
if not id or id < 1 then
|
25
|
+
return nil
|
26
|
+
end
|
27
|
+
if not text then
|
28
|
+
return nil
|
29
|
+
end
|
30
|
+
if not _putimpl(id, text) then
|
31
|
+
return nil
|
32
|
+
end
|
33
|
+
return "ok"
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
-- remove a record with the ID and the text
|
38
|
+
function out(id, text)
|
39
|
+
id = tonumber(id)
|
40
|
+
if not id or id < 1 then
|
41
|
+
return nil
|
42
|
+
end
|
43
|
+
if not text then
|
44
|
+
return nil
|
45
|
+
end
|
46
|
+
if not _outimpl(id, text) then
|
47
|
+
return nil
|
48
|
+
end
|
49
|
+
return "ok"
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
-- replace a record with the ID and the text before and the text after
|
54
|
+
function replace(id, befaft)
|
55
|
+
id = tonumber(id)
|
56
|
+
if not id or id < 1 then
|
57
|
+
return nil
|
58
|
+
end
|
59
|
+
if not befaft then
|
60
|
+
return nil
|
61
|
+
end
|
62
|
+
local pivot = string.find(befaft, "\n", 1, true)
|
63
|
+
if not pivot then
|
64
|
+
return nil
|
65
|
+
end
|
66
|
+
local bef = string.sub(befaft, 1, pivot - 1)
|
67
|
+
local aft = string.sub(befaft, pivot + 1)
|
68
|
+
if not _outimpl(id, bef) then
|
69
|
+
return nil
|
70
|
+
end
|
71
|
+
if not _putimpl(id, aft) then
|
72
|
+
return nil
|
73
|
+
end
|
74
|
+
return "ok"
|
75
|
+
end
|
76
|
+
|
77
|
+
|
78
|
+
-- search with a phrase of intersection
|
79
|
+
function search(phrase, max)
|
80
|
+
if not phrase then
|
81
|
+
return nil
|
82
|
+
end
|
83
|
+
max = tonumber(max)
|
84
|
+
if not max or max < 0 then
|
85
|
+
max = DEFMAX
|
86
|
+
end
|
87
|
+
local result = _searchimpl(phrase, false)
|
88
|
+
local rtxt = #result .. "\n"
|
89
|
+
local bot = #result - max + 1
|
90
|
+
if bot < 1 then
|
91
|
+
bot = 1
|
92
|
+
end
|
93
|
+
for i = #result, bot, -1 do
|
94
|
+
rtxt = rtxt .. result[i] .. "\n"
|
95
|
+
end
|
96
|
+
return rtxt
|
97
|
+
end
|
98
|
+
|
99
|
+
|
100
|
+
-- register a record with the URI and the text
|
101
|
+
function xput(uri, text)
|
102
|
+
if not uri or #uri < 1 or not text then
|
103
|
+
return nil
|
104
|
+
end
|
105
|
+
if not _xputimpl(uri, text) then
|
106
|
+
return nil
|
107
|
+
end
|
108
|
+
return "ok"
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
-- remove a record with the URI
|
113
|
+
function xout(uri)
|
114
|
+
if not uri or #uri < 1 then
|
115
|
+
return nil
|
116
|
+
end
|
117
|
+
if not _xoutimpl(uri) then
|
118
|
+
return nil
|
119
|
+
end
|
120
|
+
return "ok"
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
-- retrieve a record with the URI
|
125
|
+
function xget(uri)
|
126
|
+
if not uri or #uri < 1 then
|
127
|
+
return nil
|
128
|
+
end
|
129
|
+
local id = _get(IDPREFIX .. uri)
|
130
|
+
id = tonumber(id)
|
131
|
+
if not id then
|
132
|
+
return nil
|
133
|
+
end
|
134
|
+
local text = _get(TEXTPREFIX .. id)
|
135
|
+
if not text then
|
136
|
+
return nil
|
137
|
+
end
|
138
|
+
return text
|
139
|
+
end
|
140
|
+
|
141
|
+
|
142
|
+
-- search for URIs with a phrase of intersection
|
143
|
+
function xsearch(phrase, max)
|
144
|
+
if not phrase then
|
145
|
+
return nil
|
146
|
+
end
|
147
|
+
max = tonumber(max)
|
148
|
+
if not max or max < 0 then
|
149
|
+
max = DEFMAX
|
150
|
+
end
|
151
|
+
local result = _searchimpl(phrase, false)
|
152
|
+
local rtxt = #result .. "\n"
|
153
|
+
for i = #result, 1, -1 do
|
154
|
+
if max < 1 then
|
155
|
+
break
|
156
|
+
end
|
157
|
+
local uri = _get(URIPREFIX .. result[i])
|
158
|
+
if uri then
|
159
|
+
rtxt = rtxt .. uri .. "\n"
|
160
|
+
max = max - 1
|
161
|
+
end
|
162
|
+
end
|
163
|
+
return rtxt
|
164
|
+
end
|
165
|
+
|
166
|
+
|
167
|
+
-- make the stash of suggestion words
|
168
|
+
function stashmake(minhit)
|
169
|
+
minhit = tonumber(minhit)
|
170
|
+
if not minhit or minhit < 0 then
|
171
|
+
minhit = 0
|
172
|
+
end
|
173
|
+
_stashvanish()
|
174
|
+
function proc(word, idsel)
|
175
|
+
if not string.match(word, "\t") then
|
176
|
+
local result = _unpack("w*", idsel)
|
177
|
+
if #result >= minhit then
|
178
|
+
_stashput(word, #result)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
return true
|
182
|
+
end
|
183
|
+
_foreach(proc)
|
184
|
+
return "ok"
|
185
|
+
end
|
186
|
+
|
187
|
+
|
188
|
+
-- retrieve similar words in the stash
|
189
|
+
function stashlist(word, max)
|
190
|
+
max = tonumber(max)
|
191
|
+
if not max or max < 0 then
|
192
|
+
max = DEFMAX
|
193
|
+
end
|
194
|
+
local result = {}
|
195
|
+
function proc(tword, hnum)
|
196
|
+
local dist = _dist(tword, word, true)
|
197
|
+
if dist <= 3 then
|
198
|
+
table.insert(result, { tword, dist, tonumber(hnum) })
|
199
|
+
end
|
200
|
+
return true
|
201
|
+
end
|
202
|
+
_stashforeach(proc)
|
203
|
+
function reccmp(a, b)
|
204
|
+
if a[2] > b[2] then
|
205
|
+
return true
|
206
|
+
end
|
207
|
+
if a[2] == b[2] and a[3] < b[3] then
|
208
|
+
return true
|
209
|
+
end
|
210
|
+
return false
|
211
|
+
end
|
212
|
+
table.sort(result, reccmp)
|
213
|
+
local rtxt = ""
|
214
|
+
local bot = #result - max + 1
|
215
|
+
if bot < 1 then
|
216
|
+
bot = 1
|
217
|
+
end
|
218
|
+
for i = #result, bot, -1 do
|
219
|
+
local rec = result[i]
|
220
|
+
rtxt = rtxt .. rec[1] .. "\t" .. rec[2] .. "\t" .. rec[3] .. "\n"
|
221
|
+
end
|
222
|
+
return rtxt
|
223
|
+
end
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
----------------------------------------------------------------
|
228
|
+
-- private functions
|
229
|
+
----------------------------------------------------------------
|
230
|
+
|
231
|
+
|
232
|
+
-- call back function when starting
|
233
|
+
function _begin()
|
234
|
+
_log("Lua processor started")
|
235
|
+
end
|
236
|
+
|
237
|
+
|
238
|
+
-- call back function when ending
|
239
|
+
function _end()
|
240
|
+
_log("Lua processor finished")
|
241
|
+
end
|
242
|
+
|
243
|
+
|
244
|
+
-- register a record with the ID and the text
|
245
|
+
function _putimpl(id, text)
|
246
|
+
local tokens = _tokenize(text)
|
247
|
+
if math.random() < 5 / LIMNUM then
|
248
|
+
for i = 1, #tokens do
|
249
|
+
token = tokens[i]
|
250
|
+
if not _lock(token) then
|
251
|
+
_log("lock error")
|
252
|
+
return false
|
253
|
+
end
|
254
|
+
local ids = {}
|
255
|
+
local idsel = _get(token)
|
256
|
+
if idsel then
|
257
|
+
ids = _unpack("w*", idsel)
|
258
|
+
end
|
259
|
+
local nids = {}
|
260
|
+
local top = #ids - LIMNUM + 2
|
261
|
+
if top < 1 then
|
262
|
+
top = 1
|
263
|
+
end
|
264
|
+
for j = top, #ids do
|
265
|
+
table.insert(nids, ids[j])
|
266
|
+
end
|
267
|
+
table.insert(nids, id)
|
268
|
+
idsel = _pack("w*", nids)
|
269
|
+
if not _put(token, idsel) then
|
270
|
+
_log("put error")
|
271
|
+
_unlock(token)
|
272
|
+
return false
|
273
|
+
end
|
274
|
+
_unlock(token)
|
275
|
+
end
|
276
|
+
else
|
277
|
+
local idsel = _pack("w", id)
|
278
|
+
for i = 1, #tokens do
|
279
|
+
token = tokens[i]
|
280
|
+
if not _lock(token) then
|
281
|
+
_log("lock error")
|
282
|
+
return false
|
283
|
+
end
|
284
|
+
if not _putcat(token, idsel) then
|
285
|
+
_log("putcat error")
|
286
|
+
_unlock(token)
|
287
|
+
return false
|
288
|
+
end
|
289
|
+
_unlock(token)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
return true
|
293
|
+
end
|
294
|
+
|
295
|
+
|
296
|
+
-- remove a record with the ID and the text
|
297
|
+
function _outimpl(id, text)
|
298
|
+
local tokens = _tokenize(text)
|
299
|
+
for i = 1, #tokens do
|
300
|
+
token = tokens[i]
|
301
|
+
if not _lock(token) then
|
302
|
+
_log("lock error")
|
303
|
+
return false
|
304
|
+
end
|
305
|
+
local ids = {}
|
306
|
+
local idsel = _get(token)
|
307
|
+
if idsel then
|
308
|
+
ids = _unpack("w*", idsel)
|
309
|
+
end
|
310
|
+
local nids = {}
|
311
|
+
for j = 1, #ids do
|
312
|
+
if ids[j] ~= id then
|
313
|
+
table.insert(nids, ids[j])
|
314
|
+
end
|
315
|
+
end
|
316
|
+
idsel = _pack("w*", nids)
|
317
|
+
if not _put(token, idsel) then
|
318
|
+
_log("put error")
|
319
|
+
_unlock(token)
|
320
|
+
return false
|
321
|
+
end
|
322
|
+
_unlock(token)
|
323
|
+
end
|
324
|
+
return true
|
325
|
+
end
|
326
|
+
|
327
|
+
|
328
|
+
-- search with a phrase of intersection
|
329
|
+
function _searchimpl(phrase, union)
|
330
|
+
local tokens = _tokenize(phrase)
|
331
|
+
local tnum = #tokens
|
332
|
+
if tnum < 1 then
|
333
|
+
return {}
|
334
|
+
end
|
335
|
+
local idsel = _get(tokens[1])
|
336
|
+
local result = _unpack("w*", idsel)
|
337
|
+
if union then
|
338
|
+
local rsets = {}
|
339
|
+
table.insert(rsets, result)
|
340
|
+
for i = 2, tnum do
|
341
|
+
idsel = _get(tokens[i])
|
342
|
+
local ids = _unpack("w*", idsel)
|
343
|
+
table.insert(rsets, ids)
|
344
|
+
end
|
345
|
+
result = _union(rsets)
|
346
|
+
else
|
347
|
+
for i = 2, tnum do
|
348
|
+
idsel = _get(tokens[i])
|
349
|
+
local ids = _unpack("w*", idsel)
|
350
|
+
result = _isect(result, ids)
|
351
|
+
end
|
352
|
+
end
|
353
|
+
table.sort(result)
|
354
|
+
return result
|
355
|
+
end
|
356
|
+
|
357
|
+
|
358
|
+
-- register a record with the URI and the text
|
359
|
+
function _xputimpl(uri, text)
|
360
|
+
local id = _get(IDPREFIX .. uri)
|
361
|
+
id = tonumber(id)
|
362
|
+
if id then
|
363
|
+
local otext = _get(TEXTPREFIX .. id)
|
364
|
+
if otext and not _outimpl(id, otext) then
|
365
|
+
return false
|
366
|
+
end
|
367
|
+
else
|
368
|
+
id = _addint(IDPREFIX, 1)
|
369
|
+
if not id then
|
370
|
+
_log("addint error")
|
371
|
+
return false
|
372
|
+
end
|
373
|
+
end
|
374
|
+
if not _putimpl(id, text) then
|
375
|
+
return false
|
376
|
+
end
|
377
|
+
if not _put(IDPREFIX .. uri, id) then
|
378
|
+
_log("put error")
|
379
|
+
return false
|
380
|
+
end
|
381
|
+
if not _put(URIPREFIX .. id, uri) then
|
382
|
+
_log("put error")
|
383
|
+
return false
|
384
|
+
end
|
385
|
+
if not _put(TEXTPREFIX .. id, text) then
|
386
|
+
_log("put error")
|
387
|
+
return false
|
388
|
+
end
|
389
|
+
return true
|
390
|
+
end
|
391
|
+
|
392
|
+
|
393
|
+
-- remove a record with the URI
|
394
|
+
function _xoutimpl(uri)
|
395
|
+
local id = _get(IDPREFIX .. uri)
|
396
|
+
id = tonumber(id)
|
397
|
+
if not id then
|
398
|
+
return true
|
399
|
+
end
|
400
|
+
local text = _get(TEXTPREFIX .. id)
|
401
|
+
if not text then
|
402
|
+
return true
|
403
|
+
end
|
404
|
+
if not _outimpl(id, text) then
|
405
|
+
return false
|
406
|
+
end
|
407
|
+
if not _out(IDPREFIX .. uri) then
|
408
|
+
_log("out error")
|
409
|
+
return false
|
410
|
+
end
|
411
|
+
if not _out(URIPREFIX .. id) then
|
412
|
+
_log("out error")
|
413
|
+
return false
|
414
|
+
end
|
415
|
+
if not _out(TEXTPREFIX .. id) then
|
416
|
+
_log("out error")
|
417
|
+
return false
|
418
|
+
end
|
419
|
+
return true
|
420
|
+
end
|
421
|
+
|
422
|
+
|
423
|
+
-- break a text into an array of tokens
|
424
|
+
function _tokenize(text)
|
425
|
+
local tokens = {}
|
426
|
+
local uniq = {}
|
427
|
+
for token in string.gmatch(text, "[^" .. DELIMS .. "]+") do
|
428
|
+
if #token > 0 and not uniq[token] then
|
429
|
+
table.insert(tokens, token)
|
430
|
+
uniq[token] = true
|
431
|
+
end
|
432
|
+
end
|
433
|
+
return tokens
|
434
|
+
end
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
-- END OF FILE
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#! /bin/sh
|
2
|
+
|
3
|
+
#================================================================
|
4
|
+
# datechange
|
5
|
+
# Replace date expressions
|
6
|
+
#================================================================
|
7
|
+
|
8
|
+
|
9
|
+
# set variables
|
10
|
+
LANG=C
|
11
|
+
LC_ALL=C
|
12
|
+
export LANG LC_ALL
|
13
|
+
year=`date '+%Y'`
|
14
|
+
date=`date '+%Y-%m-%d'`
|
15
|
+
fulldate=`date -R`
|
16
|
+
regexsrc='\.(h|c|cc|cpp|cxx|java|pl|pm|pod|rb|rd|lua)$'
|
17
|
+
regexman='\.[0-9]$'
|
18
|
+
regexhtml='\.html$'
|
19
|
+
|
20
|
+
|
21
|
+
# edit source files
|
22
|
+
find . -type f | egrep "$regexsrc" |
|
23
|
+
while read file
|
24
|
+
do
|
25
|
+
echo "$file"
|
26
|
+
sed "/opyright/ s/\\(20[0-9][0-9]\\)-\\(20[0-9][0-9]\\)/\\1-$year/" "$file" > "$file.tmp"
|
27
|
+
mv -f "$file.tmp" "$file"
|
28
|
+
done
|
29
|
+
|
30
|
+
|
31
|
+
# edit manual files
|
32
|
+
find . -type f | egrep "$regexman" |
|
33
|
+
while read file
|
34
|
+
do
|
35
|
+
echo "$file"
|
36
|
+
sed "/\\.TH/ s/\\(20[0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)/$date/" "$file" > "$file.tmp"
|
37
|
+
mv -f "$file.tmp" "$file"
|
38
|
+
done
|
39
|
+
|
40
|
+
|
41
|
+
# edit HTML files
|
42
|
+
find . -type f | egrep "$regexhtml" |
|
43
|
+
while read file
|
44
|
+
do
|
45
|
+
echo "$file"
|
46
|
+
sed -e "/opyright/ s/\\(20[0-9][0-9]\\)-\\(20[0-9][0-9]\\)/\\1-$year/" -e "/<div class=\"note\">/ s/Last Update: *\\([A-Z][a-z][a-z], [0-9][0-9] [A-Z][a-z][a-z] 20[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] +[0-9][0-9]*\\)/Last Update: $fulldate/" "$file" > "$file.tmp"
|
47
|
+
mv -f "$file.tmp" "$file"
|
48
|
+
done
|
49
|
+
|
50
|
+
|
51
|
+
# exit normally
|
52
|
+
exit 0
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
# END OF FILE
|