__EOF
kyotocabinet-1.2.79/lab/kcdict/kcdictwntotsv 0000755 0001750 0001750 00000002703 11607312123 020140 0 ustar mikio mikio #! /usr/bin/ruby
# -*- coding: utf-8 -*-
BASEDIR = ARGV.length > 0 ? ARGV[0] : "."
DATAFILES =
[
{ :part => "noun", :path => "#{BASEDIR}/data.noun" },
{ :part => "verb", :path => "#{BASEDIR}/data.verb" },
{ :part => "adj", :path => "#{BASEDIR}/data.adj" },
{ :part => "adv", :path => "#{BASEDIR}/data.adv" },
]
OUTFILE = 'wordnet.tsv'
if !File::directory?(BASEDIR)
printf("%s is not a directory\n", BASEDIR)
exit(1)
end
seq = 0
File::open(OUTFILE, "w") do |outfile|
DATAFILES.each do |info|
part = info[:part]
path = info[:path]
File::open(path) do |infile|
infile.each do |line|
line.force_encoding('UTF-8')
next if line.start_with?(" ")
line = line.strip
head = line.sub(/ *\|.*/, "")
head = head.sub(/ *\@.*/, "")
fields = head.split(" ")
next if fields.length < 4
pivot = fields[3].hex * 2
next if pivot + 4 > fields.length
fields = fields[4..3+pivot]
faces = []
for i in (0...(fields.length))
faces.push(fields[i]) if i % 2 == 0
end
text = line.sub(/.*\| */, "")
faces.each do |face|
face = face.gsub(/_/, " ")
face = face.gsub(/\s+/, " ")
key = face.downcase
seq += 1
printf(outfile, "%s\t%d\t%s\t%s\t%s\n", key, seq, face, part, text)
printf("%s: %d records done\n", $0, seq) if seq % 1000 == 0
end
end
end
end
end
kyotocabinet-1.2.79/lab/kcdict/Makefile 0000644 0001750 0001750 00000004506 11612337547 016764 0 ustar mikio mikio COMMANDFILES = kcdictmgr
UTILFILES = kcdictwntotsv kcdictejrtotsv
CGIFILES = kcdictsearch.cgi
prefix = /usr/local
exec_prefix = ${prefix}
BINDIR = ${exec_prefix}/bin
LIBEXECDIR = ${exec_prefix}/libexec
CXX = g++
CPPFLAGS = -I. -I.. -I../.. -I/usr/local/include -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__
CXXFLAGS = -O2 -Wall -fPIC -fsigned-char
LDFLAGS = -L. -L.. -L../.. -L/usr/local/lib -Wl,-rpath-link,.:..:../..:/usr/local/lib:.:/usr/local/lib:/usr/local/lib:. -Wl,--as-needed
LIBS = -lkyotocabinet
#LIBS = -static -lkyotocabinet -llzo2 -llzma -lz -lstdc++ -lrt -lpthread -lm -lc
RUNENV = LD_LIBRARY_PATH=.:/usr/local/lib:/usr/local/lib:.:..:../..
all : $(COMMANDFILES)
install :
mkdir -p $(DESTDIR)$(BINDIR)
cp -Rf $(COMMANDFILES) $(UTILFILES) $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(LIBEXECDIR)
cp -Rf $(CGIFILES) $(DESTDIR)$(LIBEXECDIR)
install-strip :
$(MAKE) DESTDIR=$(DESTDIR) install
cd $(DESTDIR)$(BINDIR) && strip $(COMMANDFILES)
uninstall :
-cd $(DESTDIR)$(BINDIR) && rm -f $(COMMANDFILES) $(UTILFILES)
-cd $(DESTDIR)$(LIBEXECDIR) && rm -f $(CGIFILES)
clean :
rm -rf $(COMMANDFILES) *.exe *.o a.out check.out gmon.out leak.log \
casket* *.kct *.key wordnet.tsv eijiro-*.tsv *~
check :
rm -rf dict.kct
$(RUNENV) ./kcdictmgr import dict.kct sample.tsv
$(RUNENV) ./kcdictmgr search dict.kct 't' > check.out
$(RUNENV) ./kcdictmgr search -pk dict.kct 'aaa' > check.out
$(RUNENV) ./kcdictmgr search -max 3 -pk dict.kct '' > check.out
$(RUNENV) ./kcdictmgr search -f -pk dict.kct 'tokyo' > check.out
$(RUNENV) ./kcdictmgr search -a -pk dict.kct 'tok' > check.out
$(RUNENV) ./kcdictmgr search -m -pk dict.kct 'e' > check.out
$(RUNENV) ./kcdictmgr search -r -pk dict.kct '^f' > check.out
$(RUNENV) ./kcdictmgr search -tm -pk dict.kct 'e' > check.out
$(RUNENV) ./kcdictmgr search -tr -pk dict.kct 'r' > check.out
rm -rf dict.kct
dict :
ls *.tsv | while read path ; \
do \
$(RUNENV) ./kcdictmgr import "$${path%.tsv}.kct" "$$path" ; \
done
key :
ls *.kct | while read path ; \
do \
$(RUNENV) ../../kctreemgr list "$${path}" |\
cut -f 1 | uniq > "$${path%.kct}.key" ; \
done
.SUFFIXES :
.SUFFIXES : .cc .o
.c.o :
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.cc.o :
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
kcdictmgr : kcdictmgr.o
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kyotocabinet-1.2.79/lab/kcdict/kcdictejrtotsv 0000755 0001750 0001750 00000002436 11610062435 020301 0 ustar mikio mikio #! /usr/bin/ruby
# -*- coding: utf-8 -*-
BASEDIR = ARGV.length > 0 ? ARGV[0] : "."
if !File::directory?(BASEDIR)
printf("%s is not a directory\n", BASEDIR)
exit(1)
end
pattern = sprintf("%s/*.TXT", BASEDIR)
Dir.glob(pattern) do |path|
dictname = path.sub(/.*\//, "")
dictname = dictname.sub(/[-_0-9]*\.TXT$/, "").downcase
File::open(path) do |infile|
outpath = sprintf("eijiro-%s.tsv", dictname)
File::open(outpath, "w") do |outfile|
seq = 0
infile.each do |line|
begin
line = line.encode('UTF-8', 'Windows-31J')
rescue => e
p e
next
end
line = line.gsub(/\s+/, " ")
line = line.strip
line = line.sub(/^■/, "")
face = line.sub(/ +:.*/, "")
text = line.sub(/[^:]* +: +/, "")
part = ""
if face.match(/ *{[^}]+}$/)
part = face.sub(/.*{([^}]+)}$/, '\1')
face = face.sub(/ *{[^}]+}$/, "")
end
key = face.downcase
text = text.gsub(/{[^}]+}/, "")
text = text.sub(/ *◆([a-z]+:|【URL】|【出典】).*$/, "")
seq += 1
printf(outfile, "%s\t%d\t%s\t%s\t%s\n", key, seq, face, part, text)
printf("%s: %s: %d records done\n", $0, dictname, seq) if seq % 1000 == 0
end
end
end
end
kyotocabinet-1.2.79/lab/primelist 0000755 0001750 0001750 00000001310 11523256007 015777 0 ustar mikio mikio #! /usr/bin/ruby
#================================================================
# primelist
# Print a sparse list of prime numbers
#================================================================
MINNUM = 1
MAXNUM = 2 ** 52
MULNUM = Math.sqrt(Math.sqrt(2))
uniq = {}
base = MINNUM
while base <= MAXNUM
num = base
while num < base * 1.99 - 1
cand = num
while true
cmd = sprintf('factor %d', cand)
res = `#{cmd}`
res = res.gsub(/ *\n/, '')
res = res.gsub(/.*: */, '')
if res !~ / / && !uniq[res]
printf("%s\n", res);
uniq[res] = true
break
end
cand += 1
end
num *= MULNUM
end
base *= 2
end
exit(0)
# END OF FILE
kyotocabinet-1.2.79/lab/codecheck 0000755 0001750 0001750 00000004542 11523256007 015711 0 ustar mikio mikio #! /usr/bin/ruby -w
#================================================================
# codecheck
# Check files about compliance of the coding policy
#================================================================
SUFFIXES = /\.(h|cc)$/
IGNORES = /(kccommon\.h)/
BADOPEN = /[^\w](if|while|for|switch|catch)\(/
BADCLOSE = /\)\{/
BADTYPE = /[^\w](u)*(void|char|int|double|size_t|std::string)[0-9]*(_t)* +\*/
BADFUNCS = [
/[^:.>\w](malloc|calloc|realloc|free|rand|srand|abort|qsort|strtoll|llabs|div|lldiv) *\(/,
/[^:.>\w](memset|memcpy|memmove|memcmp|memchr) *\(/,
/[^:.>\w](strcpy|strncpy|strcat|strncat|strcmp|strchr|strrchr|strstr|strlen) *\(/,
/[^:.>\w](printf|fprintf|sprintf|snprintf|vprintf|vfprintf|vsprintf|vsnprintf) *\(/,
/[^:.>\w](isnan|isinf|pow|fabs|sqrt|floor|ceil|modf|modfl) *\(/,
]
LIMITWIDTH = 97
def checkfile(path)
printf("Checking: %s\n", path)
ok = true
open(path, "r") do |file|
num = 0
file.each do |line|
num += 1
line.chomp!
if line =~ /\s$/
printf("TRAINING SPACE: %s: %d: %s\n", path, num, line)
ok = false
end
if line =~ /\t/
printf("TAB CODE: %s: %d: %s\n", path, num, line)
ok = false
end
if line =~ BADOPEN
printf("BAD OPEN: %s: %d: %s\n", path, num, line)
ok = false
end
if line =~ BADCLOSE
printf("BAD CLOSE: %s: %d: %s\n", path, num, line)
ok = false
end
if line =~ BADTYPE
printf("BAD TYPE: %s: %d: %s\n", path, num, line)
ok = false
end
BADFUNCS.each do |badfunc|
if line =~ badfunc
printf("BAD FUNC: %s: %d: %s\n", path, num, line)
ok = false
end
end
if line.length > LIMITWIDTH && !line.index("/*") && !line.index("*/")
printf("BAD WIDTH: %s: %d: %s\n", path, num, line)
ok = false
end
end
end
return ok
end
ok = true
list = Array::new(ARGV)
list.push(".") if list.empty?
while !list.empty?
path = list.shift
begin
if File::ftype(path) == "directory"
Dir.entries(path).each do |cpath|
if cpath =~ SUFFIXES && cpath !~ /[#~]/ && cpath !~ IGNORES
list.push(path + "/" + cpath)
end
end
else
ok = false if !checkfile(path)
end
rescue
end
end
if ok
printf("ALL OK\n")
exit(0)
else
printf("ERROR\n")
exit(1)
end
# END OF FILE
kyotocabinet-1.2.79/VCmakefile 0000644 0001750 0001750 00000105177 11604726143 015257 0 ustar mikio mikio # Makefile for Kyoto Cabinet for Win32
#================================================================
# Setting Variables
#================================================================
# VC++ directory
VCPATH = C:\Program Files\Microsoft Visual Studio 10.0\VC
SDKPATH = C:\Program Files\Microsoft SDKs\Windows\v7.0A
# Targets
LIBRARYFILES = kyotocabinet.lib
LIBOBJFILES = kcutil.obj kcdb.obj kcthread.obj kcfile.obj \
kccompress.obj kccompare.obj kcmap.obj kcregex.obj kcplantdb.obj \
kcprotodb.obj kcstashdb.obj kccachedb.obj kchashdb.obj kcdirdb.obj kctextdb.obj \
kcpolydb.obj kcdbext.obj kclangc.obj
COMMANDFILES = kcutiltest.exe kcutilmgr.exe kcprototest.exe \
kcstashtest.exe kccachetest.exe kcgrasstest.exe \
kchashtest.exe kchashmgr.exe kctreetest.exe kctreemgr.exe \
kcdirtest.exe kcdirmgr.exe kcforesttest.exe kcforestmgr.exe \
kcpolytest.exe kcpolymgr.exe kclangctest.exe
# Building configuration
CL = cl
LIB = lib
LINK = link
CLFLAGS = /nologo \
/I "$(VCPATH)\Include" /I "$(VCPATH)\PlatformSDK\Include" /I "$(SDKPATH)\Include" \
/I "." \
/DNDEBUG /D_CRT_SECURE_NO_WARNINGS \
/O2 /EHsc /W3 /wd4244 /wd4351 /wd4800 /MT
LIBFLAGS = /nologo \
/libpath:"$(VCPATH)\lib" /libpath:"$(VCPATH)\PlatformSDK\Lib" /libpath:"$(SDKPATH)\Lib" \
/libpath:"."
LINKFLAGS = /nologo \
/libpath:"$(VCPATH)\lib" /libpath:"$(VCPATH)\PlatformSDK\Lib" /libpath:"$(SDKPATH)\Lib" \
/libpath:"."
#================================================================
# Suffix rules
#================================================================
.SUFFIXES :
.SUFFIXES : .cc .c .obj .exe
.c.obj :
$(CL) /c $(CLFLAGS) $<
.cc.obj :
$(CL) /c $(CLFLAGS) $<
#================================================================
# Actions
#================================================================
all : $(LIBRARYFILES) $(COMMANDFILES)
@echo #
@echo #================================================================
@echo # Ready to install.
@echo #================================================================
clean :
-del *.obj *.lib *.dll *.exp *.exe /F /Q > NUL: 2>&1
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
check : check-util check-proto check-stash check-cache check-grass \
check-hash check-tree check-dir check-forest check-poly check-langc
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
@echo #
@echo #================================================================
@echo # Checking completed.
@echo #================================================================
check-util :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcutilmgr version
kcutilmgr hex VCmakefile > check.in
kcutilmgr hex -d check.in > check.out
kcutilmgr enc VCmakefile > check.in
kcutilmgr enc -d check.in > check.out
kcutilmgr enc -hex VCmakefile > check.in
kcutilmgr enc -hex -d check.in > check.out
kcutilmgr enc -url VCmakefile > check.in
kcutilmgr enc -url -d check.in > check.out
kcutilmgr enc -quote VCmakefile > check.in
kcutilmgr enc -quote -d check.in > check.out
kcutilmgr ciph -key "hoge" VCmakefile > check.in
kcutilmgr ciph -key "hoge" check.in > check.out
kcutilmgr comp -gz VCmakefile > check.in
kcutilmgr comp -gz -d check.in > check.out
kcutilmgr comp -lzo VCmakefile > check.in
kcutilmgr comp -lzo -d check.in > check.out
kcutilmgr comp -lzma VCmakefile > check.in
kcutilmgr comp -lzma -d check.in > check.out
kcutilmgr hash VCmakefile > check.in
kcutilmgr hash -fnv VCmakefile > check.out
kcutilmgr hash -path VCmakefile > check.out
kcutilmgr regex mikio VCmakefile > check.out
kcutilmgr regex -alt "hirarin" mikio VCmakefile > check.out
kcutilmgr conf
-del casket* /F /Q > NUL: 2>&1
kcutiltest mutex -th 4 -iv -1 10000
kcutiltest cond -th 4 -iv -1 10000
kcutiltest para -th 4 10000
kcutiltest para -th 4 -iv -1 10000
kcutiltest file -th 4 casket 10000
kcutiltest file -th 4 -rnd -msiz 1m casket 10000
kcutiltest lhmap -bnum 1000 10000
kcutiltest lhmap -rnd -bnum 1000 10000
kcutiltest thmap -bnum 1000 10000
kcutiltest thmap -rnd -bnum 1000 10000
kcutiltest talist 10000
kcutiltest talist -rnd 10000
kcutiltest misc 10000
check-proto :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcprototest order -etc 10000
kcprototest order -th 4 10000
kcprototest order -th 4 -rnd -etc 10000
kcprototest order -th 4 -rnd -etc -tran 10000
kcprototest wicked 10000
kcprototest wicked -th 4 -it 4 10000
kcprototest tran 10000
kcprototest tran -th 2 -it 4 10000
-del casket* /F /Q > NUL: 2>&1
kcprototest order -tree -etc 10000
kcprototest order -tree -th 4 10000
kcprototest order -tree -th 4 -rnd -etc 10000
kcprototest order -tree -th 4 -rnd -etc -tran 10000
kcprototest wicked -tree 10000
kcprototest wicked -tree -th 4 -it 4 10000
kcprototest tran -tree 10000
kcprototest tran -tree -th 2 -it 4 10000
check-stash :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcstashtest order -etc -bnum 5000 10000
kcstashtest order -th 4 -bnum 5000 10000
kcstashtest order -th 4 -rnd -etc -bnum 5000 10000
kcstashtest order -th 4 -rnd -etc -bnum 5000 10000
kcstashtest order -th 4 -rnd -etc -tran \
-bnum 5000 10000
kcstashtest wicked -bnum 5000 10000
kcstashtest wicked -th 4 -it 4 -bnum 5000 10000
kcstashtest tran -bnum 5000 10000
kcstashtest tran -th 2 -it 4 -bnum 5000 10000
check-cache :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kccachetest order -etc -bnum 5000 10000
kccachetest order -th 4 -bnum 5000 10000
kccachetest order -th 4 -rnd -etc -bnum 5000 -capcnt 10000 10000
kccachetest order -th 4 -rnd -etc -bnum 5000 -capsiz 10000 10000
kccachetest order -th 4 -rnd -etc -tran \
-tc -bnum 5000 -capcnt 10000 10000
kccachetest wicked -bnum 5000 10000
kccachetest wicked -th 4 -it 4 -tc -bnum 5000 -capcnt 10000 10000
kccachetest tran -bnum 5000 10000
kccachetest tran -th 2 -it 4 -tc -bnum 5000 10000
check-grass :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
$(RUNENV) $(RUNCMD) kcgrasstest order -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) kcgrasstest order -th 4 -bnum 5000 10000
$(RUNENV) $(RUNCMD) kcgrasstest order -th 4 -rnd -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) kcgrasstest order -th 4 -rnd -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) kcgrasstest order -th 4 -rnd -etc -tran \
-tc -bnum 5000 -pccap 100k 1000
$(RUNENV) $(RUNCMD) kcgrasstest wicked -bnum 5000 10000
$(RUNENV) $(RUNCMD) kcgrasstest wicked -th 4 -it 4 -tc -bnum 5000 -pccap 100k 10000
$(RUNENV) $(RUNCMD) kcgrasstest tran -bnum 5000 10000
$(RUNENV) $(RUNCMD) kcgrasstest tran -th 2 -it 4 -tc -bnum 5000 -pccap 100k 10000
check-hash :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kchashmgr create -otr -apow 1 -fpow 2 -bnum 3 casket
kchashmgr inform -st casket
kchashmgr set -add casket duffy 1231
kchashmgr set -add casket micky 0101
kchashmgr set casket fal 1007
kchashmgr set casket mikio 0211
kchashmgr set casket natsuki 0810
kchashmgr set casket micky ""
kchashmgr set -rep casket duffy 777
kchashmgr set -app casket duffy kukuku
kchashmgr remove casket micky
kchashmgr list -pv casket > check.out
kchashmgr set casket ryu 1
kchashmgr set casket ken 2
kchashmgr remove casket duffy
kchashmgr set casket ryu syo-ryu-ken
kchashmgr set casket ken tatsumaki-senpu-kyaku
kchashmgr set -inci casket int 1234
kchashmgr set -inci casket int 5678
kchashmgr set -incd casket double 1234.5678
kchashmgr set -incd casket double 8765.4321
kchashmgr get casket mikio
kchashmgr get casket ryu
kchashmgr import casket lab/numbers.tsv
kchashmgr list -pv -px casket > check.out
kchashmgr copy casket casket-para
kchashmgr dump casket check.out
kchashmgr load -otr casket check.out
kchashmgr defrag -onl casket
kchashmgr check -onr casket
kchashmgr inform -st casket
kchashmgr create -otr -otl -onr -apow 1 -fpow 3 \
-ts -tl -tc -bnum 1 casket
kchashmgr import casket < lab/numbers.tsv
kchashmgr set casket mikio kyotocabinet
kchashmgr set -app casket tako ikaunini
kchashmgr set -app casket mikio kyototyrant
kchashmgr set -app casket mikio kyotodystopia
kchashmgr get -px casket mikio > check.out
kchashmgr list casket > check.out
kchashmgr check -onr casket
-del casket* /F /Q > NUL: 2>&1
kchashtest order -set -bnum 5000 -msiz 50000 casket 10000
kchashtest order -get -msiz 50000 casket 10000
kchashtest order -getw -msiz 5000 casket 10000
kchashtest order -rem -msiz 50000 casket 10000
kchashtest order -bnum 5000 -msiz 50000 casket 10000
kchashtest order -etc \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashtest order -th 4 \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashtest order -th 4 -rnd -etc \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest order -th 4 -rnd -etc -tran \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest order -th 4 -rnd -etc -oat \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest order -th 4 -rnd -etc \
-apow 2 -fpow 3 -ts -tl -tc -bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest queue \
-bnum 5000 -msiz 50000 casket 10000
kchashmgr check -onr casket
kchashtest queue -rnd \
-bnum 5000 -msiz 50000 casket 10000
kchashmgr check -onr casket
kchashtest queue -th 4 -it 4 \
-bnum 5000 -msiz 50000 casket 10000
kchashmgr check -onr casket
kchashtest queue -th 4 -it 4 -rnd \
-bnum 5000 -msiz 50000 casket 10000
kchashmgr check -onr casket
kchashtest wicked -bnum 5000 -msiz 50000 casket 10000
kchashmgr check -onr casket
kchashtest wicked -th 4 -it 4 \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest wicked -th 4 -it 4 -oat \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest wicked -th 4 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 casket 10000
kchashmgr check -onr casket
kchashtest tran casket 10000
kchashtest tran -th 2 -it 4 casket 10000
kchashtest tran -th 2 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 casket 10000
check-tree :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kctreemgr create -otr -apow 1 -fpow 2 -bnum 3 casket
kctreemgr inform -st casket
kctreemgr set -add casket duffy 1231
kctreemgr set -add casket micky 0101
kctreemgr set casket fal 1007
kctreemgr set casket mikio 0211
kctreemgr set casket natsuki 0810
kctreemgr set casket micky ""
kctreemgr set -rep casket duffy 777
kctreemgr set -app casket duffy kukuku
kctreemgr remove casket micky
kctreemgr list -pv casket > check.out
kctreemgr set casket ryu 1
kctreemgr set casket ken 2
kctreemgr remove casket duffy
kctreemgr set casket ryu syo-ryu-ken
kctreemgr set casket ken tatsumaki-senpu-kyaku
kctreemgr set -inci casket int 1234
kctreemgr set -inci casket int 5678
kctreemgr set -incd casket double 1234.5678
kctreemgr set -incd casket double 8765.4321
kctreemgr get casket mikio
kctreemgr get casket ryu
kctreemgr import casket lab/numbers.tsv
kctreemgr list -des -pv -px casket > check.out
kctreemgr copy casket casket-para
kctreemgr dump casket check.out
kctreemgr load -otr casket check.out
kctreemgr defrag -onl casket
kctreemgr check -onr casket
kctreemgr inform -st casket
kctreemgr create -otr -otl -onr -apow 1 -fpow 3 \
-ts -tl -tc -bnum 1 casket
kctreemgr import casket < lab/numbers.tsv
kctreemgr set casket mikio kyotocabinet
kctreemgr set -app casket tako ikaunini
kctreemgr set -app casket mikio kyototyrant
kctreemgr set -app casket mikio kyotodystopia
kctreemgr get -px casket mikio > check.out
kctreemgr list casket > check.out
kctreemgr check -onr casket
-del casket* /F /Q > NUL: 2>&1
kctreetest order -set \
-psiz 100 -bnum 5000 -msiz 50000 -pccap 100k casket 10000
kctreetest order -get \
-msiz 50000 -pccap 100k casket 10000
kctreetest order -getw \
-msiz 5000 -pccap 100k casket 10000
kctreetest order -rem \
-msiz 50000 -pccap 100k casket 10000
kctreetest order \
-bnum 5000 -psiz 100 -msiz 50000 -pccap 100k casket 10000
kctreetest order -etc \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 10000
kctreetest order -th 4 \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 10000
kctreetest order -th 4 -pccap 100k -rnd -etc \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k -rcd casket 10000
kctreemgr check -onr casket
kctreetest order -th 4 -rnd -etc -tran \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 1000
kctreemgr check -onr casket
kctreetest order -th 4 -rnd -etc -oat \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 1000
kctreemgr check -onr casket
kctreetest order -th 4 -rnd -etc \
-apow 2 -fpow 3 -ts -tl -tc -bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 casket 10000
kctreemgr check -onr casket
kctreetest queue \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
kctreemgr check -onr casket
kctreetest queue -rnd \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
kctreemgr check -onr casket
kctreetest queue -th 4 -it 4 \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
kctreemgr check -onr casket
kctreetest queue -th 4 -it 4 -rnd \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
kctreemgr check -onr casket
kctreetest wicked \
-bnum 5000 -psiz 1000 -msiz 50000 -pccap 100k casket 10000
kctreemgr check -onr casket
kctreetest wicked -th 4 -it 4 \
-bnum 5000 -msiz 50000 -dfunit 4 -pccap 100k -rcd casket 10000
kctreemgr check -onr casket
kctreetest wicked -th 4 -it 4 -oat \
-bnum 5000 -msiz 50000 -dfunit 4 -pccap 100k casket 1000
kctreemgr check -onr casket
kctreetest wicked -th 4 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 casket 1000
kctreemgr check -onr casket
kctreetest tran casket 10000
kctreetest tran -th 2 -it 4 -pccap 100k casket 10000
kctreetest tran -th 2 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 -rcd casket 10000
check-dir :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcdirmgr create -otr casket
kcdirmgr inform -st casket
kcdirmgr set -add casket duffy 1231
kcdirmgr set -add casket micky 0101
kcdirmgr set casket fal 1007
kcdirmgr set casket mikio 0211
kcdirmgr set casket natsuki 0810
kcdirmgr set casket micky ""
kcdirmgr set -rep casket duffy 777
kcdirmgr set -app casket duffy kukuku
kcdirmgr remove casket micky
kcdirmgr list -pv casket > check.out
kcdirmgr set casket ryu 1
kcdirmgr set casket ken 2
kcdirmgr remove casket duffy
kcdirmgr set casket ryu syo-ryu-ken
kcdirmgr set casket ken tatsumaki-senpu-kyaku
kcdirmgr set -inci casket int 1234
kcdirmgr set -inci casket int 5678
kcdirmgr set -incd casket double 1234.5678
kcdirmgr set -incd casket double 8765.4321
kcdirmgr get casket mikio
kcdirmgr get casket ryu
kcdirmgr import casket lab/numbers.tsv
kcdirmgr list -pv -px casket > check.out
kcdirmgr copy casket casket-para
kcdirmgr dump casket check.out
kcdirmgr load -otr casket check.out
kcdirmgr check -onr casket
kcdirmgr inform -st casket
kcdirmgr create -otr -otl -onr -tc casket
kcdirmgr import casket < lab/numbers.tsv
kcdirmgr set casket mikio kyotocabinet
kcdirmgr set -app casket tako ikaunini
kcdirmgr set -app casket mikio kyototyrant
kcdirmgr set -app casket mikio kyotodystopia
kcdirmgr get -px casket mikio > check.out
kcdirmgr list casket > check.out
kcdirmgr check -onr casket
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcdirtest order -set casket 500
kcdirtest order -get casket 500
kcdirtest order -getw casket 500
kcdirtest order -rem casket 500
kcdirtest order casket 500
kcdirtest order -etc casket 500
kcdirtest order -th 4 casket 500
kcdirtest order -th 4 -rnd -etc casket 500
kcdirmgr check -onr casket
kcdirtest order -th 4 -rnd -etc -tran casket 500
kcdirmgr check -onr casket
kcdirtest order -th 4 -rnd -etc -oat casket 500
kcdirmgr check -onr casket
kcdirtest order -th 4 -rnd -etc -tc casket 500
kcdirmgr check -onr casket
kcdirtest queue casket 500
kcdirmgr check -onr casket
kcdirtest queue -rnd casket 500
kcdirmgr check -onr casket
kcdirtest queue -th 4 -it 4 casket 500
kcdirmgr check -onr casket
kcdirtest queue -th 4 -it 4 -rnd casket 500
kcdirmgr check -onr casket
kcdirtest wicked casket 500
kcdirmgr check -onr casket
kcdirtest wicked -th 4 -it 4 casket 500
kcdirmgr check -onr casket
kcdirtest wicked -th 4 -it 4 -oat casket 500
kcdirmgr check -onr casket
kcdirtest wicked -th 4 -it 4 -tc casket 500
kcdirmgr check -onr casket
kcdirtest tran casket 500
kcdirtest tran -th 2 -it 4 casket 500
kcdirtest tran -th 2 -it 4 -tc casket 500
check-forest :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcforestmgr create -otr -bnum 3 casket
kcforestmgr inform -st casket
kcforestmgr set -add casket duffy 1231
kcforestmgr set -add casket micky 0101
kcforestmgr set casket fal 1007
kcforestmgr set casket mikio 0211
kcforestmgr set casket natsuki 0810
kcforestmgr set casket micky ""
kcforestmgr set -rep casket duffy 777
kcforestmgr set -app casket duffy kukuku
kcforestmgr remove casket micky
kcforestmgr list -pv casket > check.out
kcforestmgr set casket ryu 1
kcforestmgr set casket ken 2
kcforestmgr remove casket duffy
kcforestmgr set casket ryu syo-ryu-ken
kcforestmgr set casket ken tatsumaki-senpu-kyaku
kcforestmgr set -inci casket int 1234
kcforestmgr set -inci casket int 5678
kcforestmgr set -incd casket double 1234.5678
kcforestmgr set -incd casket double 8765.4321
kcforestmgr get casket mikio
kcforestmgr get casket ryu
kcforestmgr import casket lab/numbers.tsv
kcforestmgr list -des -pv -px casket > check.out
kcforestmgr copy casket casket-para
kcforestmgr dump casket check.out
kcforestmgr load -otr casket check.out
kcforestmgr check -onr casket
kcforestmgr inform -st casket
kcforestmgr create -otr -otl -onr \
-tc -bnum 1 casket
kcforestmgr import casket < lab/numbers.tsv
kcforestmgr set casket mikio kyotocabinet
kcforestmgr set -app casket tako ikaunini
kcforestmgr set -app casket mikio kyototyrant
kcforestmgr set -app casket mikio kyotodystopia
kcforestmgr get -px casket mikio > check.out
kcforestmgr list casket > check.out
kcforestmgr check -onr casket
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcforesttest order -set \
-psiz 100 -bnum 5000 -pccap 100k casket 5000
kcforesttest order -get \
-pccap 100k casket 5000
kcforesttest order -getw \
-pccap 100k casket 5000
kcforesttest order -rem \
-pccap 100k casket 5000
kcforesttest order \
-bnum 5000 -psiz 100 -pccap 100k casket 5000
kcforesttest order -etc \
-bnum 5000 -psiz 1000 -pccap 100k casket 5000
kcforesttest order -th 4 \
-bnum 5000 -psiz 1000 -pccap 100k casket 5000
kcforesttest order -th 4 -pccap 100k -rnd -etc \
-bnum 5000 -psiz 1000 -pccap 100k -rcd casket 5000
kcforestmgr check -onr casket
kcforesttest order -th 4 -rnd -etc -tran \
-bnum 500 -psiz 1000 -pccap 100k casket 500
kcforestmgr check -onr casket
kcforesttest order -th 4 -rnd -etc -oat \
-bnum 500 -psiz 1000 -pccap 100k casket 500
kcforestmgr check -onr casket
kcforesttest order -th 4 -rnd -etc \
-tc -bnum 5000 -psiz 1000 casket 5000
kcforestmgr check -onr casket
kcforesttest queue \
-bnum 5000 -psiz 500 casket 5000
kcforestmgr check -onr casket
kcforesttest queue -rnd \
-bnum 5000 -psiz 500 casket 5000
kcforestmgr check -onr casket
kcforesttest queue -th 4 -it 4 \
-bnum 5000 -psiz 500 casket 5000
kcforestmgr check -onr casket
kcforesttest queue -th 4 -it 4 -rnd \
-bnum 5000 -psiz 500 casket 5000
kcforestmgr check -onr casket
kcforesttest wicked \
-bnum 5000 -psiz 1000 -pccap 100k casket 5000
kcforestmgr check -onr casket
kcforesttest wicked -th 4 -it 4 \
-bnum 5000 -pccap 100k -rcd casket 5000
kcforestmgr check -onr casket
kcforesttest wicked -th 4 -it 4 -oat \
-bnum 5000 -pccap 100k casket 500
kcforestmgr check -onr casket
kcforesttest wicked -th 4 -it 4 \
-tc -bnum 500 casket 500
kcforestmgr check -onr casket
kcforesttest tran casket 5000
kcforesttest tran -th 2 -it 4 -pccap 100k casket 5000
kcforesttest tran -th 2 -it 4 \
-tc -bnum 5000 -rcd casket 5000
check-poly :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolymgr create -otr "casket.kch#apow=1#fpow=2#bnum=3"
kcpolymgr inform -st casket.kch
kcpolymgr set -add casket.kch duffy 1231
kcpolymgr set -add casket.kch micky 0101
kcpolymgr set casket.kch fal 1007
kcpolymgr set casket.kch mikio 0211
kcpolymgr set casket.kch natsuki 0810
kcpolymgr set casket.kch micky ""
kcpolymgr set -app casket.kch duffy kukuku
kcpolymgr remove casket.kch micky
kcpolymgr list -pv casket.kch > check.out
kcpolymgr copy casket.kch casket-para
kcpolymgr dump casket.kch check.out
kcpolymgr load -otr casket.kch check.out
kcpolymgr set casket.kch ryu 1
kcpolymgr set casket.kch ken 2
kcpolymgr remove casket.kch duffy
kcpolymgr set casket.kch ryu syo-ryu-ken
kcpolymgr set casket.kch ken tatsumaki-senpu-kyaku
kcpolymgr set -inci casket.kch int 1234
kcpolymgr set -inci casket.kch int 5678
kcpolymgr set -incd casket.kch double 1234.5678
kcpolymgr set -incd casket.kch double 8765.4321
kcpolymgr get "casket.kch" mikio
kcpolymgr get "casket.kch" ryu
kcpolymgr import casket.kch lab/numbers.tsv
kcpolymgr list -pv -px "casket.kch#mode=r" > check.out
kcpolymgr check -onr casket.kch
kcpolymgr inform -st casket.kch
kcpolymgr create -otr -otl -onr \
"casket.kct#apow=1#fpow=3#opts=slc#bnum=1"
kcpolymgr import casket.kct < lab/numbers.tsv
kcpolymgr set casket.kct mikio kyotocabinet
kcpolymgr set -app casket.kct tako ikaunini
kcpolymgr set -app casket.kct mikio kyototyrant
kcpolymgr set -app casket.kct mikio kyotodystopia
kcpolymgr get -px casket.kct mikio > check.out
kcpolymgr list casket.kct > check.out
kcpolymgr check -onr casket.kct
-del casket* /F /Q > NUL: 2>&1
kcpolytest order -set "casket.kct#bnum=5000#msiz=50000" 10000
kcpolytest order -get "casket.kct#msiz=50000" 10000
kcpolytest order -getw "casket.kct#msiz=5000" 10000
kcpolytest order -rem "casket.kct#msiz=50000" 10000
kcpolytest order "casket.kct#bnum=5000#msiz=50000" 10000
kcpolytest order -etc \
"casket.kct#bnum=5000#msiz=50000#dfunit=4" 10000
kcpolytest order -th 4 \
"casket.kct#bnum=5000#msiz=50000#dfunit=4" 10000
kcpolytest order -th 4 -rnd -etc \
"casket.kct#bnum=5000#msiz=0#dfunit=1" 1000
kcpolymgr check -onr casket.kct
kcpolytest order -th 4 -rnd -etc -tran \
"casket.kct#bnum=5000#msiz=0#dfunit=2" 1000
kcpolymgr check -onr casket.kct
kcpolytest order -th 4 -rnd -etc -oat \
"casket.kct#bnum=5000#msiz=0#dfunit=3" 1000
kcpolymgr check -onr casket.kct
kcpolytest order -th 4 -rnd -etc \
"casket.kct#apow=2#fpow=3#opts=slc#bnum=5000#msiz=0#dfunit=4" 1000
kcpolymgr check -onr casket.kct
kcpolytest queue \
"casket.kct#bnum=5000#msiz=0" 10000
kcpolymgr check -onr casket.kct
kcpolytest queue -rnd \
"casket.kct#bnum=5000#msiz=0" 10000
kcpolymgr check -onr casket.kct
kcpolytest queue -th 4 -it 4 \
"casket.kct#bnum=5000#msiz=0" 10000
kcpolymgr check -onr casket.kct
kcpolytest queue -th 4 -it 4 -rnd \
"casket.kct#bnum=5000#msiz=0" 10000
kcpolymgr check -onr casket.kct
kcpolytest wicked "casket.kct#bnum=5000#msiz=0" 1000
kcpolymgr check -onr casket.kct
kcpolytest wicked -th 4 -it 4 \
"casket.kct#bnum=5000#msiz=0#dfunit=1" 1000
kcpolymgr check -onr casket.kct
kcpolytest wicked -th 4 -it 4 -oat \
"casket.kct#bnum=5000#msiz=0#dfunit=1" 1000
kcpolymgr check -onr casket.kct
kcpolytest wicked -th 4 -it 4 \
"casket.kct#apow=2#fpow=3#opts=slc#bnum=10000#msiz=0#dfunit=1" 10000
kcpolymgr check -onr casket.kct
kcpolytest tran casket.kct 10000
kcpolytest tran -th 2 -it 4 casket.kct 10000
kcpolytest tran -th 2 -it 4 \
"casket.kct#apow=2#fpow=3#opts=slc#bnum=10000#msiz=0#dfunit=1" 1000
kcpolytest mapred -dbnum 2 -clim 10k casket.kct 10000
kcpolytest mapred -tmp . -dbnum 2 -clim 10k -xnl -xnc \
casket.kct 10000
kcpolytest mapred -tmp . -dbnum 2 -clim 10k -xpm -xpr -xpf -xnc \
casket.kct 10000
kcpolytest mapred -rnd -dbnum 2 -clim 10k casket.kct 10000
kcpolytest index -set "casket.kct#idxclim=32k" 10000
kcpolytest index -get "casket.kct" 10000
kcpolytest index -rem "casket.kct" 10000
kcpolytest index -etc "casket.kct#idxclim=32k" 10000
kcpolytest index -th 4 -rnd -set \
"casket.kct#idxclim=32k#idxdbnum=4" 10000
kcpolytest index -th 4 -rnd -get "casket.kct" 10000
kcpolytest index -th 4 -rnd -rem "casket.kct" 10000
kcpolytest index -th 4 -rnd -etc \
"casket.kct#idxclim=32k#idxdbnum=4" 10000
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest order -rnd "casket.kcx" 10000
kcpolytest order -th 4 -rnd "casket.kcx" 10000
kcpolytest wicked "casket.kcx" 10000
kcpolytest wicked -th 4 "casket.kcx" 10000
kcpolymgr list "casket.kcx" > check.in
kcpolymgr list -max 1000 "casket.kcx" > check.in
kcpolytest mapred "casket.kcx" 10000
kcpolytest mapred -xpm -xpr -xpf "casket.kcx" 10000
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest order -rnd "casket.kch#opts=s#bnum=256" 1000
kcpolytest order -rnd "casket.kct#opts=l#psiz=256" 1000
kcpolytest order -rnd "casket.kcd#opts=c#bnum=256" 500
kcpolytest order -rnd "casket.kcf#opts=c#psiz=256" 500
kcpolytest order -rnd "casket.kcx" 500
kcpolymgr merge -add "casket#type=kct" \
casket.kch casket.kct casket.kcd casket.kcf casket.kcx
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest misc "casket#type=-"
kcpolytest misc "casket#type=+"
kcpolytest misc "casket#type=:"
kcpolytest misc "casket#type=*"
kcpolytest misc "casket#type=%"
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest misc "casket#type=kch#log=-#logkinds=debug#mtrg=-#zcomp=lzocrc"
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest misc "casket#type=kct#log=-#logkinds=debug#mtrg=-#zcomp=lzmacrc"
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest misc "casket#type=kcd#zcomp=arc#zkey=mikio"
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kcpolytest misc "casket#type=kcf#zcomp=arc#zkey=mikio"
check-langc :
-del casket* /F /Q > NUL: 2>&1
-rd casket casket.wal casket.tmp casket-para casket.kcd casket.kcf /S /Q > NUL: 2>&1
kclangctest order "casket.kch#bnum=5000#msiz=50000" 10000
kclangctest order -etc \
"casket.kch#bnum=5000#msiz=50000#dfunit=2" 10000
kclangctest order -rnd -etc \
"casket.kch#bnum=5000#msiz=50000#dfunit=2" 10000
kclangctest order -rnd -etc -oat -tran \
"casket.kch#bnum=5000#msiz=50000#dfunit=2#zcomp=arcz" 10000
kclangctest index "casket.kct#bnum=5000#msiz=50000" 10000
kclangctest index -etc \
"casket.kct#bnum=5000#msiz=50000#dfunit=2" 10000
kclangctest index -rnd -etc \
"casket.kct#bnum=5000#msiz=50000#dfunit=2" 10000
kclangctest index -rnd -etc -oat \
"casket.kct#bnum=5000#msiz=50000#dfunit=2#zcomp=arcz" 10000
kclangctest map 10000
kclangctest map -etc -bnum 1000 10000
kclangctest map -etc -rnd -bnum 1000 10000
kclangctest list 10000
kclangctest list -etc 10000
kclangctest list -etc -rnd 10000
check-forever :
lab\vcmakecheck
binpkg :
-rd kcwin32 /S /Q > NUL: 2>&1
md kcwin32
md kcwin32\include
copy *.h kcwin32\include
del kcwin32\include\myconf.h
del kcwin32\include\cmdcommon.h
md kcwin32\lib
copy *.lib kcwin32\lib
md kcwin32\bin
copy *.exe kcwin32\bin
xcopy /S /E /I doc kcwin32\doc
#================================================================
# Building binaries
#================================================================
kyotocabinet.lib : $(LIBOBJFILES)
$(LIB) $(LIBFLAGS) /OUT:$@ $(LIBOBJFILES)
kcutiltest.exe : kcutiltest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcutiltest.obj kyotocabinet.lib
kcutilmgr.exe : kcutilmgr.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcutilmgr.obj kyotocabinet.lib
kcprototest.exe : kcprototest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcprototest.obj kyotocabinet.lib
kcstashtest.exe : kcstashtest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcstashtest.obj kyotocabinet.lib
kccachetest.exe : kccachetest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kccachetest.obj kyotocabinet.lib
kcgrasstest.exe : kcgrasstest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcgrasstest.obj kyotocabinet.lib
kchashtest.exe : kchashtest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kchashtest.obj kyotocabinet.lib
kchashmgr.exe : kchashmgr.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kchashmgr.obj kyotocabinet.lib
kctreetest.exe : kctreetest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kctreetest.obj kyotocabinet.lib
kctreemgr.exe : kctreemgr.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kctreemgr.obj kyotocabinet.lib
kcdirtest.exe : kcdirtest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcdirtest.obj kyotocabinet.lib
kcdirmgr.exe : kcdirmgr.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcdirmgr.obj kyotocabinet.lib
kcforesttest.exe : kcforesttest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcforesttest.obj kyotocabinet.lib
kcforestmgr.exe : kcforestmgr.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcforestmgr.obj kyotocabinet.lib
kcpolytest.exe : kcpolytest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcpolytest.obj kyotocabinet.lib
kcpolymgr.exe : kcpolymgr.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kcpolymgr.obj kyotocabinet.lib
kclangctest.exe : kclangctest.obj kyotocabinet.lib
$(LINK) $(LINKFLAGS) /OUT:$@ kclangctest.obj kyotocabinet.lib
kcutil.obj : kccommon.h kcutil.h myconf.h
kcdb.obj : kccommon.h kcutil.h kcdb.h myconf.h
kcthread.obj : kccommon.h kcutil.h kcthread.h myconf.h
kcfile.obj : kccommon.h kcutil.h kcthread.h kcfile.h myconf.h
kccompress.obj : kccommon.h kcutil.h kccompress.h myconf.h
kccompare.obj : kccommon.h kcutil.h kccompare.h myconf.h
kcmap.obj : kccommon.h kcutil.h kcmap.h myconf.h
kcregex.obj : kccommon.h kcutil.h kcregex.h myconf.h
kcplantdb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h
kcprotodb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h
kcstashdb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcstashdb.h
kccachedb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kccachedb.h
kchashdb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kchashdb.h
kcdirdb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcdirdb.h
kctextdb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kctextdb.h
kcpolydb.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h kcpolydb.h
kcdbext.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h
kclangc.obj : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h kclangc.h
kcutiltest.obj kcutilmgr.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
cmdcommon.h
kcprototest.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h cmdcommon.h
kcstashtest.obj kcgrasstest.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcstashdb.h cmdcommon.h
kccachetest.obj kcgrasstest.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kccachedb.h cmdcommon.h
kchashtest.obj kchashmgr.obj kctreetest.obj kctreemgr.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kchashdb.h cmdcommon.h
kcdirtest.obj kcdirmgr.obj kcforesttest.obj kcforestmgr.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcdirdb.h cmdcommon.h
kcpolytest.obj kcpolymgr.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h cmdcommon.h
kclangctest.obj : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h kclangc.h
# END OF FILE
kyotocabinet-1.2.79/COPYING 0000644 0001750 0001750 00000104513 11523256007 014347 0 ustar mikio mikio GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
kyotocabinet-1.2.79/Makefile.in 0000644 0001750 0001750 00000152276 11604605501 015367 0 ustar mikio mikio # Makefile for Kyoto Cabinet
#================================================================
# Setting Variables
#================================================================
# Generic settings
SHELL = @SHELL@
# Package information
PACKAGE = @PACKAGE_NAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
VERSION = @PACKAGE_VERSION@
PACKAGEDIR = $(PACKAGE)-$(VERSION)
PACKAGETGZ = $(PACKAGE)-$(VERSION).tar.gz
LIBVER = @MYLIBVER@
LIBREV = @MYLIBREV@
FORMATVER = @MYFORMATVER@
# Targets
HEADERFILES = @MYHEADERFILES@
LIBRARYFILES = @MYLIBRARYFILES@
LIBOBJFILES = @MYLIBOBJFILES@
COMMANDFILES = @MYCOMMANDFILES@
MAN1FILES = @MYMAN1FILES@
DOCUMENTFILES = @MYDOCUMENTFILES@
PCFILES = @MYPCFILES@
# Install destinations
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
INCLUDEDIR = @includedir@
LIBDIR = @libdir@
BINDIR = @bindir@
LIBEXECDIR = @libexecdir@
DATADIR = @datadir@/$(PACKAGE)
MAN1DIR = @mandir@/man1
DOCDIR = @docdir@
PCDIR = @libdir@/pkgconfig
DESTDIR =
# Building configuration
CC = @CC@
CXX = @CXX@
CPPFLAGS = @MYCPPFLAGS@ \
-D_KC_PREFIX="\"$(prefix)\"" -D_KC_INCLUDEDIR="\"$(INCLUDEDIR)\"" \
-D_KC_LIBDIR="\"$(LIBDIR)\"" -D_KC_BINDIR="\"$(BINDIR)\"" -D_KC_LIBEXECDIR="\"$(LIBEXECDIR)\"" \
-D_KC_APPINC="\"-I$(INCLUDEDIR)\"" -D_KC_APPLIBS="\"-L$(LIBDIR) -lkyotocabinet @LIBS@\""
CFLAGS = @MYCFLAGS@
CXXFLAGS = @MYCXXFLAGS@
LDFLAGS = @MYLDFLAGS@
CMDLDFLAGS = @MYCMDLDFLAGS@
CMDLIBS = @MYCMDLIBS@
LIBS = @LIBS@
RUNENV = @MYLDLIBPATHENV@=@MYLDLIBPATH@
POSTCMD = @MYPOSTCMD@
#================================================================
# Suffix rules
#================================================================
.SUFFIXES :
.SUFFIXES : .c .cc .o
.c.o :
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
.cc.o :
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $<
#================================================================
# Actions
#================================================================
all : $(LIBRARYFILES) $(COMMANDFILES)
@$(POSTCMD)
@printf '\n'
@printf '#================================================================\n'
@printf '# Ready to install.\n'
@printf '#================================================================\n'
clean :
rm -rf $(LIBRARYFILES) $(LIBOBJFILES) $(COMMANDFILES) $(CGIFILES) \
*.o *.gch a.out check.in check.out gmon.out *.log *.vlog words.tsv \
casket* *.kch *.kct *.kcd *.kcf *.wal *.tmpkc* *.kcss *~ hoge moge tako ika
version :
sed -e 's/_KC_VERSION.*/_KC_VERSION "$(VERSION)"/' \
-e "s/_KC_LIBVER.*/_KC_LIBVER $(LIBVER)/" \
-e "s/_KC_LIBREV.*/_KC_LIBREV $(LIBREV)/" \
-e 's/_KC_FMTVER.*/_KC_FMTVER $(FORMATVER)/' myconf.h > myconf.h~
[ -f myconf.h~ ] && mv -f myconf.h~ myconf.h
untabify :
ls *.cc *.h *.idl | while read name ; \
do \
sed -e 's/\t/ /g' -e 's/ *$$//' $$name > $$name~; \
[ -f $$name~ ] && mv -f $$name~ $$name ; \
done
install :
mkdir -p $(DESTDIR)$(INCLUDEDIR)
cp -Rf $(HEADERFILES) $(DESTDIR)$(INCLUDEDIR)
mkdir -p $(DESTDIR)$(LIBDIR)
cp -Rf $(LIBRARYFILES) $(DESTDIR)$(LIBDIR)
mkdir -p $(DESTDIR)$(BINDIR)
cp -Rf $(COMMANDFILES) $(DESTDIR)$(BINDIR)
mkdir -p $(DESTDIR)$(MAN1DIR)
cd man && cp -Rf $(MAN1FILES) $(DESTDIR)$(MAN1DIR)
mkdir -p $(DESTDIR)$(DOCDIR)
cp -Rf $(DOCUMENTFILES) $(DESTDIR)$(DOCDIR)
mkdir -p $(DESTDIR)$(PCDIR)
cp -Rf $(PCFILES) $(DESTDIR)$(PCDIR)
@printf '\n'
@printf '#================================================================\n'
@printf '# Thanks for using Kyoto Cabinet.\n'
@printf '#================================================================\n'
install-strip :
$(MAKE) DESTDIR=$(DESTDIR) install
cd $(DESTDIR)$(BINDIR) && strip $(COMMANDFILES)
uninstall :
-cd $(DESTDIR)$(INCLUDEDIR) && rm -f $(HEADERFILES)
-cd $(DESTDIR)$(LIBDIR) && rm -f $(LIBRARYFILES)
-cd $(DESTDIR)$(BINDIR) && rm -f $(COMMANDFILES)
-cd $(DESTDIR)$(MAN1DIR) && rm -f $(MAN1FILES)
-cd $(DESTDIR)$(DOCDIR) && rm -rf $(DOCUMENTFILES) && rmdir $(DOCDIR)
-cd $(DESTDIR)$(PCDIR) && rm -f $(PCFILES)
dist :
$(MAKE) version
$(MAKE) untabify
$(MAKE) distclean
cd .. && tar cvf - $(PACKAGEDIR) | gzip -c > $(PACKAGETGZ)
sync ; sync
distclean : clean
cd example && $(MAKE) clean
rm -rf Makefile kyotocabinet.pc \
config.cache config.log config.status config.tmp autom4te.cache
check :
$(MAKE) check-util
$(MAKE) check-proto
$(MAKE) check-stash
$(MAKE) check-cache
$(MAKE) check-grass
$(MAKE) check-hash
$(MAKE) check-tree
$(MAKE) check-dir
$(MAKE) check-forest
$(MAKE) check-poly
$(MAKE) check-langc
rm -rf casket*
@printf '\n'
@printf '#================================================================\n'
@printf '# Checking completed.\n'
@printf '#================================================================\n'
check-util :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcutilmgr version
$(RUNENV) $(RUNCMD) ./kcutilmgr hex Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr hex -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr enc Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -hex Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -hex -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -url Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -url -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -quote Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr enc -quote -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr ciph -key "hoge" Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr ciph -key "hoge" check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr comp -gz Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr comp -gz -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr comp -lzo Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr comp -lzo -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr comp -lzma Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr comp -lzma -d check.in > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr hash Makefile > check.in
$(RUNENV) $(RUNCMD) ./kcutilmgr hash -fnv Makefile > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr hash -path Makefile > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr regex mikio Makefile > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr regex -alt "hirarin" mikio Makefile > check.out
$(RUNENV) $(RUNCMD) ./kcutilmgr conf
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcutiltest mutex -th 4 -iv -1 10000
$(RUNENV) $(RUNCMD) ./kcutiltest cond -th 4 -iv -1 10000
$(RUNENV) $(RUNCMD) ./kcutiltest para -th 4 10000
$(RUNENV) $(RUNCMD) ./kcutiltest para -th 4 -iv -1 10000
$(RUNENV) $(RUNCMD) ./kcutiltest file -th 4 casket 10000
$(RUNENV) $(RUNCMD) ./kcutiltest file -th 4 -rnd -msiz 1m casket 10000
$(RUNENV) $(RUNCMD) ./kcutiltest lhmap -bnum 1000 10000
$(RUNENV) $(RUNCMD) ./kcutiltest lhmap -rnd -bnum 1000 10000
$(RUNENV) $(RUNCMD) ./kcutiltest thmap -bnum 1000 10000
$(RUNENV) $(RUNCMD) ./kcutiltest thmap -rnd -bnum 1000 10000
$(RUNENV) $(RUNCMD) ./kcutiltest talist 10000
$(RUNENV) $(RUNCMD) ./kcutiltest talist -rnd 10000
$(RUNENV) $(RUNCMD) ./kcutiltest misc 10000
check-proto :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcprototest order -etc 10000
$(RUNENV) $(RUNCMD) ./kcprototest order -th 4 10000
$(RUNENV) $(RUNCMD) ./kcprototest order -th 4 -rnd -etc 10000
$(RUNENV) $(RUNCMD) ./kcprototest order -th 4 -rnd -etc -tran 10000
$(RUNENV) $(RUNCMD) ./kcprototest wicked 10000
$(RUNENV) $(RUNCMD) ./kcprototest wicked -th 4 -it 4 10000
$(RUNENV) $(RUNCMD) ./kcprototest tran 10000
$(RUNENV) $(RUNCMD) ./kcprototest tran -th 2 -it 4 10000
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcprototest order -tree -etc 10000
$(RUNENV) $(RUNCMD) ./kcprototest order -tree -th 4 10000
$(RUNENV) $(RUNCMD) ./kcprototest order -tree -th 4 -rnd -etc 10000
$(RUNENV) $(RUNCMD) ./kcprototest order -tree -th 4 -rnd -etc -tran 10000
$(RUNENV) $(RUNCMD) ./kcprototest wicked -tree 10000
$(RUNENV) $(RUNCMD) ./kcprototest wicked -tree -th 4 -it 4 10000
$(RUNENV) $(RUNCMD) ./kcprototest tran -tree 10000
$(RUNENV) $(RUNCMD) ./kcprototest tran -tree -th 2 -it 4 10000
check-stash :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcstashtest order -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest order -th 4 -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest order -th 4 -rnd -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest order -th 4 -rnd -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest order -th 4 -rnd -etc -tran \
-bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest wicked -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest wicked -th 4 -it 4 -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest tran -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcstashtest tran -th 2 -it 4 -bnum 5000 10000
check-cache :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kccachetest order -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kccachetest order -th 4 -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kccachetest order -th 4 -rnd -etc -bnum 5000 -capcnt 10000 10000
$(RUNENV) $(RUNCMD) ./kccachetest order -th 4 -rnd -etc -bnum 5000 -capsiz 10000 10000
$(RUNENV) $(RUNCMD) ./kccachetest order -th 4 -rnd -etc -tran \
-tc -bnum 5000 -capcnt 10000 10000
$(RUNENV) $(RUNCMD) ./kccachetest wicked -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kccachetest wicked -th 4 -it 4 -tc -bnum 5000 -capcnt 10000 10000
$(RUNENV) $(RUNCMD) ./kccachetest tran -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kccachetest tran -th 2 -it 4 -tc -bnum 5000 10000
check-grass :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcgrasstest order -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcgrasstest order -th 4 -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcgrasstest order -th 4 -rnd -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcgrasstest order -th 4 -rnd -etc -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcgrasstest order -th 4 -rnd -etc -tran \
-tc -bnum 5000 -pccap 10k -rcd 500
$(RUNENV) $(RUNCMD) ./kcgrasstest wicked -bnum 5000 10000
$(RUNENV) $(RUNCMD) ./kcgrasstest wicked -th 4 -it 4 -tc -bnum 5000 -pccap 10k -rcd 1000
$(RUNENV) $(RUNCMD) ./kcgrasstest tran -bnum 500 10000
$(RUNENV) $(RUNCMD) ./kcgrasstest tran -th 2 -it 4 -tc -bnum 5000 -pccap 10k -rcd 5000
check-hash :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kchashmgr create -otr -apow 1 -fpow 2 -bnum 3 casket
$(RUNENV) $(RUNCMD) ./kchashmgr inform -st casket
$(RUNENV) $(RUNCMD) ./kchashmgr set -add casket duffy 1231
$(RUNENV) $(RUNCMD) ./kchashmgr set -add casket micky 0101
$(RUNENV) $(RUNCMD) ./kchashmgr set casket fal 1007
$(RUNENV) $(RUNCMD) ./kchashmgr set casket mikio 0211
$(RUNENV) $(RUNCMD) ./kchashmgr set casket natsuki 0810
$(RUNENV) $(RUNCMD) ./kchashmgr set casket micky ""
$(RUNENV) $(RUNCMD) ./kchashmgr set -app casket duffy kukuku
$(RUNENV) $(RUNCMD) ./kchashmgr remove casket micky
$(RUNENV) $(RUNCMD) ./kchashmgr list -pv casket > check.out
$(RUNENV) $(RUNCMD) ./kchashmgr set casket ryu 1
$(RUNENV) $(RUNCMD) ./kchashmgr set casket ken 2
$(RUNENV) $(RUNCMD) ./kchashmgr remove casket duffy
$(RUNENV) $(RUNCMD) ./kchashmgr set casket ryu syo-ryu-ken
$(RUNENV) $(RUNCMD) ./kchashmgr set casket ken tatsumaki-senpu-kyaku
$(RUNENV) $(RUNCMD) ./kchashmgr set -inci casket int 1234
$(RUNENV) $(RUNCMD) ./kchashmgr set -inci casket int 5678
$(RUNENV) $(RUNCMD) ./kchashmgr set -incd casket double 1234.5678
$(RUNENV) $(RUNCMD) ./kchashmgr set -incd casket double 8765.4321
$(RUNENV) $(RUNCMD) ./kchashmgr get casket mikio
$(RUNENV) $(RUNCMD) ./kchashmgr get casket ryu
$(RUNENV) $(RUNCMD) ./kchashmgr import casket lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kchashmgr list -pv -px casket > check.out
$(RUNENV) $(RUNCMD) ./kchashmgr copy casket casket-para
$(RUNENV) $(RUNCMD) ./kchashmgr dump casket check.out
$(RUNENV) $(RUNCMD) ./kchashmgr load -otr casket check.out
$(RUNENV) $(RUNCMD) ./kchashmgr defrag -onl casket
$(RUNENV) $(RUNCMD) ./kchashmgr setbulk casket aa aaa bb bbb cc ccc dd ddd
$(RUNENV) $(RUNCMD) ./kchashmgr removebulk casket aa bb zz
$(RUNENV) $(RUNCMD) ./kchashmgr getbulk casket aa bb cc dd
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashmgr inform -st casket
$(RUNENV) $(RUNCMD) ./kchashmgr create -otr -otl -onr -apow 1 -fpow 3 \
-ts -tl -tc -bnum 1 casket
$(RUNENV) $(RUNCMD) ./kchashmgr import casket < lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kchashmgr set casket mikio kyotocabinet
$(RUNENV) $(RUNCMD) ./kchashmgr set -app casket tako ikaunini
$(RUNENV) $(RUNCMD) ./kchashmgr set -app casket mikio kyototyrant
$(RUNENV) $(RUNCMD) ./kchashmgr set -app casket mikio kyotodystopia
$(RUNENV) $(RUNCMD) ./kchashmgr get -px casket mikio > check.out
$(RUNENV) $(RUNCMD) ./kchashmgr list casket > check.out
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashmgr clear casket
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kchashtest order -set -bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -get -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -getw -msiz 5000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -rem -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -etc \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -th 4 \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest order -th 4 -rnd -etc \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest order -th 4 -rnd -etc -tran \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest order -th 4 -rnd -etc -oat \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest order -th 4 -rnd -etc \
-apow 2 -fpow 3 -ts -tl -tc -bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest queue \
-bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest queue -rnd \
-bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest queue -th 4 -it 4 \
-bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest queue -th 4 -it 4 -rnd \
-bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest wicked -bnum 5000 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest wicked -th 4 -it 4 \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest wicked -th 4 -it 4 -oat \
-bnum 5000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest wicked -th 4 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kchashtest tran casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest tran -th 2 -it 4 casket 10000
$(RUNENV) $(RUNCMD) ./kchashtest tran -th 2 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 casket 10000
check-tree :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kctreemgr create -otr -apow 1 -fpow 2 -bnum 3 casket
$(RUNENV) $(RUNCMD) ./kctreemgr inform -st casket
$(RUNENV) $(RUNCMD) ./kctreemgr set -add casket duffy 1231
$(RUNENV) $(RUNCMD) ./kctreemgr set -add casket micky 0101
$(RUNENV) $(RUNCMD) ./kctreemgr set casket fal 1007
$(RUNENV) $(RUNCMD) ./kctreemgr set casket mikio 0211
$(RUNENV) $(RUNCMD) ./kctreemgr set casket natsuki 0810
$(RUNENV) $(RUNCMD) ./kctreemgr set casket micky ""
$(RUNENV) $(RUNCMD) ./kctreemgr set -app casket duffy kukuku
$(RUNENV) $(RUNCMD) ./kctreemgr remove casket micky
$(RUNENV) $(RUNCMD) ./kctreemgr list -pv casket > check.out
$(RUNENV) $(RUNCMD) ./kctreemgr set casket ryu 1
$(RUNENV) $(RUNCMD) ./kctreemgr set casket ken 2
$(RUNENV) $(RUNCMD) ./kctreemgr remove casket duffy
$(RUNENV) $(RUNCMD) ./kctreemgr set casket ryu syo-ryu-ken
$(RUNENV) $(RUNCMD) ./kctreemgr set casket ken tatsumaki-senpu-kyaku
$(RUNENV) $(RUNCMD) ./kctreemgr set -inci casket int 1234
$(RUNENV) $(RUNCMD) ./kctreemgr set -inci casket int 5678
$(RUNENV) $(RUNCMD) ./kctreemgr set -incd casket double 1234.5678
$(RUNENV) $(RUNCMD) ./kctreemgr set -incd casket double 8765.4321
$(RUNENV) $(RUNCMD) ./kctreemgr get casket mikio
$(RUNENV) $(RUNCMD) ./kctreemgr get casket ryu
$(RUNENV) $(RUNCMD) ./kctreemgr import casket lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kctreemgr list -des -pv -px casket > check.out
$(RUNENV) $(RUNCMD) ./kctreemgr copy casket casket-para
$(RUNENV) $(RUNCMD) ./kctreemgr dump casket check.out
$(RUNENV) $(RUNCMD) ./kctreemgr load -otr casket check.out
$(RUNENV) $(RUNCMD) ./kctreemgr defrag -onl casket
$(RUNENV) $(RUNCMD) ./kctreemgr setbulk casket aa aaa bb bbb cc ccc dd ddd
$(RUNENV) $(RUNCMD) ./kctreemgr removebulk casket aa bb zz
$(RUNENV) $(RUNCMD) ./kctreemgr getbulk casket aa bb cc dd
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreemgr inform -st casket
$(RUNENV) $(RUNCMD) ./kctreemgr create -otr -otl -onr -apow 1 -fpow 3 \
-ts -tl -tc -bnum 1 casket
$(RUNENV) $(RUNCMD) ./kctreemgr import casket < lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kctreemgr set casket mikio kyotocabinet
$(RUNENV) $(RUNCMD) ./kctreemgr set -app casket tako ikaunini
$(RUNENV) $(RUNCMD) ./kctreemgr set -app casket mikio kyototyrant
$(RUNENV) $(RUNCMD) ./kctreemgr set -app casket mikio kyotodystopia
$(RUNENV) $(RUNCMD) ./kctreemgr get -px casket mikio > check.out
$(RUNENV) $(RUNCMD) ./kctreemgr list casket > check.out
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreemgr clear casket
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kctreetest order -set \
-psiz 100 -bnum 5000 -msiz 50000 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order -get \
-msiz 50000 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order -getw \
-msiz 5000 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order -rem \
-msiz 50000 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order \
-bnum 5000 -psiz 100 -msiz 50000 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order -etc \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order -th 4 \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest order -th 4 -pccap 100k -rnd -etc \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k -rcd casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest order -th 4 -rnd -etc -tran \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 1000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest order -th 4 -rnd -etc -oat \
-bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 -pccap 100k casket 1000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest order -th 4 -rnd -etc \
-apow 2 -fpow 3 -ts -tl -tc -bnum 5000 -psiz 1000 -msiz 50000 -dfunit 4 casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest queue \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest queue -rnd \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest queue -th 4 -it 4 \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest queue -th 4 -it 4 -rnd \
-bnum 5000 -psiz 500 -msiz 50000 casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest wicked \
-bnum 5000 -psiz 1000 -msiz 50000 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest wicked -th 4 -it 4 \
-bnum 5000 -msiz 50000 -dfunit 4 -pccap 100k -rcd casket 10000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest wicked -th 4 -it 4 -oat \
-bnum 5000 -msiz 50000 -dfunit 4 -pccap 100k casket 1000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest wicked -th 4 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 casket 1000
$(RUNENV) $(RUNCMD) ./kctreemgr check -onr casket
$(RUNENV) $(RUNCMD) ./kctreetest tran casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest tran -th 2 -it 4 -pccap 100k casket 10000
$(RUNENV) $(RUNCMD) ./kctreetest tran -th 2 -it 4 \
-apow 2 -fpow 3 -ts -tl -tc -bnum 10000 -msiz 50000 -dfunit 4 -rcd casket 10000
check-dir :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcdirmgr create -otr casket
$(RUNENV) $(RUNCMD) ./kcdirmgr inform -st casket
$(RUNENV) $(RUNCMD) ./kcdirmgr set -add casket duffy 1231
$(RUNENV) $(RUNCMD) ./kcdirmgr set -add casket micky 0101
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket fal 1007
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket mikio 0211
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket natsuki 0810
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket micky ""
$(RUNENV) $(RUNCMD) ./kcdirmgr set -app casket duffy kukuku
$(RUNENV) $(RUNCMD) ./kcdirmgr remove casket micky
$(RUNENV) $(RUNCMD) ./kcdirmgr list -pv casket > check.out
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket ryu 1
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket ken 2
$(RUNENV) $(RUNCMD) ./kcdirmgr remove casket duffy
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket ryu syo-ryu-ken
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket ken tatsumaki-senpu-kyaku
$(RUNENV) $(RUNCMD) ./kcdirmgr set -inci casket int 1234
$(RUNENV) $(RUNCMD) ./kcdirmgr set -inci casket int 5678
$(RUNENV) $(RUNCMD) ./kcdirmgr set -incd casket double 1234.5678
$(RUNENV) $(RUNCMD) ./kcdirmgr set -incd casket double 8765.4321
$(RUNENV) $(RUNCMD) ./kcdirmgr get casket mikio
$(RUNENV) $(RUNCMD) ./kcdirmgr get casket ryu
$(RUNENV) $(RUNCMD) ./kcdirmgr import casket lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kcdirmgr list -pv -px casket > check.out
$(RUNENV) $(RUNCMD) ./kcdirmgr copy casket casket-para
$(RUNENV) $(RUNCMD) ./kcdirmgr dump casket check.out
$(RUNENV) $(RUNCMD) ./kcdirmgr load -otr casket check.out
$(RUNENV) $(RUNCMD) ./kcdirmgr setbulk casket aa aaa bb bbb cc ccc dd ddd
$(RUNENV) $(RUNCMD) ./kcdirmgr removebulk casket aa bb zz
$(RUNENV) $(RUNCMD) ./kcdirmgr getbulk casket aa bb cc dd
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirmgr inform -st casket
$(RUNENV) $(RUNCMD) ./kcdirmgr create -otr -otl -onr -tc casket
$(RUNENV) $(RUNCMD) ./kcdirmgr import casket < lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kcdirmgr set casket mikio kyotocabinet
$(RUNENV) $(RUNCMD) ./kcdirmgr set -app casket tako ikaunini
$(RUNENV) $(RUNCMD) ./kcdirmgr set -app casket mikio kyototyrant
$(RUNENV) $(RUNCMD) ./kcdirmgr set -app casket mikio kyotodystopia
$(RUNENV) $(RUNCMD) ./kcdirmgr get -px casket mikio > check.out
$(RUNENV) $(RUNCMD) ./kcdirmgr list casket > check.out
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirmgr clear casket
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcdirtest order -set casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order -get casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order -getw casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order -rem casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order -etc casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order -th 4 casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest order -th 4 -rnd -etc casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest order -th 4 -rnd -etc -tran casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest order -th 4 -rnd -etc -oat casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest order -th 4 -rnd -etc -tc casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest queue casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest queue -rnd casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest queue -th 4 -it 4 casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest queue -th 4 -it 4 -rnd casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest wicked casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest wicked -th 4 -it 4 casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest wicked -th 4 -it 4 -oat casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest wicked -th 4 -it 4 -tc casket 500
$(RUNENV) $(RUNCMD) ./kcdirmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcdirtest tran casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest tran -th 2 -it 4 casket 500
$(RUNENV) $(RUNCMD) ./kcdirtest tran -th 2 -it 4 -tc casket 500
check-forest :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcforestmgr create -otr -bnum 3 casket
$(RUNENV) $(RUNCMD) ./kcforestmgr inform -st casket
$(RUNENV) $(RUNCMD) ./kcforestmgr set -add casket duffy 1231
$(RUNENV) $(RUNCMD) ./kcforestmgr set -add casket micky 0101
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket fal 1007
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket mikio 0211
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket natsuki 0810
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket micky ""
$(RUNENV) $(RUNCMD) ./kcforestmgr set -app casket duffy kukuku
$(RUNENV) $(RUNCMD) ./kcforestmgr remove casket micky
$(RUNENV) $(RUNCMD) ./kcforestmgr list -pv casket > check.out
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket ryu 1
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket ken 2
$(RUNENV) $(RUNCMD) ./kcforestmgr remove casket duffy
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket ryu syo-ryu-ken
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket ken tatsumaki-senpu-kyaku
$(RUNENV) $(RUNCMD) ./kcforestmgr set -inci casket int 1234
$(RUNENV) $(RUNCMD) ./kcforestmgr set -inci casket int 5678
$(RUNENV) $(RUNCMD) ./kcforestmgr set -incd casket double 1234.5678
$(RUNENV) $(RUNCMD) ./kcforestmgr set -incd casket double 8765.4321
$(RUNENV) $(RUNCMD) ./kcforestmgr get casket mikio
$(RUNENV) $(RUNCMD) ./kcforestmgr get casket ryu
$(RUNENV) $(RUNCMD) ./kcforestmgr import casket lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kcforestmgr list -des -pv -px casket > check.out
$(RUNENV) $(RUNCMD) ./kcforestmgr copy casket casket-para
$(RUNENV) $(RUNCMD) ./kcforestmgr dump casket check.out
$(RUNENV) $(RUNCMD) ./kcforestmgr load -otr casket check.out
$(RUNENV) $(RUNCMD) ./kcforestmgr setbulk casket aa aaa bb bbb cc ccc dd ddd
$(RUNENV) $(RUNCMD) ./kcforestmgr removebulk casket aa bb zz
$(RUNENV) $(RUNCMD) ./kcforestmgr getbulk casket aa bb cc dd
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforestmgr inform -st casket
$(RUNENV) $(RUNCMD) ./kcforestmgr create -otr -otl -onr \
-tc -bnum 1 casket
$(RUNENV) $(RUNCMD) ./kcforestmgr import casket < lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kcforestmgr set casket mikio kyotocabinet
$(RUNENV) $(RUNCMD) ./kcforestmgr set -app casket tako ikaunini
$(RUNENV) $(RUNCMD) ./kcforestmgr set -app casket mikio kyototyrant
$(RUNENV) $(RUNCMD) ./kcforestmgr set -app casket mikio kyotodystopia
$(RUNENV) $(RUNCMD) ./kcforestmgr get -px casket mikio > check.out
$(RUNENV) $(RUNCMD) ./kcforestmgr list casket > check.out
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforestmgr clear casket
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcforesttest order -set \
-psiz 100 -bnum 5000 -pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order -get \
-pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order -getw \
-pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order -rem \
-pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order \
-bnum 5000 -psiz 100 -pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order -etc \
-bnum 5000 -psiz 1000 -pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order -th 4 \
-bnum 5000 -psiz 1000 -pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest order -th 4 -pccap 100k -rnd -etc \
-bnum 5000 -psiz 1000 -pccap 100k -rcd casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest order -th 4 -rnd -etc -tran \
-bnum 500 -psiz 1000 -pccap 100k casket 500
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest order -th 4 -rnd -etc -oat \
-bnum 500 -psiz 1000 -pccap 100k casket 500
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest order -th 4 -rnd -etc \
-tc -bnum 5000 -psiz 1000 casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest queue \
-bnum 5000 -psiz 500 casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest queue -rnd \
-bnum 5000 -psiz 500 casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest queue -th 4 -it 4 \
-bnum 5000 -psiz 500 casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest queue -th 4 -it 4 -rnd \
-bnum 5000 -psiz 500 casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest wicked \
-bnum 5000 -psiz 1000 -pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest wicked -th 4 -it 4 \
-bnum 5000 -pccap 100k -rcd casket 5000
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest wicked -th 4 -it 4 -oat \
-bnum 500 -pccap 100k casket 500
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest wicked -th 4 -it 4 \
-tc -bnum 500 casket 500
$(RUNENV) $(RUNCMD) ./kcforestmgr check -onr casket
$(RUNENV) $(RUNCMD) ./kcforesttest tran casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest tran -th 2 -it 4 -pccap 100k casket 5000
$(RUNENV) $(RUNCMD) ./kcforesttest tran -th 2 -it 4 \
-tc -bnum 5000 -rcd casket 5000
check-poly :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolymgr create -otr "casket.kch#apow=1#fpow=2#bnum=3"
$(RUNENV) $(RUNCMD) ./kcpolymgr inform -st casket.kch
$(RUNENV) $(RUNCMD) ./kcpolymgr set -add casket.kch duffy 1231
$(RUNENV) $(RUNCMD) ./kcpolymgr set -add casket.kch micky 0101
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch fal 1007
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch mikio 0211
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch natsuki 0810
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch micky ""
$(RUNENV) $(RUNCMD) ./kcpolymgr set -app casket.kch duffy kukuku
$(RUNENV) $(RUNCMD) ./kcpolymgr remove casket.kch micky
$(RUNENV) $(RUNCMD) ./kcpolymgr list -pv casket.kch > check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr copy casket.kch casket-para
$(RUNENV) $(RUNCMD) ./kcpolymgr dump casket.kch check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr load -otr casket.kch check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch ryu 1
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch ken 2
$(RUNENV) $(RUNCMD) ./kcpolymgr remove casket.kch duffy
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch ryu syo-ryu-ken
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kch ken tatsumaki-senpu-kyaku
$(RUNENV) $(RUNCMD) ./kcpolymgr set -inci casket.kch int 1234
$(RUNENV) $(RUNCMD) ./kcpolymgr set -inci casket.kch int 5678
$(RUNENV) $(RUNCMD) ./kcpolymgr set -incd casket.kch double 1234.5678
$(RUNENV) $(RUNCMD) ./kcpolymgr set -incd casket.kch double 8765.4321
$(RUNENV) $(RUNCMD) ./kcpolymgr get "casket.kch" mikio
$(RUNENV) $(RUNCMD) ./kcpolymgr get "casket.kch" ryu
$(RUNENV) $(RUNCMD) ./kcpolymgr import casket.kch lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kcpolymgr list -pv -px "casket.kch#mode=r" > check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr setbulk casket.kch aa aaa bb bbb cc ccc dd ddd
$(RUNENV) $(RUNCMD) ./kcpolymgr removebulk casket.kch aa bb zz
$(RUNENV) $(RUNCMD) ./kcpolymgr getbulk casket.kch aa bb cc dd
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kch
$(RUNENV) $(RUNCMD) ./kcpolymgr inform -st casket.kch
$(RUNENV) $(RUNCMD) ./kcpolymgr create -otr -otl -onr \
"casket.kct#apow=1#fpow=3#opts=slc#bnum=1"
$(RUNENV) $(RUNCMD) ./kcpolymgr import casket.kct < lab/numbers.tsv
$(RUNENV) $(RUNCMD) ./kcpolymgr set casket.kct mikio kyotocabinet
$(RUNENV) $(RUNCMD) ./kcpolymgr set -app casket.kct tako ikaunini
$(RUNENV) $(RUNCMD) ./kcpolymgr set -app casket.kct mikio kyototyrant
$(RUNENV) $(RUNCMD) ./kcpolymgr set -app casket.kct mikio kyotodystopia
$(RUNENV) $(RUNCMD) ./kcpolymgr get -px casket.kct mikio > check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr list casket.kct > check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolymgr clear casket.kct
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest order -set "casket.kct#bnum=5000#msiz=50000" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -get "casket.kct#msiz=50000" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -getw "casket.kct#msiz=5000" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -rem "casket.kct#msiz=50000" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order "casket.kct#bnum=5000#msiz=50000" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -etc \
"casket.kct#bnum=5000#msiz=50000#dfunit=4" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -th 4 \
"casket.kct#bnum=5000#msiz=50000#dfunit=4" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -th 4 -rnd -etc \
"casket.kct#bnum=5000#msiz=0#dfunit=1" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest order -th 4 -rnd -etc -tran \
"casket.kct#bnum=5000#msiz=0#dfunit=2" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest order -th 4 -rnd -etc -oat \
"casket.kct#bnum=5000#msiz=0#dfunit=3" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest order -th 4 -rnd -etc \
"casket.kct#apow=2#fpow=3#opts=slc#bnum=5000#msiz=0#dfunit=4" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest queue \
"casket.kct#bnum=5000#msiz=0" 10000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest queue -rnd \
"casket.kct#bnum=5000#msiz=0" 10000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest queue -th 4 -it 4 \
"casket.kct#bnum=5000#msiz=0" 10000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest queue -th 4 -it 4 -rnd \
"casket.kct#bnum=5000#msiz=0" 10000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest wicked "casket.kct#bnum=5000#msiz=0" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest wicked -th 4 -it 4 \
"casket.kct#bnum=5000#msiz=0#dfunit=1" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest wicked -th 4 -it 4 -oat \
"casket.kct#bnum=5000#msiz=0#dfunit=1" 1000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest wicked -th 4 -it 4 \
"casket.kct#apow=2#fpow=3#opts=slc#bnum=10000#msiz=0#dfunit=1" 10000
$(RUNENV) $(RUNCMD) ./kcpolymgr check -onr casket.kct
$(RUNENV) $(RUNCMD) ./kcpolytest tran casket.kct 10000
$(RUNENV) $(RUNCMD) ./kcpolytest tran -th 2 -it 4 casket.kct 10000
$(RUNENV) $(RUNCMD) ./kcpolytest tran -th 2 -it 4 \
"casket.kct#apow=2#fpow=3#opts=slc#bnum=10000#msiz=0#dfunit=1" 1000
$(RUNENV) $(RUNCMD) ./kcpolytest mapred -dbnum 2 -clim 10k casket.kct 10000
$(RUNENV) $(RUNCMD) ./kcpolytest mapred -tmp . -dbnum 2 -clim 10k -xnl -xnc \
casket.kct 10000
$(RUNENV) $(RUNCMD) ./kcpolytest mapred -tmp . -dbnum 2 -clim 10k -xpm -xpr -xpf -xnc \
casket.kct 10000
$(RUNENV) $(RUNCMD) ./kcpolytest mapred -rnd -dbnum 2 -clim 10k casket.kct 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -set "casket.kct#idxclim=32k" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -get "casket.kct" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -rem "casket.kct" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -etc "casket.kct#idxclim=32k" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -th 4 -rnd -set \
"casket.kct#idxclim=32k#idxdbnum=4" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -th 4 -rnd -get "casket.kct" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -th 4 -rnd -rem "casket.kct" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest index -th 4 -rnd -etc \
"casket.kct#idxclim=32k#idxdbnum=4" 10000
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest order -rnd "casket.kcx" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest order -th 4 -rnd "casket.kcx" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest wicked "casket.kcx" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest wicked -th 4 "casket.kcx" 10000
$(RUNENV) $(RUNCMD) ./kcpolymgr list -pv "casket.kcx" > check.out
$(RUNENV) $(RUNCMD) ./kcpolymgr list -max 1000 -pv "casket.kcx" > check.out
$(RUNENV) $(RUNCMD) ./kcpolytest mapred "casket.kcx" 10000
$(RUNENV) $(RUNCMD) ./kcpolytest mapred -xpm -xpr -xpf "casket.kcx" 10000
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest order -rnd "casket.kch#opts=s#bnum=256" 1000
$(RUNENV) $(RUNCMD) ./kcpolytest order -rnd "casket.kct#opts=l#psiz=256" 1000
$(RUNENV) $(RUNCMD) ./kcpolytest order -rnd "casket.kcd#opts=c#bnum=256" 500
$(RUNENV) $(RUNCMD) ./kcpolytest order -rnd "casket.kcf#opts=c#psiz=256" 500
$(RUNENV) $(RUNCMD) ./kcpolytest order -rnd "casket.kcx" 500
$(RUNENV) $(RUNCMD) ./kcpolymgr merge -add "casket#type=kct" \
casket.kch casket.kct casket.kcd casket.kcf casket.kcx
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest misc "casket#type=-"
$(RUNENV) $(RUNCMD) ./kcpolytest misc "casket#type=+"
$(RUNENV) $(RUNCMD) ./kcpolytest misc "casket#type=:"
$(RUNENV) $(RUNCMD) ./kcpolytest misc "casket#type=*#zcomp=def"
$(RUNENV) $(RUNCMD) ./kcpolytest misc "casket#type=%#zcomp=gz"
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest misc \
"casket#type=kch#log=-#logkinds=debug#mtrg=-#zcomp=lzocrc"
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest misc \
"casket#type=kct#log=-#logkinds=debug#mtrg=-#zcomp=lzmacrc"
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest misc \
"casket#type=kcd#zcomp=arc#zkey=mikio"
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kcpolytest misc \
"casket#type=kcf#zcomp=arc#zkey=mikio"
check-langc :
rm -rf casket*
$(RUNENV) $(RUNCMD) ./kclangctest order "casket.kch#bnum=5000#msiz=50000" 10000
$(RUNENV) $(RUNCMD) ./kclangctest order -etc \
"casket.kch#bnum=5000#msiz=50000#dfunit=2" 10000
$(RUNENV) $(RUNCMD) ./kclangctest order -rnd -etc \
"casket.kch#bnum=5000#msiz=50000#dfunit=2" 10000
$(RUNENV) $(RUNCMD) ./kclangctest order -rnd -etc -oat -tran \
"casket.kch#bnum=5000#msiz=50000#dfunit=2#zcomp=arcz" 10000
$(RUNENV) $(RUNCMD) ./kclangctest index "casket.kct#bnum=5000#msiz=50000" 10000
$(RUNENV) $(RUNCMD) ./kclangctest index -etc \
"casket.kct#bnum=5000#msiz=50000#dfunit=2" 10000
$(RUNENV) $(RUNCMD) ./kclangctest index -rnd -etc \
"casket.kct#bnum=5000#msiz=50000#dfunit=2" 10000
$(RUNENV) $(RUNCMD) ./kclangctest index -rnd -etc -oat \
"casket.kct#bnum=5000#msiz=50000#dfunit=2#zcomp=arcz" 10000
$(RUNENV) $(RUNCMD) ./kclangctest map 10000
$(RUNENV) $(RUNCMD) ./kclangctest map -etc -bnum 1000 10000
$(RUNENV) $(RUNCMD) ./kclangctest map -etc -rnd -bnum 1000 10000
$(RUNENV) $(RUNCMD) ./kclangctest list 10000
$(RUNENV) $(RUNCMD) ./kclangctest list -etc 10000
$(RUNENV) $(RUNCMD) ./kclangctest list -etc -rnd 10000
check-valgrind :
$(MAKE) RUNCMD="valgrind --tool=memcheck --log-file=%p.vlog" check
grep ERROR *.vlog | grep -v ' 0 errors' ; true
grep 'at exit' *.vlog | grep -v ' 0 bytes' ; true
check-heavy :
$(MAKE) check-hash-heavy
$(MAKE) check-tree-heavy
check-hash-heavy :
$(RUNENV) ./kchashtest order -th 4 \
-apow 2 -fpow 2 -bnum 500000 -msiz 50m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest order -th 4 -rnd \
-apow 2 -fpow 2 -bnum 500000 -msiz 50m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest order -th 4 -etc \
-apow 2 -fpow 2 -bnum 500000 -msiz 50m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest order -th 4 -etc -rnd \
-apow 2 -fpow 2 -bnum 500000 -msiz 50m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest order -th 4 -etc -rnd \
-ts -tl -tc -dfunit 2 casket 25000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest queue -th 4 -it 10 \
-bnum 1000000 -apow 4 -fpow 12 -msiz 100m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest queue -th 4 -it 5 -rnd \
-ts -tl -tc -dfunit 2 casket 25000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest queue -th 4 -it 2 -oat -rnd \
-bnum 1000 -dfunit 8 casket 25000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest queue -th 4 -it 2 -oas -rnd \
-bnum 1000 -dfunit 8 casket 2500
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest wicked -th 4 -it 10 \
-bnum 1000000 -apow 4 -fpow 12 -msiz 100m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest wicked -th 4 -it 5 \
-ts -tl -tc -dfunit 2 casket 25000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest wicked -th 4 -it 2 -oat \
-bnum 1000 -dfunit 8 casket 25000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest wicked -th 4 -it 2 -oas \
-bnum 1000 -dfunit 8 casket 2500
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest tran -th 4 -it 10 \
-apow 2 -fpow 2 -bnum 500000 -msiz 50m -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
$(RUNENV) ./kchashtest tran -th 4 -it 5 \
-ts -tl -tc -dfunit 2 casket 250000
$(RUNENV) ./kchashmgr check -onr casket
check-tree-heavy :
$(RUNENV) ./kctreetest order -th 4 \
-apow 2 -fpow 2 -bnum 50000 -psiz 1000 -msiz 50m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest order -th 4 -rnd \
-apow 2 -fpow 2 -bnum 50000 -psiz 1000 -msiz 50m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest order -th 4 -etc \
-apow 2 -fpow 2 -bnum 50000 -psiz 1000 -msiz 50m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest order -th 4 -etc -rnd \
-apow 2 -fpow 2 -bnum 50000 -psiz 1000 -msiz 50m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest order -th 4 -etc -rnd \
-ts -tl -tc -dfunit 2 casket 25000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest queue -th 4 -it 10 \
-bnum 1000000 -apow 4 -fpow 12 -msiz 100m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest queue -th 4 -it 5 -rnd \
-ts -tl -tc -dfunit 2 -pccap 10m casket 25000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest queue -th 4 -it 2 -oat -rnd \
-bnum 1000 -dfunit 8 -pccap 10m casket 25000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest queue -th 4 -it 2 -oas -rnd \
-bnum 1000 -dfunit 8 -pccap 10m casket 2500
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest wicked -th 4 -it 5 \
-bnum 100000 -apow 4 -fpow 12 -msiz 100m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest wicked -th 4 -it 2 \
-ts -tl -tc -dfunit 2 -pccap 10m casket 25000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest wicked -th 4 -it 2 -oat \
-bnum 1000 -dfunit 8 -pccap 10m casket 25000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest wicked -th 4 -it 2 -oas \
-bnum 1000 -dfunit 8 -pccap 10m casket 2500
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest tran -th 4 -it 5 \
-apow 2 -fpow 2 -bnum 50000 -msiz 50m -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
$(RUNENV) ./kctreetest tran -th 4 -it 2 \
-ts -tl -tc -dfunit 2 -pccap 10m casket 250000
$(RUNENV) ./kctreemgr check -onr casket
check-segv :
$(RUNENV) ./lab/segvtest hash "0.5" 100
$(RUNENV) ./lab/segvtest hash "" 10
$(RUNENV) ./lab/segvtest hash "100" 1
$(RUNENV) ./lab/segvtest hash -oat "0.5" 100
$(RUNENV) ./lab/segvtest hash -oat "" 10
$(RUNENV) ./lab/segvtest hash -oat "100" 1
$(RUNENV) ./lab/segvtest hash -tran "" 10
$(RUNENV) ./lab/segvtest hash -wicked "" 10
$(RUNENV) ./lab/segvtest hash -wicked -oat "" 10
$(RUNENV) ./lab/segvtest tree "0.5" 100
$(RUNENV) ./lab/segvtest tree "" 10
$(RUNENV) ./lab/segvtest tree "100" 1
$(RUNENV) ./lab/segvtest tree -oat "0.5" 100
$(RUNENV) ./lab/segvtest tree -oat "" 10
$(RUNENV) ./lab/segvtest tree -oat "100" 1
$(RUNENV) ./lab/segvtest tree -tran "" 10
$(RUNENV) ./lab/segvtest tree -wicked "" 10
$(RUNENV) ./lab/segvtest tree -wicked -oat "" 10
$(RUNENV) ./lab/segvtest dir -oat "" 10
$(RUNENV) ./lab/segvtest dir -oat "0.5" 100
$(RUNENV) ./lab/segvtest dir -oat "" 10
$(RUNENV) ./lab/segvtest dir -oat "100" 1
$(RUNENV) ./lab/segvtest dir -tran "" 10
$(RUNENV) ./lab/segvtest dir -wicked "" 10
$(RUNENV) ./lab/segvtest dir -wicked -oat "" 10
$(RUNENV) ./lab/segvtest forest "" 10
$(RUNENV) ./lab/segvtest forest -oat "0.5" 100
$(RUNENV) ./lab/segvtest forest -oat "" 10
$(RUNENV) ./lab/segvtest forest -oat "100" 1
$(RUNENV) ./lab/segvtest forest -tran "" 10
$(RUNENV) ./lab/segvtest forest -wicked "" 10
$(RUNENV) ./lab/segvtest forest -wicked -oat "" 10
check-forever :
while true ; \
do \
$(MAKE) check || break ; \
$(MAKE) check || break ; \
$(MAKE) check || break ; \
$(MAKE) check || break ; \
$(MAKE) check-heavy || break ; \
$(MAKE) check-segv || break ; \
done
doc :
$(MAKE) docclean
mkdir -p doc/api
doxygen
docclean :
rm -rf doc/api
gch :
$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) *.h
words.tsv :
cat /usr/share/dict/words | \
tr '\t\r' ' ' | grep -v '^ *$$' | cat -n | sort | \
LC_ALL=C sed -e 's/^ *//' -e 's/\(^[0-9]*\)\t\(.*\)/\2\t\1/' > words.tsv
def : libkyotocabinet.a
./lab/makevcdef libkyotocabinet.a > kyotocabinet.def
.PHONY : all clean install check doc
#================================================================
# Building binaries
#================================================================
libkyotocabinet.a : $(LIBOBJFILES)
$(AR) $(ARFLAGS) $@ $(LIBOBJFILES)
libkyotocabinet.so.$(LIBVER).$(LIBREV).0 : $(LIBOBJFILES)
if uname -a | egrep -i 'SunOS' > /dev/null ; \
then \
$(CXX) $(CXXFLAGS) -shared -Wl,-G,-h,libkyotocabinet.so.$(LIBVER) -o $@ \
$(LIBOBJFILES) $(LDFLAGS) $(LIBS) ; \
else \
$(CXX) $(CXXFLAGS) -shared -Wl,-soname,libkyotocabinet.so.$(LIBVER) -o $@ \
$(LIBOBJFILES) $(LDFLAGS) $(LIBS) ; \
fi
libkyotocabinet.so.$(LIBVER) : libkyotocabinet.so.$(LIBVER).$(LIBREV).0
ln -f -s libkyotocabinet.so.$(LIBVER).$(LIBREV).0 $@
libkyotocabinet.so : libkyotocabinet.so.$(LIBVER).$(LIBREV).0
ln -f -s libkyotocabinet.so.$(LIBVER).$(LIBREV).0 $@
libkyotocabinet.$(LIBVER).$(LIBREV).0.dylib : $(LIBOBJFILES)
$(CXX) $(CXXFLAGS) -dynamiclib -o $@ \
-install_name $(LIBDIR)/libkyotocabinet.$(LIBVER).dylib \
-current_version $(LIBVER).$(LIBREV).0 -compatibility_version $(LIBVER) \
$(LIBOBJFILES) $(LDFLAGS) $(LIBS)
libkyotocabinet.$(LIBVER).dylib : libkyotocabinet.$(LIBVER).$(LIBREV).0.dylib
ln -f -s libkyotocabinet.$(LIBVER).$(LIBREV).0.dylib $@
libkyotocabinet.dylib : libkyotocabinet.$(LIBVER).$(LIBREV).0.dylib
ln -f -s libkyotocabinet.$(LIBVER).$(LIBREV).0.dylib $@
kcutiltest : kcutiltest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcutilmgr : kcutilmgr.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcprototest : kcprototest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcstashtest : kcstashtest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kccachetest : kccachetest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcgrasstest : kcgrasstest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kchashtest : kchashtest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kchashmgr : kchashmgr.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kctreetest : kctreetest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kctreemgr : kctreemgr.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcdirtest : kcdirtest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcdirmgr : kcdirmgr.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcforesttest : kcforesttest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcforestmgr : kcforestmgr.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcpolytest : kcpolytest.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcpolymgr : kcpolymgr.o $(LIBRARYFILES)
$(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kclangctest : kclangctest.o $(LIBRARYFILES)
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(CMDLDFLAGS) -lkyotocabinet $(CMDLIBS)
kcutil.o : kccommon.h kcutil.h myconf.h
kcthread.o : kccommon.h kcutil.h kcthread.h myconf.h
kcfile.o : kccommon.h kcutil.h kcthread.h kcfile.h myconf.h
kccompress.o : kccommon.h kcutil.h kccompress.h myconf.h
kccompare.o : kccommon.h kcutil.h kccompare.h myconf.h
kcmap.o : kccommon.h kcutil.h kcmap.h myconf.h
kcregex.o : kccommon.h kcutil.h kcregex.h myconf.h
kcdb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h
kcplantdb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h
kcprotodb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h
kcstashdb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcstashdb.h
kccachedb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kccachedb.h
kchashdb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kchashdb.h
kcdirdb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcdirdb.h
kctextdb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kctextdb.h
kcpolydb.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h kcpolydb.h
kcdbext.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h
kclangc.o : kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h kclangc.h
kcutiltest.o kcutilmgr.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
cmdcommon.h
kcprototest.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h cmdcommon.h
kcstashtest.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcstashdb.h cmdcommon.h
kccachetest.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kccachedb.h cmdcommon.h
kcgrasstest.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kccachedb.h cmdcommon.h
kchashtest.o kchashmgr.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kchashdb.h cmdcommon.h
kctreetest.o kctreemgr.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kchashdb.h cmdcommon.h
kcdirtest.o kcdirmgr.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcdirdb.h cmdcommon.h
kcforesttest.o kcforestmgr.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcdirdb.h cmdcommon.h
kcpolytest.o kcpolymgr.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h cmdcommon.h
kclangctest.o : \
kccommon.h kcdb.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h \
kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h kclangc.h
# END OF FILE
kyotocabinet-1.2.79/man/ 0000755 0001750 0001750 00000000000 11757416060 014071 5 ustar mikio mikio kyotocabinet-1.2.79/man/kcdirmgr.1 0000644 0001750 0001750 00000010107 11757416060 015754 0 ustar mikio mikio .TH "KCDIRMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcdirmgr \- command line interface to manage the directory hash database
.SH DESCRIPTION
.PP
The command `\fBkcdirmgr\fR' is a utility for test and debugging of the directory hash database and its applications. `\fIpath\fR' specifies the path of a database file. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIfile\fR' specifies the input/output file.
.PP
.RS
.br
\fBkcdirmgr create \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fIpath\fB\fR
.RS
Creates a database file.
.RE
.br
\fBkcdirmgr inform \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-st\fR]\fB \fIpath\fB\fR
.RS
Prints status information.
.RE
.br
\fBkcdirmgr set \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR|\fB\-inci\fR|\fB\-incd\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
.RS
Stores a record.
.RE
.br
\fBkcdirmgr remove \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Removes a record.
.RE
.br
\fBkcdirmgr get \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Prints the value of a record.
.RE
.br
\fBkcdirmgr list \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-max \fInum\fB\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fR[\fB\fIkey\fB\fR]\fB\fR
.RS
Prints keys of all records, separated by line feeds.
.RE
.br
\fBkcdirmgr clear \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Removes all records of a database.
.RE
.br
\fBkcdirmgr import \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Imports records from a TSV file.
.RE
.br
\fBkcdirmgr copy \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIfile\fB\fR
.RS
Copies the whole database.
.RE
.br
\fBkcdirmgr dump \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Dumps records into a snapshot file.
.RE
.br
\fBkcdirmgr load \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Loads records from a snapshot file.
.RE
.br
\fBkcdirmgr defrag \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Performs defragmentation.
.RE
.br
\fBkcdirmgr setbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB ...\fR
.RS
Store records at once.
.RE
.br
\fBkcdirmgr removebulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Remove records at once.
.RE
.br
\fBkcdirmgr getbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Retrieve records at once.
.RE
.br
\fBkcdirmgr check \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Checks consistency.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-otr\fR : opens the database with the truncation option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-st\fR : prints miscellaneous information.
.br
\fB\-add\fR : performs adding operation.
.br
\fB\-app\fR : performs appending operation.
.br
\fB\-rep\fR : performs replacing operation.
.br
\fB\-inci\fR : performs integer increment operation.
.br
\fB\-incd\fR : performs real number increment operation.
.br
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
.br
\fB\-rm\fR : removes the record.
.br
\fB\-px\fR : the output data is converted into a hexadecimal data string.
.br
\fB\-pz\fR : does not append line feed at the end of the output.
.br
\fB\-max \fInum\fR\fR : specifies the maximum number of shown records.
.br
\fB\-pv\fR : prints values of records also.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcdirtest (1)
kyotocabinet-1.2.79/man/kcforestmgr.1 0000644 0001750 0001750 00000011101 11757416060 016473 0 ustar mikio mikio .TH "KCFORESTMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcforestmgr \- command line interface to manage the directory tree database
.SH DESCRIPTION
.PP
The command `\fBkcforestmgr\fR' is a utility for test and debugging of the file tree database and its applications. `\fIpath\fR' specifies the path of a database file. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIfile\fR' specifies the input/output file.
.PP
.RS
.br
\fBkcforestmgr create \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fIpath\fB\fR
.RS
Creates a database file.
.RE
.br
\fBkcforestmgr inform \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-st\fR]\fB \fIpath\fB\fR
.RS
Prints status information.
.RE
.br
\fBkcforestmgr set \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR|\fB\-inci\fR|\fB\-incd\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
.RS
Stores a record.
.RE
.br
\fBkcforestmgr remove \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Removes a record.
.RE
.br
\fBkcforestmgr get \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Prints the value of a record.
.RE
.br
\fBkcforestmgr list \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-des\fR]\fB \fR[\fB\-max \fInum\fB\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fR[\fB\fIkey\fB\fR]\fB\fR
.RS
Prints keys of all records, separated by line feeds.
.RE
.br
\fBkcforestmgr clear \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Removes all records of a database.
.RE
.br
\fBkcforestmgr import \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Imports records from a TSV file.
.RE
.br
\fBkcforestmgr copy \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIfile\fB\fR
.RS
Copies the whole database.
.RE
.br
\fBkcforestmgr dump \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Dumps records into a snapshot file.
.RE
.br
\fBkcforestmgr load \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Loads records from a snapshot file.
.RE
.br
\fBkcforestmgr setbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB ...\fR
.RS
Store records at once.
.RE
.br
\fBkcforestmgr removebulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Remove records at once.
.RE
.br
\fBkcforestmgr getbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Retrieve records at once.
.RE
.br
\fBkcforestmgr check \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Checks consistency.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-otr\fR : opens the database with the truncation option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-psiz \fInum\fR\fR : specifies the size of each page.
.br
\fB\-rcd\fR : use the decimal comparator instead of the lexical one.
.br
\fB\-rcld\fR : use the lexical descending comparator instead of the ascending one.
.br
\fB\-rcdd\fR : use the decimal descending comparator instead of the lexical one.
.br
\fB\-st\fR : prints miscellaneous information.
.br
\fB\-add\fR : performs adding operation.
.br
\fB\-app\fR : performs appending operation.
.br
\fB\-rep\fR : performs replacing operation.
.br
\fB\-inci\fR : performs integer increment operation.
.br
\fB\-incd\fR : performs real number increment operation.
.br
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
.br
\fB\-rm\fR : removes the record.
.br
\fB\-px\fR : the output data is converted into a hexadecimal data string.
.br
\fB\-pz\fR : does not append line feed at the end of the output.
.br
\fB\-des\fR : visits records in descending order.
.br
\fB\-max \fInum\fR\fR : specifies the maximum number of shown records.
.br
\fB\-pv\fR : prints values of records also.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcforesttest (1)
kyotocabinet-1.2.79/man/kccachetest.1 0000644 0001750 0001750 00000004260 11757416060 016436 0 ustar mikio mikio .TH "KCCACHETEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kccachetest \- command line interface to test the cache hash database
.SH DESCRIPTION
.PP
The command `\fBkccachetest\fR' is a utility for facility test and performance test of the cache hash database. This command is used in the following format. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkccachetest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-capcnt \fInum\fB\fR]\fB \fR[\fB\-capsiz \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkccachetest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-capcnt \fInum\fB\fR]\fB \fR[\fB\-capsiz \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkccachetest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-capcnt \fInum\fB\fR]\fB \fR[\fB\-capsiz \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkccachetest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-capcnt \fInum\fB\fR]\fB \fR[\fB\-capsiz \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-capcnt \fInum\fR\fR : specifies the maximum number of records.
.br
\fB\-capsiz \fInum\fR\fR : specifies the maximum size of memory usage.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
.RE
.PP
This command returns 0 on success, another on failure.
kyotocabinet-1.2.79/man/kchashtest.1 0000644 0001750 0001750 00000007652 11757416060 016326 0 ustar mikio mikio .TH "KCHASHTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kchashtest \- command line interface to test the file hash database
.SH DESCRIPTION
.PP
The command `\fBkchashtest\fR' is a utility for facility test and performance test of the file hash database. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkchashtest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-set\fR|\fB\-get\fR|\fB\-getw\fR|\fB\-rem\fR|\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkchashtest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkchashtest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkchashtest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-hard\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-set\fR : performs setting operation only.
.br
\fB\-get\fR : performs getting operation only.
.br
\fB\-getw\fR : performs getting with a buffer operation only.
.br
\fB\-rem\fR : performs removing operation only.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-oat\fR : opens the database with the auto transaction option.
.br
\fB\-oas\fR : opens the database with the auto synchronization option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-apow \fInum\fR\fR : specifies the power of the alignment of record size.
.br
\fB\-fpow \fInum\fR\fR : specifies the power of the capacity of the free block pool.
.br
\fB\-ts\fR : tunes the database with the small option.
.br
\fB\-tl\fR : tunes the database with the linear option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-msiz \fInum\fR\fR : specifies the size of the memory\-mapped region.
.br
\fB\-dfunit \fInum\fR\fR : specifies the unit step number of auto defragmentation.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
\fB\-hard\fR : performs physical synchronization.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kchashmgr (1)
kyotocabinet-1.2.79/man/kclangctest.1 0000644 0001750 0001750 00000003474 11757416060 016465 0 ustar mikio mikio .TH "KCLANGCTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kclangctest \- command line interface to test the C language binding
.SH DESCRIPTION
.PP
The command `\fBkclangctest\fR' is a utility for facility test and performance test of the C language binding. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkclangctest order \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkclangctest index \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs indexing operations.
.RE
.br
\fBkclangctest map \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of memory\-saving hash map.
.RE
.br
\fBkclangctest list \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fIrnum\fB\fR
.RS
Performs test of memory\-saving array list.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-rnd\fR : performs random test.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-oat\fR : opens the database with the auto transaction option.
.br
\fB\-oas\fR : opens the database with the auto synchronization option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcpolymgr (1),
.BR kcpolytest (1)
kyotocabinet-1.2.79/man/kctreetest.1 0000644 0001750 0001750 00000011336 11757416060 016334 0 ustar mikio mikio .TH "KCTREETEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kctreetest \- command line interface to test the file tree database
.SH DESCRIPTION
.PP
The command `\fBkctreetest\fR' is a utility for facility test and performance test of the file tree database. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkctreetest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-set\fR|\fB\-get\fR|\fB\-getw\fR|\fB\-rem\fR|\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkctreetest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkctreetest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkctreetest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-hard\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fR[\fB\-dfunit \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-set\fR : performs setting operation only.
.br
\fB\-get\fR : performs getting operation only.
.br
\fB\-getw\fR : performs getting with a buffer operation only.
.br
\fB\-rem\fR : performs removing operation only.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-oat\fR : opens the database with the auto transaction option.
.br
\fB\-oas\fR : opens the database with the auto synchronization option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-apow \fInum\fR\fR : specifies the power of the alignment of record size.
.br
\fB\-fpow \fInum\fR\fR : specifies the power of the capacity of the free block pool.
.br
\fB\-ts\fR : tunes the database with the small option.
.br
\fB\-tl\fR : tunes the database with the linear option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-psiz \fInum\fR\fR : specifies the size of each page.
.br
\fB\-msiz \fInum\fR\fR : specifies the size of the memory\-mapped region.
.br
\fB\-dfunit \fInum\fR\fR : specifies the unit step number of auto defragmentation.
.br
\fB\-pccap \fInum\fR\fR : specifies the capacity size of the page cache.
.br
\fB\-rcd\fR : use the decimal comparator instead of the lexical one.
.br
\fB\-rcld\fR : use the lexical descending comparator instead of the ascending one.
.br
\fB\-rcdd\fR : use the decimal descending comparator instead of the lexical one.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
\fB\-hard\fR : performs physical synchronization.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kctreemgr (1)
kyotocabinet-1.2.79/man/kcpolymgr.1 0000644 0001750 0001750 00000010714 11757416060 016165 0 ustar mikio mikio .TH "KCPOLYMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcpolymgr \- command line interface to manage the polymorphic database
.SH DESCRIPTION
.PP
The command `\fBkcpolymgr\fR' is a utility for test and debugging of the polymorphic database and its applications. `\fIpath\fR' specifies the path of a database file. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIfile\fR' specifies the input/output file. `\fIsrc\fR' specifies other database files.
.PP
.RS
.br
\fBkcpolymgr create \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Creates a database file.
.RE
.br
\fBkcpolymgr inform \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-st\fR]\fB \fIpath\fB\fR
.RS
Prints status information.
.RE
.br
\fBkcpolymgr set \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR|\fB\-inci\fR|\fB\-incd\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
.RS
Stores a record.
.RE
.br
\fBkcpolymgr remove \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Removes a record.
.RE
.br
\fBkcpolymgr get \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Prints the value of a record.
.RE
.br
\fBkcpolymgr list \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-mp\fR|\fB\-mr\fR|\fB\-ms\fR]\fB \fR[\fB\-des\fR]\fB \fR[\fB\-max \fInum\fB\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fR[\fB\fIkey\fB\fR]\fB\fR
.RS
Prints keys of all records, separated by line feeds.
.RE
.br
\fBkcpolymgr clear \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Removes all records of a database.
.RE
.br
\fBkcpolymgr import \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Imports records from a TSV file.
.RE
.br
\fBkcpolymgr copy \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIfile\fB\fR
.RS
Copies the whole database.
.RE
.br
\fBkcpolymgr dump \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Dumps records into a snapshot file.
.RE
.br
\fBkcpolymgr load \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Loads records from a snapshot file.
.RE
.br
\fBkcpolymgr merge \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR]\fB \fIpath\fB \fIsrc\fB...\fR
.RS
Merge records from other databases.
.RE
.br
\fBkcpolymgr setbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB ...\fR
.RS
Store records at once.
.RE
.br
\fBkcpolymgr removebulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Remove records at once.
.RE
.br
\fBkcpolymgr getbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Retrieve records at once.
.RE
.br
\fBkcpolymgr check \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Checks consistency.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-otr\fR : opens the database with the truncation option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-st\fR : prints miscellaneous information.
.br
\fB\-add\fR : performs adding operation.
.br
\fB\-app\fR : performs appending operation.
.br
\fB\-rep\fR : performs replacing operation.
.br
\fB\-inci\fR : performs integer increment operation.
.br
\fB\-incd\fR : performs real number increment operation.
.br
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
.br
\fB\-rm\fR : removes the record.
.br
\fB\-px\fR : the output data is converted into a hexadecimal data string.
.br
\fB\-pz\fR : performs not append line feed at the end of the output.
.br
\fB\-mp\fR : performs prefix matching instead of usual scan.
.br
\fB\-mr\fR : performs regular expression matching instead of usual scan.
.br
\fB\-ms\fR : performs similar matching instead of usual scan.
.br
\fB\-des\fR : visits records in descending order.
.br
\fB\-max \fInum\fR\fR : specifies the maximum number of shown records.
.br
\fB\-pv\fR : prints values of records also.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcpolytest (1),
.BR kclangctest (1)
kyotocabinet-1.2.79/man/kchashmgr.1 0000644 0001750 0001750 00000011106 11757416060 016121 0 ustar mikio mikio .TH "KCHASHMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kchashmgr \- command line interface to manage the file hash database
.SH DESCRIPTION
.PP
The command `\fBkchashmgr\fR' is a utility for test and debugging of the file hash database and its applications. `\fIpath\fR' specifies the path of a database file. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIfile\fR' specifies the input/output file.
.PP
.RS
.br
\fBkchashmgr create \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fIpath\fB\fR
.RS
Creates a database file.
.RE
.br
\fBkchashmgr inform \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-st\fR]\fB \fIpath\fB\fR
.RS
Prints status information.
.RE
.br
\fBkchashmgr set \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR|\fB\-inci\fR|\fB\-incd\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
.RS
Stores a record.
.RE
.br
\fBkchashmgr remove \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Removes a record.
.RE
.br
\fBkchashmgr get \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Prints the value of a record.
.RE
.br
\fBkchashmgr list \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-max \fInum\fB\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fR[\fB\fIkey\fB\fR]\fB\fR
.RS
Prints keys of all records, separated by line feeds.
.RE
.br
\fBkchashmgr clear \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Removes all records of a database.
.RE
.br
\fBkchashmgr import \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Imports records from a TSV file.
.RE
.br
\fBkchashmgr copy \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIfile\fB\fR
.RS
Copies the whole database.
.RE
.br
\fBkchashmgr dump \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Dumps records into a snapshot file.
.RE
.br
\fBkchashmgr load \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Loads records from a snapshot file.
.RE
.br
\fBkchashmgr defrag \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Performs defragmentation.
.RE
.br
\fBkchashmgr setbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB ...\fR
.RS
Store records at once.
.RE
.br
\fBkchashmgr removebulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Remove records at once.
.RE
.br
\fBkchashmgr getbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Retrieve records at once.
.RE
.br
\fBkchashmgr check \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Checks consistency.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-otr\fR : opens the database with the truncation option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-apow \fInum\fR\fR : specifies the power of the alignment of record size.
.br
\fB\-fpow \fInum\fR\fR : specifies the power of the capacity of the free block pool.
.br
\fB\-ts\fR : tunes the database with the small option.
.br
\fB\-tl\fR : tunes the database with the linear option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-st\fR : prints miscellaneous information.
.br
\fB\-add\fR : performs adding operation.
.br
\fB\-app\fR : performs appending operation.
.br
\fB\-rep\fR : performs replacing operation.
.br
\fB\-inci\fR : performs integer increment operation.
.br
\fB\-incd\fR : performs real number increment operation.
.br
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
.br
\fB\-rm\fR : removes the record.
.br
\fB\-px\fR : the output data is converted into a hexadecimal data string.
.br
\fB\-pz\fR : does not append line feed at the end of the output.
.br
\fB\-max \fInum\fR\fR : specifies the maximum number of shown records.
.br
\fB\-pv\fR : prints values of records also.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kchashtest (1)
kyotocabinet-1.2.79/man/kcutiltest.1 0000644 0001750 0001750 00000003701 11757416060 016347 0 ustar mikio mikio .TH "KCUTILTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcutiltest \- command line interface to test the utility functions
.SH DESCRIPTION
.PP
The command `\fBkcutiltest\fR' is a utility for facility test and performance test of the utility functions. This command is used in the following format. `\fIrnum\fR' specifies the number of iterations. `\fIpath\fR' specifies the path of a file.
.PP
.RS
.br
\fBkcutiltest mutex \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-iv \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of lock primitives.
.RE
.br
\fBkcutiltest cond \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-iv \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of condition variable primitives.
.RE
.br
\fBkcutiltest para \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-iv \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of parallel processing.
.RE
.br
\fBkcutiltest file \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-msiz \fInum\fB\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs test of the file system abstraction.
.RE
.br
\fBkcutiltest lhmap \fR[\fB\-rnd\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of doubly\-linked hash map.
.RE
.br
\fBkcutiltest thmap \fR[\fB\-rnd\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of memory\-saving hash map.
.RE
.br
\fBkcutiltest talist \fR[\fB\-rnd\fR]\fB \fIrnum\fB\fR
.RS
Performs test of memory\-saving array list.
.RE
.br
\fBkcutiltest misc \fIrnum\fB\fR
.RS
Performs test of miscellaneous mechanisms.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-iv \fInum\fR\fR : specifies the interval between iterations.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-msiz \fInum\fR\fR : specifies the size of the memory\-mapped region.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcutilmgr (1)
kyotocabinet-1.2.79/man/kcutilmgr.1 0000644 0001750 0001750 00000005335 11757416060 016162 0 ustar mikio mikio .TH "KCUTILMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcutilmgr \- command line interface of miscellaneous utilities
.SH DESCRIPTION
.PP
.PP
The command `\fBkcutilmgr\fR' is a tool of miscellaneous utilities, and to show the configuration. This command is used in the following format. `\fIfile\fR' specifies a input file. If it is omitted, the standard input is read. If it begins with "@", the trailing substring is treated as the input. `\fIpattern\fR' specifies an matching pattern.
.PP
.RS
.br
\fBkcutilmgr hex \fR[\fB\-d\fR]\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Performs hexadecimal encoding and its decoding.
.RE
.br
\fBkcutilmgr enc \fR[\fB\-hex\fR|\fB\-url\fR|\fB\-quote\fR]\fB \fR[\fB\-d\fR]\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Performs Base64 encoding and its decoding.
.RE
.br
\fBkcutilmgr ciph \fR[\fB\-key \fIstr\fB\fR]\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Performs Arcfour cipher and its decipher.
.RE
.br
\fBkcutilmgr comp \fR[\fB\-def\fR|\fB\-gz\fR|\fB\-lzo\fR|\fB\-lzma\fR]\fB \fR[\fB\-d\fR]\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Performs ZLIB encoding and its decoding. By default, use the raw format.
.RE
.br
\fBkcutilmgr hash \fR[\fB\-fnv\fR|\fB\-path\fR|\fB\-crc\fR]\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Calculates the hash value. By default, use MurMur hashing.
.RE
.br
\fBkcutilmgr regex \fR[\fB\-alt \fIstr\fB\fR]\fB \fR[\fB\-ic\fR]\fB \fIpattern\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Prints lines matching a regular expression.
.RE
.br
\fBkcutilmgr conf \fR[\fB\-v\fR|\fB\-i\fR|\fB\-l\fR|\fB\-p\fR]\fB\fR
.RS
Shows the configuration of Kyoto Cabinet.
.RE
.br
\fBkcutilmgr version\fR
.RS
Shows the version information of Kyoto Cabinet.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-d\fR : perform decoding (unescaping), not encoding (escaping).
.br
\fB\-hex\fR : use hexadecimal encoding.
.br
\fB\-url\fR : use URL encoding.
.br
\fB\-quote\fR : use Quoted\-printable encoding.
.br
\fB\-key \fIstr\fR\fR : set the cipher key.
.br
\fB\-def\fR : use the deflate format.
.br
\fB\-gz\fR : use the gzip format.
.br
\fB\-lzo\fR : use LZO encoding.
.br
\fB\-lzma\fR : use LZMA encoding.
.br
\fB\-fnv\fR : use FNV hashing.
.br
\fB\-path\fR : use the path hashing of the directory database.
.br
\fB\-crc\fR : calculate the CRC32 checksum.
.br
\fB\-alt \fIstr\fR\fR : replaces matching substring with the alternative string.
.br
\fB\-ic\fR : ignores difference between upper and lower cases.
.br
\fB\-v\fR : show the version number of Kyoto Cabinet.
.br
\fB\-i\fR : show options to include the headers of Tokyo Cabinet.
.br
\fB\-l\fR : show options to link the library of Tokyo Cabinet.
.br
\fB\-p\fR : show the directory path of the commands.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcutiltest (1)
kyotocabinet-1.2.79/man/kcpolytest.1 0000644 0001750 0001750 00000007713 11757416060 016364 0 ustar mikio mikio .TH "KCPOLYTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcpolytest \- command line interface to test the polymorphic database
.SH DESCRIPTION
.PP
The command `\fBkcpolytest\fR' is a utility for facility test and performance test of the polymorphic database. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkcpolytest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-set\fR|\fB\-get\fR|\fB\-getw\fR|\fB\-rem\fR|\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkcpolytest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkcpolytest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkcpolytest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-hard\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.br
\fBkcpolytest mapred \fR[\fB\-rnd\fR]\fB \fR[\fB\-ru\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-lv\fR]\fB \fR[\fB\-tmp \fIstr\fB\fR]\fB \fR[\fB\-dbnum \fInum\fB\fR]\fB \fR[\fB\-clim \fInum\fB\fR]\fB \fR[\fB\-cbnum \fInum\fB\fR]\fB \fR[\fB\-xnl\fR]\fB \fR[\fB\-xpm\fR]\fB \fR[\fB\-xpr\fR]\fB \fR[\fB\-xpf\fR]\fB \fR[\fB\-xnc\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs MapReduce operations.
.RE
.br
\fBkcpolytest index \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-set\fR|\fB\-get\fR|\fB\-rem\fR|\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs indexing operations.
.RE
.br
\fBkcpolytest misc \fIpath\fB\fR
.RS
Performs miscellaneous tests.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-set\fR : performs setting operation only.
.br
\fB\-get\fR : performs getting operation only.
.br
\fB\-getw\fR : performs getting with a buffer operation only.
.br
\fB\-rem\fR : performs removing operation only.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-oat\fR : opens the database with the auto transaction option.
.br
\fB\-oas\fR : opens the database with the auto synchronization option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
\fB\-hard\fR : performs physical synchronization.
.br
\fB\-ru\fR : reuses the existing database.
.br
\fB\-tmp \fIstr\fR\fR : specifies the path of a directory for temporary storage.
.br
\fB\-dbnum \fInum\fR\fR : specifies the number of temporary databases.
.br
\fB\-clim \fInum\fR\fR : specifies the limit size of cache memory.
.br
\fB\-cbnum \fInum\fR\fR : specifies the bucket number of cache memory.
.br
\fB\-xnl\fR : executes with the no locking option.
.br
\fB\-xpm\fR : executes with the parallel mapper option.
.br
\fB\-xpr\fR : executes with the parallel reducer option.
.br
\fB\-xpf\fR : executes with the parallel flusher option.
.br
\fB\-xnc\fR : executes with the no compression option.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcpolymgr (1),
.BR kclangctest (1)
kyotocabinet-1.2.79/man/kctreemgr.1 0000644 0001750 0001750 00000012020 11757416060 016131 0 ustar mikio mikio .TH "KCTREEMGR" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kctreemgr \- command line interface to manage the file tree database
.SH DESCRIPTION
.PP
The command `\fBkctreemgr\fR' is a utility for test and debugging of the file tree database and its applications. `\fIpath\fR' specifies the path of a database file. `\fIkey\fR' specifies the key of a record. `\fIvalue\fR' specifies the value of a record. `\fIfile\fR' specifies the input/output file.
.PP
.RS
.br
\fBkctreemgr create \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-apow \fInum\fB\fR]\fB \fR[\fB\-fpow \fInum\fB\fR]\fB \fR[\fB\-ts\fR]\fB \fR[\fB\-tl\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fIpath\fB\fR
.RS
Creates a database file.
.RE
.br
\fBkctreemgr inform \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-st\fR]\fB \fIpath\fB\fR
.RS
Prints status information.
.RE
.br
\fBkctreemgr set \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-add\fR|\fB\-app\fR|\fB\-rep\fR|\fB\-inci\fR|\fB\-incd\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB\fR
.RS
Stores a record.
.RE
.br
\fBkctreemgr remove \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Removes a record.
.RE
.br
\fBkctreemgr get \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fR[\fB\-pz\fR]\fB \fIpath\fB \fIkey\fB\fR
.RS
Prints the value of a record.
.RE
.br
\fBkctreemgr list \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-des\fR]\fB \fR[\fB\-max \fInum\fB\fR]\fB \fR[\fB\-rm\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-pv\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fR[\fB\fIkey\fB\fR]\fB\fR
.RS
Prints keys of all records, separated by line feeds.
.RE
.br
\fBkctreemgr clear \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Removes all records of a database.
.RE
.br
\fBkctreemgr import \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Imports records from a TSV file.
.RE
.br
\fBkctreemgr copy \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIfile\fB\fR
.RS
Copies the whole database.
.RE
.br
\fBkctreemgr dump \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Dumps records into a snapshot file.
.RE
.br
\fBkctreemgr load \fR[\fB\-otr\fR]\fB \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fR[\fB\fIfile\fB\fR]\fB\fR
.RS
Loads records from a snapshot file.
.RE
.br
\fBkctreemgr defrag \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Performs defragmentation.
.RE
.br
\fBkctreemgr setbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB \fIkey\fB \fIvalue\fB ...\fR
.RS
Store records at once.
.RE
.br
\fBkctreemgr removebulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Remove records at once.
.RE
.br
\fBkctreemgr getbulk \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-sx\fR]\fB \fR[\fB\-px\fR]\fB \fIpath\fB \fIkey\fB ...\fR
.RS
Retrieve records at once.
.RE
.br
\fBkctreemgr check \fR[\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fIpath\fB\fR
.RS
Checks consistency.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-otr\fR : opens the database with the truncation option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-apow \fInum\fR\fR : specifies the power of the alignment of record size.
.br
\fB\-fpow \fInum\fR\fR : specifies the power of the capacity of the free block pool.
.br
\fB\-ts\fR : tunes the database with the small option.
.br
\fB\-tl\fR : tunes the database with the linear option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-psiz \fInum\fR\fR : specifies the size of each page.
.br
\fB\-rcd\fR : use the decimal comparator instead of the lexical one.
.br
\fB\-rcld\fR : use the lexical descending comparator instead of the ascending one.
.br
\fB\-rcdd\fR : use the decimal descending comparator instead of the lexical one.
.br
\fB\-st\fR : prints miscellaneous information.
.br
\fB\-add\fR : performs adding operation.
.br
\fB\-app\fR : performs appending operation.
.br
\fB\-rep\fR : performs replacing operation.
.br
\fB\-inci\fR : performs integer increment operation.
.br
\fB\-incd\fR : performs real number increment operation.
.br
\fB\-sx\fR : the input data is evaluated as a hexadecimal data string.
.br
\fB\-rm\fR : removes the record.
.br
\fB\-px\fR : the output data is converted into a hexadecimal data string.
.br
\fB\-pz\fR : does not append line feed at the end of the output.
.br
\fB\-des\fR : visits records in descending order.
.br
\fB\-max \fInum\fR\fR : specifies the maximum number of shown records.
.br
\fB\-pv\fR : prints values of records also.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kctreetest (1)
kyotocabinet-1.2.79/man/kcdirtest.1 0000644 0001750 0001750 00000005211 11757416060 016146 0 ustar mikio mikio .TH "KCDIRTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcdirtest \- command line interface to test the directory hash database
.SH DESCRIPTION
.PP
The command `\fBkcdirtest\fR' is a utility for facility test and performance test of the directory hash database. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkcdirtest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-set\fR|\fB\-get\fR|\fB\-getw\fR|\fB\-rem\fR|\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkcdirtest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkcdirtest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkcdirtest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-hard\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-set\fR : performs setting operation only.
.br
\fB\-get\fR : performs getting operation only.
.br
\fB\-getw\fR : performs getting with a buffer operation only.
.br
\fB\-rem\fR : performs removing operation only.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-oat\fR : opens the database with the auto transaction option.
.br
\fB\-oas\fR : opens the database with the auto synchronization option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
\fB\-hard\fR : performs physical synchronization.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcdirmgr (1)
kyotocabinet-1.2.79/man/htmltoman 0000755 0001750 0001750 00000004360 11523256007 016017 0 ustar mikio mikio #! /usr/bin/awk -f
function strip(text){
gsub("^ *<[a-zA-Z0-9]*[^>]*>", "", text)
gsub("[a-zA-Z0-9]*> *$", "", text)
return text
}
function unescape(text){
gsub("<", "<", text)
gsub(">", ">", text)
gsub(""", "\"", text)
gsub("&", "\\&", text)
gsub("-", "\\-", text)
return text
}
BEGIN {
date = strftime("%Y-%m-%d")
printf(".TH \"%s\" %d \"%s\" \"%s\" \"%s\"\n\n", "INTRO", 3, date, "Man Page", "Kyoto Cabinet")
}
/ *]*>.*<\/h[1-3]> *$/ {
text = $0
text = strip(text)
text = unescape(text)
text = toupper(text)
printf("\n")
printf(".SH %s\n", text)
}
/ *
]*>.*<\/p> *$/ {
text = $0
text = strip(text)
text = gensub("]*>([^<]*)", "\\\\fB\\1\\\\fR", "g", text)
text = gensub("]*>([^<]*)", "\\\\fI\\1\\\\fR", "g", text)
gsub("<[^>]*>", "", text)
text = unescape(text)
printf(".PP\n")
printf("%s\n", text)
}
/ *
]*>.*<\/li> *$/ {
text = $0
text = strip(text)
text = gensub("]*>(.*)", "\\\\fB\\1\\\\fR", "g", text)
text = gensub("]*>([^<]*)", "\\\\fI\\1\\\\fR", "g", text)
gsub("<[^>]*>", "", text)
text = unescape(text)
printf("%s\n", text)
printf(".br\n")
}
END {
printf("\n")
printf(".SH SEE ALSO\n")
printf(".PP\n")
printf(".BR kcutilmgr (1),\n")
printf(".BR kcutiltest (1)\n")
printf(".PP\n")
printf("Please see\n")
printf(".I http://fallabs.com/kyotocabinet/\n")
printf("for detail.\n")
}
kyotocabinet-1.2.79/man/kcstashtest.1 0000644 0001750 0001750 00000003176 11757416060 016522 0 ustar mikio mikio .TH "KCSTASHTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcstashtest \- command line interface to test the stash database
.SH DESCRIPTION
.PP
The command `\fBkcstashtest\fR' is a utility for facility test and performance test of the stash database. This command is used in the following format. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkccachetest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkccachetest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkccachetest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkccachetest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
.RE
.PP
This command returns 0 on success, another on failure.
kyotocabinet-1.2.79/man/kcgrasstest.1 0000644 0001750 0001750 00000005111 11757416060 016506 0 ustar mikio mikio .TH "KCGRASSTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcgrasstest \- command line interface to test the cache tree database
.SH DESCRIPTION
.PP
The command `\fBkcgrasstest\fR' is a utility for facility test and performance test of the cache tree database. This command is used in the following format. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkcgrasstest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkcgrasstest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkcgrasstest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkcgrasstest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-psiz \fInum\fR\fR : specifies the size of each page.
.br
\fB\-pccap \fInum\fR\fR : specifies the capacity size of the page cache.
.br
\fB\-rcd\fR : use the decimal comparator instead of the lexical one.
.br
\fB\-rcld\fR : use the lexical descending comparator instead of the ascending one.
.br
\fB\-rcdd\fR : use the decimal descending comparator instead of the lexical one.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
.RE
.PP
This command returns 0 on success, another on failure.
kyotocabinet-1.2.79/man/kcforesttest.1 0000644 0001750 0001750 00000007241 11757416060 016677 0 ustar mikio mikio .TH "KCFORESTTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcforesttest \- command line interface to test the directory tree database
.SH DESCRIPTION
.PP
The command `\fBkcforesttest\fR' is a utility for facility test and performance test of the directory tree database. This command is used in the following format. `\fIpath\fR' specifies the path of a database file. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkcforesttest order \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-set\fR|\fB\-get\fR|\fB\-getw\fR|\fB\-rem\fR|\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkcforesttest queue \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkcforesttest wicked \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkcforesttest tran \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-hard\fR]\fB \fR[\fB\-oat\fR|\fB\-onl\fR|\fB\-onl\fR|\fB\-otl\fR|\fB\-onr\fR]\fB \fR[\fB\-tc\fR]\fB \fR[\fB\-bnum \fInum\fB\fR]\fB \fR[\fB\-psiz \fInum\fB\fR]\fB \fR[\fB\-pccap \fInum\fB\fR]\fB \fR[\fB\-rcd\fR|\fB\-rcld\fR|\fB\-rcdd\fR]\fB \fR[\fB\-lv\fR]\fB \fIpath\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-set\fR : performs setting operation only.
.br
\fB\-get\fR : performs getting operation only.
.br
\fB\-getw\fR : performs getting with a buffer operation only.
.br
\fB\-rem\fR : performs removing operation only.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-oat\fR : opens the database with the auto transaction option.
.br
\fB\-oas\fR : opens the database with the auto synchronization option.
.br
\fB\-onl\fR : opens the database with the no locking option.
.br
\fB\-otl\fR : opens the database with the try locking option.
.br
\fB\-onr\fR : opens the database with the no auto repair option.
.br
\fB\-tc\fR : tunes the database with the compression option.
.br
\fB\-bnum \fInum\fR\fR : specifies the number of buckets of the hash table.
.br
\fB\-psiz \fInum\fR\fR : specifies the size of each page.
.br
\fB\-pccap \fInum\fR\fR : specifies the capacity size of the page cache.
.br
\fB\-rcd\fR : use the decimal comparator instead of the lexical one.
.br
\fB\-rcld\fR : use the lexical descending comparator instead of the ascending one.
.br
\fB\-rcdd\fR : use the decimal descending comparator instead of the lexical one.
.br
\fB\-lv\fR : reports all errors.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
\fB\-hard\fR : performs physical synchronization.
.br
.RE
.PP
This command returns 0 on success, another on failure.
.SH SEE ALSO
.PP
.BR kcforestmgr (1)
kyotocabinet-1.2.79/man/kcprototest.1 0000644 0001750 0001750 00000002771 11757416060 016543 0 ustar mikio mikio .TH "KCPROTOTEST" 1 "2012-05-24" "Man Page" "Kyoto Cabinet"
.SH NAME
kcprototest \- command line interface to test the prototype database
.SH DESCRIPTION
.PP
The command `\fBkcprototest\fR' is a utility for facility test and performance test of the prototype database. This command is used in the following format. `\fIrnum\fR' specifies the number of iterations.
.PP
.RS
.br
\fBkcprototest order \fR[\fB\-tree\fR]\fB \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fR[\fB\-etc\fR]\fB \fR[\fB\-tran\fR]\fB \fIrnum\fB\fR
.RS
Performs in\-order tests.
.RE
.br
\fBkcprototest queue \fR[\fB\-tree\fR]\fB \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fR[\fB\-rnd\fR]\fB \fIrnum\fB\fR
.RS
Performs queuing operations.
.RE
.br
\fBkcprototest wicked \fR[\fB\-tree\fR]\fB \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs mixed operations selected at random.
.RE
.br
\fBkcprototest tran \fR[\fB\-tree\fR]\fB \fR[\fB\-th \fInum\fB\fR]\fB \fR[\fB\-it \fInum\fB\fR]\fB \fIrnum\fB\fR
.RS
Performs test of transaction.
.RE
.RE
.PP
Options feature the following.
.PP
.RS
\fB\-tree\fR : test the prototype tree database instead of the prototype hash database.
.br
\fB\-th \fInum\fR\fR : specifies the number of worker threads.
.br
\fB\-rnd\fR : performs random test.
.br
\fB\-etc\fR : performs miscellaneous operations.
.br
\fB\-tran\fR : performs transaction.
.br
\fB\-it \fInum\fR\fR : specifies the number of repetition.
.br
.RE
.PP
This command returns 0 on success, another on failure.
kyotocabinet-1.2.79/example/ 0000755 0001750 0001750 00000000000 11757416060 014751 5 ustar mikio mikio kyotocabinet-1.2.79/example/kcmrex.cc 0000644 0001750 0001750 00000002705 11757416060 016555 0 ustar mikio mikio #include
#include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
PolyDB db;
// open the database
if (!db.open()) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
db.set("1", "this is a pen");
db.set("2", "what a beautiful pen this is");
db.set("3", "she is beautiful");
// define the mapper and the reducer
class MapReduceImpl : public MapReduce {
// call back function of the mapper
bool map(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) {
vector words;
strsplit(string(vbuf, vsiz), ' ', &words);
for (vector::iterator it = words.begin();
it != words.end(); it++) {
emit(it->data(), it->size(), "", 0);
}
return true;
}
// call back function of the reducer
bool reduce(const char* kbuf, size_t ksiz, ValueIterator* iter) {
size_t count = 0;
const char* vbuf;
size_t vsiz;
while ((vbuf = iter->next(&vsiz)) != NULL) {
count++;
}
cout << string(kbuf, ksiz) << ": " << count << endl;
return true;
}
} mr;
// execute the MapReduce process
if (!mr.execute(&db)) {
cerr << "MapReduce error: " << db.error().name() << endl;
}
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kchashex.cc 0000644 0001750 0001750 00000001734 11757416060 017063 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
HashDB db;
// open the database
if (!db.open("casket.kch", HashDB::OWRITER | HashDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kctreeex.cc 0000644 0001750 0001750 00000001734 11757416060 017077 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
TreeDB db;
// open the database
if (!db.open("casket.kct", TreeDB::OWRITER | TreeDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kcpolyex.cc 0000644 0001750 0001750 00000001734 11757416060 017123 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
PolyDB db;
// open the database
if (!db.open("casket.kch", PolyDB::OWRITER | PolyDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kcvisex.cc 0000644 0001750 0001750 00000002455 11757416060 016742 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
PolyDB db;
// open the database
if (!db.open("casket.kch", PolyDB::OREADER)) {
cerr << "open error: " << db.error().name() << endl;
}
// define the visitor
class VisitorImpl : public DB::Visitor {
// call back function for an existing record
const char* visit_full(const char* kbuf, size_t ksiz,
const char* vbuf, size_t vsiz, size_t *sp) {
cout << string(kbuf, ksiz) << ":" << string(vbuf, vsiz) << endl;
return NOP;
}
// call back function for an empty record space
const char* visit_empty(const char* kbuf, size_t ksiz, size_t *sp) {
cerr << string(kbuf, ksiz) << " is missing" << endl;
return NOP;
}
} visitor;
// retrieve a record with visitor
if (!db.accept("foo", 3, &visitor, false) ||
!db.accept("dummy", 5, &visitor, false)) {
cerr << "accept error: " << db.error().name() << endl;
}
// traverse records with visitor
if (!db.iterate(&visitor, false)) {
cerr << "iterate error: " << db.error().name() << endl;
}
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kclangcex.c 0000644 0001750 0001750 00000004125 11757416060 017056 0 ustar mikio mikio #include
/* call back function for an existing record */
const char* visitfull(const char* kbuf, size_t ksiz,
const char* vbuf, size_t vsiz, size_t *sp, void* opq) {
fwrite(kbuf, 1, ksiz, stdout);
printf(":");
fwrite(vbuf, 1, vsiz, stdout);
printf("\n");
return KCVISNOP;
}
/* call back function for an empty record space */
const char* visitempty(const char* kbuf, size_t ksiz, size_t *sp, void* opq) {
fwrite(kbuf, 1, ksiz, stdout);
printf(" is missing\n");
return KCVISNOP;
}
/* main routine */
int main(int argc, char** argv) {
KCDB* db;
KCCUR* cur;
char *kbuf, *vbuf;
size_t ksiz, vsiz;
const char *cvbuf;
/* create the database object */
db = kcdbnew();
/* open the database */
if (!kcdbopen(db, "casket.kch", KCOWRITER | KCOCREATE)) {
fprintf(stderr, "open error: %s\n", kcecodename(kcdbecode(db)));
}
/* store records */
if (!kcdbset(db, "foo", 3, "hop", 3) ||
!kcdbset(db, "bar", 3, "step", 4) ||
!kcdbset(db, "baz", 3, "jump", 4)) {
fprintf(stderr, "set error: %s\n", kcecodename(kcdbecode(db)));
}
/* retrieve a record */
vbuf = kcdbget(db, "foo", 3, &vsiz);
if (vbuf) {
printf("%s\n", vbuf);
kcfree(vbuf);
} else {
fprintf(stderr, "get error: %s\n", kcecodename(kcdbecode(db)));
}
/* traverse records */
cur = kcdbcursor(db);
kccurjump(cur);
while ((kbuf = kccurget(cur, &ksiz, &cvbuf, &vsiz, 1)) != NULL) {
printf("%s:%s\n", kbuf, cvbuf);
kcfree(kbuf);
}
kccurdel(cur);
/* retrieve a record with visitor */
if (!kcdbaccept(db, "foo", 3, visitfull, visitempty, NULL, 0) ||
!kcdbaccept(db, "dummy", 5, visitfull, visitempty, NULL, 0)) {
fprintf(stderr, "accept error: %s\n", kcecodename(kcdbecode(db)));
}
/* traverse records with visitor */
if (!kcdbiterate(db, visitfull, NULL, 0)) {
fprintf(stderr, "iterate error: %s\n", kcecodename(kcdbecode(db)));
}
/* close the database */
if (!kcdbclose(db)) {
fprintf(stderr, "close error: %s\n", kcecodename(kcdbecode(db)));
}
/* delete the database object */
kcdbdel(db);
return 0;
}
kyotocabinet-1.2.79/example/kcprotoex.cc 0000644 0001750 0001750 00000001743 11757416060 017303 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
ProtoHashDB db;
// open the database
if (!db.open("-", ProtoHashDB::OWRITER | ProtoHashDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kcdirex.cc 0000644 0001750 0001750 00000001730 11757416060 016712 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
DirDB db;
// open the database
if (!db.open("casket.kcd", DirDB::OWRITER | DirDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kcforestex.cc 0000644 0001750 0001750 00000001741 11757416060 017440 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
ForestDB db;
// open the database
if (!db.open("casket.kcf", ForestDB::OWRITER | ForestDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/kccacheex.cc 0000644 0001750 0001750 00000001727 11757416060 017205 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
CacheDB db;
// open the database
if (!db.open("%", CacheDB::OWRITER | CacheDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/example/Makefile 0000644 0001750 0001750 00000005103 11523256007 016402 0 ustar mikio mikio # Makefile for sample programs of Kyoto Cabinet
#================================================================
# Setting Variables
#================================================================
# Generic settings
SHELL = /bin/sh
# Targets
MYBINS = kcprotoex kccacheex kcgrassex kchashex kctreeex kcdirex kcforestex \
kcpolyex kcvisex kcmrex kclangcex
# Building binaries
CC = gcc
CXX = g++
CFLAGS = -I. -I.. -Wall -ansi -pedantic -fsigned-char -O2
CXXFLAGS = -I. -I.. -Wall -fsigned-char -O2
LDFLAGS =
LIBS = -L. -L.. -lkyotocabinet -lstdc++ -lz -lrt -lpthread -lm -lc
LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:..
RUNENV = LD_LIBRARY_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:.:..
#================================================================
# Suffix rules
#================================================================
.SUFFIXES :
.SUFFIXES : .c .cc .o
.c.o :
$(CC) -c $(CFLAGS) $<
.cc.o :
$(CXX) -c $(CXXFLAGS) $<
#================================================================
# Actions
#================================================================
all : $(MYBINS)
clean :
rm -rf $(MYBINS) *.exe *.o a.out check.out gmon.out leak.log casket* *~
static :
make LDFLAGS="$(LDFLAGS) -static"
check :
rm -rf casket*
$(RUNENV) ./kcprotoex
$(RUNENV) ./kccacheex
$(RUNENV) ./kcgrassex
$(RUNENV) ./kchashex
$(RUNENV) ./kctreeex
$(RUNENV) ./kcdirex
$(RUNENV) ./kcforestex
$(RUNENV) ./kcpolyex
$(RUNENV) ./kcvisex
$(RUNENV) ./kcmrex
$(RUNENV) ./kclangcex
.PHONY : all clean static
#================================================================
# Building binaries
#================================================================
kcprotoex : kcprotoex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kccacheex : kccacheex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kcgrassex : kcgrassex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kchashex : kchashex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kctreeex : kctreeex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kcdirex : kcdirex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kcforestex : kcforestex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kcpolyex : kcpolyex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kcvisex : kcvisex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kcmrex : kcmrex.o
$(LDENV) $(CXX) $(CXXFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
kclangcex : kclangcex.o
$(LDENV) $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LIBS)
# END OF FILE
kyotocabinet-1.2.79/example/kcgrassex.cc 0000644 0001750 0001750 00000001727 11757416060 017261 0 ustar mikio mikio #include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
GrassDB db;
// open the database
if (!db.open("*", GrassDB::OWRITER | GrassDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
kyotocabinet-1.2.79/FOSSEXCEPTION 0000644 0001750 0001750 00000007132 11542023436 015266 0 ustar mikio mikio Kyoto Products FOSS License Exception
Version 1.0, 9 March 2011
This Free and Open Source Software ("FOSS") License Exception allows
developers of FOSS applications to include Kyoto Products with their FOSS
applications. Kyoto Products are licensed pursuant to version 3 (or later)
of the GNU General Public License ("GPL"), but this exception permits
distribution of Kyoto Products with a developer's FOSS applications licensed
under the terms of another FOSS license listed below, even though such other
FOSS license may be incompatible with the GPL.
The following terms and conditions describe the circumstances under which
this FOSS License Exception applies.
FOSS License Exception Terms and Conditions
1. Definitions
"Derivative Work" means a derivative work, as defined under applicable
copyright law, formed entirely from the Program and one or more FOSS
Applications.
"FOSS Application" means a free and open source software application
distributed subject to a license listed in the section below titled
"FOSS License List."
"FOSS Notice" means a notice placed by FAL Labs in a copy of the Kyoto
Products Libraries stating that such copy of the Kyoto Products
Libraries may be distributed under FAL Lab's or Kyoto Products' FOSS
License Exception.
"Independent Work" means portions of the Derivative Work that are not
derived from the Program and can reasonably be considered independent
and separate works.
"Program" means a copy of FAL Labs' Kyoto Products Libraries that
contains a FOSS Notice.
2. A FOSS application developer ("you" or "your") may distribute a Derivative
Work provided that you and the Derivative Work meet all of the following
conditions:
a. You obey the GPL in all respects for the Program and all portions
(including modifications) of the Program included in the Derivative
Work (provided that this condition does not apply to Independent Works);
b. You distribute Independent Works subject to a license listed in the
section below titled "FOSS License List";
c. You distribute Independent Works in object code or executable form
with the complete corresponding machine-readable source code on the
same medium and under the same FOSS license applying to the object
code or executable forms;
d. All works that are aggregated with the Program or the Derivative Work
on a medium or volume of storage are not derivative works of the
Program, Derivative Work or FOSS Application, and must reasonably be
considered independent and separate works.
3. FAL Labs reserves all rights not expressly granted in these terms and
onditions. If all of the above conditions are not met, then this FOSS
License Exception does not apply to you or your Derivative Work.
FOSS License List
License Name Versions/Copyright Date
Apache Software License 1.0 / 1.1 / 2.0
Artistic license From Perl 5.8.0
BSD License "July 22 1999"
GNU General Public License (GPL) 2
GNU Lesser General Public License (LGPL) 2.1 / 3.0
Mozilla Public License (MPL) 1.0 / 1.1
OpenSSL license (with original SSLeay license) "2003" ("1998")
PHP License 3.0/3.01
Python Software Foundation License 2.1.1
X11 License "2001"
Zlib/libpng License -
kyotocabinet-1.2.79/Doxyfile 0000644 0001750 0001750 00000002707 11604210243 015014 0 ustar mikio mikio # Doxyfile for Kyoto Cabinet
# General configuration options
PROJECT_NAME = "Kyoto Cabinet"
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = YES
SHOW_INCLUDE_FILES = YES
VERBATIM_HEADERS = NO
JAVADOC_AUTOBRIEF = YES
SORT_MEMBER_DOCS = NO
INLINE_INFO = NO
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
SHOW_USED_FILES = NO
QUIET = YES
WARNINGS = YES
SEARCHENGINE = NO
# Configuration options related to the input files
INPUT = .
FILE_PATTERNS = overview kccommon.h kcutil.h kcdb.h kcthread.h kcfile.h \
kccompress.h kccompare.h kcmap.h kcregex.h \
kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h \
kcpolydb.h kcdbext.h kclangc.h
RECURSIVE = NO
# Configuration options related to the alphabetical index
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 3
# Configuration options related to the HTML output
GENERATE_HTML = YES
HTML_OUTPUT = doc/api
HTML_FILE_EXTENSION = .html
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
# Configuration options related to the LaTeX output
GENERATE_LATEX = NO
LATEX_OUTPUT = latex
# Configuration options related to the man page output
GENERATE_MAN = NO
MAN_OUTPUT = .
MAN_EXTENSION = .3
# Configuration options related to the dot tool
HAVE_DOT = NO
CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
GENERATE_LEGEND = NO
DOT_CLEANUP = YES
# END OF FILE
kyotocabinet-1.2.79/overview 0000644 0001750 0001750 00000027412 11605641006 015105 0 ustar mikio mikio /**
@mainpage Kyoto Cabinet: a straightforward implementation of DBM
@section Introduction
Kyoto Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. Each key must be unique within a database. There is neither concept of data tables nor data types. Records are organized in hash table or B+ tree.
The following access methods are provided to the database: storing a record with a key and a value, deleting a record by a key, retrieving a record by a key. Moreover, traversal access to every key are provided. These access methods are similar to ones of the original DBM (and its followers: NDBM and GDBM) library defined in the UNIX standard. Kyoto Cabinet is an alternative for the DBM because of its higher performance.
Each operation of the hash database has the time complexity of "O(1)". Therefore, in theory, the performance is constant regardless of the scale of the database. In practice, the performance is determined by the speed of the main memory or the storage device. If the size of the database is less than the capacity of the main memory, the performance will seem on-memory speed, which is faster than std::map of STL. Of course, the database size can be greater than the capacity of the main memory and the upper limit is 8 exabytes. Even in that case, each operation needs only one or two seeking of the storage device.
Each operation of the B+ tree database has the time complexity of "O(log N)". Therefore, in theory, the performance is logarithmic to the scale of the database. Although the performance of random access of the B+ tree database is slower than that of the hash database, the B+ tree database supports sequential access in order of the keys, which realizes forward matching search for strings and range search for integers. The performance of sequential access is much faster than that of random access.
As the API is based on object-oriented design, the hash database and the the B+ tree database have same methods which inherited from the upper abstract class. Beside them, seven kinds of databases are provided under the same base class. The prototype hash database is powered by the standard container of std::unordered_map. The prototype tree database is powered by the standard container of std::map. The stash database is powered by the original implementation of naive hash map saving memory. The cache hash database is powered by the original implementation of doubly-linked hash map with LRU deletion algorithm. The cache tree database is powered by the cache hash database and provides B+ tree mechanism. The directory hash database is powered by the directory mechanism of the file system and stores records as respective files in a directory. The directory tree database is powered by the directory hash database and provides B+ tree mechanism. All databases have practical utility methods related to transaction and cursor. Programs for command line interface are also included in the package.
All databases have practical utility methods related to transaction and cursor. Programs for command line interface are also included in the package.
The following classes are most important. If you are new to Kyoto Cabinet, learn the polymorphic database first.
@li kyotocabinet::BasicDB -- common interface of concrete databases
@li kyotocabinet::ProtoHashDB -- on-memory hash database based on std::unordered_map
@li kyotocabinet::ProtoTreeDB -- on-memory hash database based on std::map
@li kyotocabinet::StashDB -- economical on-memory hash database for cache.
@li kyotocabinet::CacheDB -- on-memory hash database for cache with LRU deletion
@li kyotocabinet::GrassDB -- on-memory tree database for cache in order
@li kyotocabinet::HashDB -- file hash database, which implements hash table on a file
@li kyotocabinet::TreeDB -- file tree database, which implements B+ tree on a file
@li kyotocabinet::DirDB -- directory hash database, which handles respective files in a directory
@li kyotocabinet::ForestDB -- directory tree database, which implements B+ tree on a directory
@li kyotocabinet::TextDB -- plain text database, which treats a text file as a database
@li kyotocabinet::PolyDB -- polymorphic database, dynamic binding of the above databases
@li kyotocabinet::MapReduce -- MapReduce framework to process records in each database
@li kyotocabinet::IndexDB -- wrapper for efficient appending operations to each database
@li kclangc.h -- C language binding of the polymorphic database
See the project homepage ( http://fallabs.com/kyotocabinet/ ) for details.
@section Example
The following code is an example to use a polymorphic database.
@code
#include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
PolyDB db;
// open the database
if (!db.open("casket.kch", PolyDB::OWRITER | PolyDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
@endcode
The following code is a more complex example, which uses the Visitor pattern.
@code
#include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
PolyDB db;
// open the database
if (!db.open("casket.kch", PolyDB::OREADER)) {
cerr << "open error: " << db.error().name() << endl;
}
// define the visitor
class VisitorImpl : public DB::Visitor {
// call back function for an existing record
const char* visit_full(const char* kbuf, size_t ksiz,
const char* vbuf, size_t vsiz, size_t *sp) {
cout << string(kbuf, ksiz) << ":" << string(vbuf, vsiz) << endl;
return NOP;
}
// call back function for an empty record space
const char* visit_empty(const char* kbuf, size_t ksiz, size_t *sp) {
cerr << string(kbuf, ksiz) << " is missing" << endl;
return NOP;
}
} visitor;
// retrieve a record with visitor
if (!db.accept("foo", 3, &visitor, false) ||
!db.accept("dummy", 5, &visitor, false)) {
cerr << "accept error: " << db.error().name() << endl;
}
// traverse records with visitor
if (!db.iterate(&visitor, false)) {
cerr << "iterate error: " << db.error().name() << endl;
}
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
@endcode
The following code is an example of word counting with the MapReduce framework.
@code
#include
#include
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
PolyDB db;
// open the database
if (!db.open()) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
db.set("1", "this is a pen");
db.set("2", "what a beautiful pen this is");
db.set("3", "she is beautiful");
// define the mapper and the reducer
class MapReduceImpl : public MapReduce {
// call back function of the mapper
bool map(const char* kbuf, size_t ksiz, const char* vbuf, size_t vsiz) {
vector words;
strsplit(string(vbuf, vsiz), ' ', &words);
for (vector::iterator it = words.begin();
it != words.end(); it++) {
emit(it->data(), it->size(), "", 0);
}
return true;
}
// call back function of the reducer
bool reduce(const char* kbuf, size_t ksiz, ValueIterator* iter) {
size_t count = 0;
const char* vbuf;
size_t vsiz;
while ((vbuf = iter->next(&vsiz)) != NULL) {
count++;
}
cout << string(kbuf, ksiz) << ": " << count << endl;
return true;
}
} mr;
// execute the MapReduce process
if (!mr.execute(&db)) {
cerr << "MapReduce error: " << db.error().name() << endl;
}
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
@endcode
The C language binding is also provided as a wrapper of the polymorphic database API. The following code is an example.
@code
#include
/* call back function for an existing record */
const char* visitfull(const char* kbuf, size_t ksiz,
const char* vbuf, size_t vsiz, size_t *sp, void* opq) {
fwrite(kbuf, 1, ksiz, stdout);
printf(":");
fwrite(vbuf, 1, vsiz, stdout);
printf("\n");
return KCVISNOP;
}
/* call back function for an empty record space */
const char* visitempty(const char* kbuf, size_t ksiz, size_t *sp, void* opq) {
fwrite(kbuf, 1, ksiz, stdout);
printf(" is missing\n");
return KCVISNOP;
}
/* main routine */
int main(int argc, char** argv) {
KCDB* db;
KCCUR* cur;
char *kbuf, *vbuf;
size_t ksiz, vsiz;
const char *cvbuf;
/* create the database object */
db = kcdbnew();
/* open the database */
if (!kcdbopen(db, "casket.kch", KCOWRITER | KCOCREATE)) {
fprintf(stderr, "open error: %s\n", kcecodename(kcdbecode(db)));
}
/* store records */
if (!kcdbset(db, "foo", 3, "hop", 3) ||
!kcdbset(db, "bar", 3, "step", 4) ||
!kcdbset(db, "baz", 3, "jump", 4)) {
fprintf(stderr, "set error: %s\n", kcecodename(kcdbecode(db)));
}
/* retrieve a record */
vbuf = kcdbget(db, "foo", 3, &vsiz);
if (vbuf) {
printf("%s\n", vbuf);
kcfree(vbuf);
} else {
fprintf(stderr, "get error: %s\n", kcecodename(kcdbecode(db)));
}
/* traverse records */
cur = kcdbcursor(db);
kccurjump(cur);
while ((kbuf = kccurget(cur, &ksiz, &cvbuf, &vsiz, 1)) != NULL) {
printf("%s:%s\n", kbuf, cvbuf);
kcfree(kbuf);
}
kccurdel(cur);
/* retrieve a record with visitor */
if (!kcdbaccept(db, "foo", 3, visitfull, visitempty, NULL, 0) ||
!kcdbaccept(db, "dummy", 5, visitfull, visitempty, NULL, 0)) {
fprintf(stderr, "accept error: %s\n", kcecodename(kcdbecode(db)));
}
/* traverse records with visitor */
if (!kcdbiterate(db, visitfull, NULL, 0)) {
fprintf(stderr, "iterate error: %s\n", kcecodename(kcdbecode(db)));
}
/* close the database */
if (!kcdbclose(db)) {
fprintf(stderr, "close error: %s\n", kcecodename(kcdbecode(db)));
}
/* delete the database object */
kcdbdel(db);
return 0;
}
@endcode
*/
/**
* Common namespace of Kyoto Cabinet.
*/
namespace kyotocabinet {}
/**
* @file kccommon.h common symbols for the library
* @file kcutil.h utility functions
* @file kcdb.h database interface
* @file kcthread.h threading devices
* @file kcfile.h filesystem abstraction
* @file kccompress.h data compressor and decompressor
* @file kccompare.h comparator functions
* @file kcmap.h data mapping structures
* @file kcregex.h regular expression
* @file kcplantdb.h plant database
* @file kcprotodb.h prototype database
* @file kccachedb.h cache hash database
* @file kchashdb.h file hash database
* @file kcdirdb.h directory hash database
* @file kctextdb.h plain text database
* @file kcpolydb.h polymorphic database
* @file kcdbext.h database extension
* @file kclangc.h C language binding
*/
kyotocabinet-1.2.79/LINKEXCEPTION 0000644 0001750 0001750 00000004624 11575445152 015265 0 ustar mikio mikio Kyoto Products Specific FOSS Library Linking Exception
Version 1.0, 10 June 2011
This Specific FOSS (Free and Open Source Software) Library Linking Exception
allows applications of some specific FOSS libraries to link to Kyoto Products
without the "copyleft" duty defined by the GNU General Public License ("GPL").
Kyoto Products are licensed pursuant to version 3 (or later) of the GPL, but
this exception permits distribution of Kyoto Products with applications of
pecific FOSS libraries listed below, even though their license may be
imcompativle with the GPL.
The following terms and conditions describe the circumstances under which
this Specific FOSS Library Linking Exception.
Specific FOSS Library Linking Exception Terms and Conditions
1. Definitions
"Derivative Work" means a derivative work, as defined under applicable
copyright law, formed entirely from the Program and the Specific Library
and the Application.
"Application" means an application under an arbitrary license, which may
or may not be a FOSS license, linking to the Specific Library.
"Program" means a copy of FAL Labs' Kyoto Products Libraries.
"Specific Library" means one of the libraries listed in the section below
titled "Specific Library List".
2. A developer ("you" or "your") may distribute a Derivative Work under an
arbitrary license, provided that you and the Derivative Work and the
Specific Library linked to by the Derivative Work meet all of the
following conditions:
a. You don't modify the Program at all.
b. You use the Program as a backend of the Specific Library and you don't
use any interface of the Program for other purposes except for
utilizing the Specific Library.
c. The Specific Library is a FOSS product whose license complies to
the Open Source Definition defined by the Open Source Initiative.
d. The Specific Library does not allow applications to use interfaces of
the Product as a general database functions.
3. FAL Labs reserves all rights not expressly granted in these terms and
conditions. If all of the above conditions are not met, then this
Specific FOSS Library Linking Exception does not apply to you or your
Derivative Work.
Specific Library List
Name: GraphLab
Description: a parallel framework for machine learning
URL: http://www.graphlab.ml.cmu.edu/
kyotocabinet-1.2.79/README 0000644 0001750 0001750 00000002146 13705177405 014203 0 ustar mikio mikio ================================================================
Kyoto Cabinet: a straightforward implementation of DBM
Copyright (C) 2009-2011 Mikio Hirabayashi
================================================================
Please read the following documents with a WWW browser.
How to install Kyoto Cabinet is explained in the specification.
README - this file
COPYING - license (GPLv3)
FOSSEXCEPTION - license exception for FOSS
LINKEXCEPTION - license exception for specific libraries
ChangeLog - history of enhancement
doc/index.html - index of documents
Contents of the directory tree is below.
./ - sources of Kyoto Cabinet
./doc/ - manuals and specifications
./man/ - manuals for nroff
./example/ - sample code for tutorial
./lab/ - for test and experiment
Kyoto Cabinet is released under the terms of the GNU General Public
License version 3. See the file `COPYING' for details.
Kyoto Cabinet was written by Mikio Hirabayashi. You can contact the
author by e-mail to `mikio@gmail.com'.
Thanks.
== END OF FILE ==
kyotocabinet-1.2.79/doc/ 0000755 0001750 0001750 00000000000 13705222033 014051 5 ustar mikio mikio kyotocabinet-1.2.79/doc/command.html 0000644 0001750 0001750 00000155463 11757416060 016405 0 ustar mikio mikio
Specificatoins of Command Line Utilities of Kyoto Cabinet
Specificatoins of Command Line Utilities of Kyoto Cabinet
Copyright (C) 2009-2012 FAL Labs
Last Update: Fri, 04 Mar 2011 23:07:26 -0800
This document describes how to use command line utilities. They are useful to manage database contents and to test the library and its applications.
The command `kcutiltest' is a utility for facility test and performance test of the utility functions. This command is used in the following format. `rnum' specifies the number of iterations. `path' specifies the path of a file.
-iv num : specifies the interval between iterations.
-rnd : performs random test.
-msiz num : specifies the size of the memory-mapped region.
-bnum num : specifies the number of buckets of the hash table.
This command returns 0 on success, another on failure.
kcutilmgr
The command `kcutilmgr' is a tool of miscellaneous utilities, and to show the configuration. This command is used in the following format. `file' specifies a input file. If it is omitted, the standard input is read. If it begins with "@", the trailing substring is treated as the input. `pattern' specifies an matching pattern.
kcutilmgr hex [-d] [file]
Performs hexadecimal encoding and its decoding.
kcutilmgr enc [-hex|-url|-quote] [-d] [file]
Performs Base64 encoding and its decoding.
kcutilmgr ciph [-key str] [file]
Performs Arcfour cipher and its decipher.
kcutilmgr comp [-def|-gz|-lzo|-lzma] [-d] [file]
Performs ZLIB encoding and its decoding. By default, use the raw format.
kcutilmgr hash [-fnv|-path|-crc] [file]
Calculates the hash value. By default, use MurMur hashing.
kcutilmgr regex [-alt str] [-ic] pattern [file]
Prints lines matching a regular expression.
kcutilmgr conf [-v|-i|-l|-p]
Shows the configuration of Kyoto Cabinet.
kcutilmgr version
Shows the version information of Kyoto Cabinet.
Options feature the following.
-d : perform decoding (unescaping), not encoding (escaping).
-hex : use hexadecimal encoding.
-url : use URL encoding.
-quote : use Quoted-printable encoding.
-key str : set the cipher key.
-def : use the deflate format.
-gz : use the gzip format.
-lzo : use LZO encoding.
-lzma : use LZMA encoding.
-fnv : use FNV hashing.
-path : use the path hashing of the directory database.
-crc : calculate the CRC32 checksum.
-alt str : replaces matching substring with the alternative string.
-ic : ignores difference between upper and lower cases.
-v : show the version number of Kyoto Cabinet.
-i : show options to include the headers of Tokyo Cabinet.
-l : show options to link the library of Tokyo Cabinet.
-p : show the directory path of the commands.
This command returns 0 on success, another on failure.
kcprototest
The command `kcprototest' is a utility for facility test and performance test of the prototype database. This command is used in the following format. `rnum' specifies the number of iterations.
kcprototest order [-tree] [-th num] [-rnd] [-etc] [-tran] rnum
-tree : test the prototype tree database instead of the prototype hash database.
-th num : specifies the number of worker threads.
-rnd : performs random test.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-it num : specifies the number of repetition.
This command returns 0 on success, another on failure.
kcstashtest
The command `kcstashtest' is a utility for facility test and performance test of the stash database. This command is used in the following format. `rnum' specifies the number of iterations.
-bnum num : specifies the number of buckets of the hash table.
-lv : reports all errors.
-it num : specifies the number of repetition.
This command returns 0 on success, another on failure.
kccachetest
The command `kccachetest' is a utility for facility test and performance test of the cache hash database. This command is used in the following format. `rnum' specifies the number of iterations.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-capcnt num : specifies the maximum number of records.
-capsiz num : specifies the maximum size of memory usage.
-lv : reports all errors.
-it num : specifies the number of repetition.
This command returns 0 on success, another on failure.
kcgrasstest
The command `kcgrasstest' is a utility for facility test and performance test of the cache tree database. This command is used in the following format. `rnum' specifies the number of iterations.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-psiz num : specifies the size of each page.
-pccap num : specifies the capacity size of the page cache.
-rcd : use the decimal comparator instead of the lexical one.
-rcld : use the lexical descending comparator instead of the ascending one.
-rcdd : use the decimal descending comparator instead of the lexical one.
-lv : reports all errors.
-it num : specifies the number of repetition.
This command returns 0 on success, another on failure.
kchashtest
The command `kchashtest' is a utility for facility test and performance test of the file hash database. This command is used in the following format. `path' specifies the path of a database file. `rnum' specifies the number of iterations.
-getw : performs getting with a buffer operation only.
-rem : performs removing operation only.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-oat : opens the database with the auto transaction option.
-oas : opens the database with the auto synchronization option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-apow num : specifies the power of the alignment of record size.
-fpow num : specifies the power of the capacity of the free block pool.
-ts : tunes the database with the small option.
-tl : tunes the database with the linear option.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-msiz num : specifies the size of the memory-mapped region.
-dfunit num : specifies the unit step number of auto defragmentation.
-lv : reports all errors.
-it num : specifies the number of repetition.
-hard : performs physical synchronization.
This command returns 0 on success, another on failure.
kchashmgr
The command `kchashmgr' is a utility for test and debugging of the file hash database and its applications. `path' specifies the path of a database file. `key' specifies the key of a record. `value' specifies the value of a record. `file' specifies the input/output file.
-otr : opens the database with the truncation option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-apow num : specifies the power of the alignment of record size.
-fpow num : specifies the power of the capacity of the free block pool.
-ts : tunes the database with the small option.
-tl : tunes the database with the linear option.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-st : prints miscellaneous information.
-add : performs adding operation.
-app : performs appending operation.
-rep : performs replacing operation.
-inci : performs integer increment operation.
-incd : performs real number increment operation.
-sx : the input data is evaluated as a hexadecimal data string.
-rm : removes the record.
-px : the output data is converted into a hexadecimal data string.
-pz : does not append line feed at the end of the output.
-max num : specifies the maximum number of shown records.
-pv : prints values of records also.
This command returns 0 on success, another on failure.
kctreetest
The command `kctreetest' is a utility for facility test and performance test of the file tree database. This command is used in the following format. `path' specifies the path of a database file. `rnum' specifies the number of iterations.
-getw : performs getting with a buffer operation only.
-rem : performs removing operation only.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-oat : opens the database with the auto transaction option.
-oas : opens the database with the auto synchronization option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-apow num : specifies the power of the alignment of record size.
-fpow num : specifies the power of the capacity of the free block pool.
-ts : tunes the database with the small option.
-tl : tunes the database with the linear option.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-psiz num : specifies the size of each page.
-msiz num : specifies the size of the memory-mapped region.
-dfunit num : specifies the unit step number of auto defragmentation.
-pccap num : specifies the capacity size of the page cache.
-rcd : use the decimal comparator instead of the lexical one.
-rcld : use the lexical descending comparator instead of the ascending one.
-rcdd : use the decimal descending comparator instead of the lexical one.
-lv : reports all errors.
-it num : specifies the number of repetition.
-hard : performs physical synchronization.
This command returns 0 on success, another on failure.
kctreemgr
The command `kctreemgr' is a utility for test and debugging of the file tree database and its applications. `path' specifies the path of a database file. `key' specifies the key of a record. `value' specifies the value of a record. `file' specifies the input/output file.
-otr : opens the database with the truncation option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-apow num : specifies the power of the alignment of record size.
-fpow num : specifies the power of the capacity of the free block pool.
-ts : tunes the database with the small option.
-tl : tunes the database with the linear option.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-psiz num : specifies the size of each page.
-rcd : use the decimal comparator instead of the lexical one.
-rcld : use the lexical descending comparator instead of the ascending one.
-rcdd : use the decimal descending comparator instead of the lexical one.
-st : prints miscellaneous information.
-add : performs adding operation.
-app : performs appending operation.
-rep : performs replacing operation.
-inci : performs integer increment operation.
-incd : performs real number increment operation.
-sx : the input data is evaluated as a hexadecimal data string.
-rm : removes the record.
-px : the output data is converted into a hexadecimal data string.
-pz : does not append line feed at the end of the output.
-des : visits records in descending order.
-max num : specifies the maximum number of shown records.
-pv : prints values of records also.
This command returns 0 on success, another on failure.
kcdirtest
The command `kcdirtest' is a utility for facility test and performance test of the directory hash database. This command is used in the following format. `path' specifies the path of a database file. `rnum' specifies the number of iterations.
-getw : performs getting with a buffer operation only.
-rem : performs removing operation only.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-oat : opens the database with the auto transaction option.
-oas : opens the database with the auto synchronization option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-tc : tunes the database with the compression option.
-lv : reports all errors.
-it num : specifies the number of repetition.
-hard : performs physical synchronization.
This command returns 0 on success, another on failure.
kcdirmgr
The command `kcdirmgr' is a utility for test and debugging of the directory hash database and its applications. `path' specifies the path of a database file. `key' specifies the key of a record. `value' specifies the value of a record. `file' specifies the input/output file.
-otr : opens the database with the truncation option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-tc : tunes the database with the compression option.
-st : prints miscellaneous information.
-add : performs adding operation.
-app : performs appending operation.
-rep : performs replacing operation.
-inci : performs integer increment operation.
-incd : performs real number increment operation.
-sx : the input data is evaluated as a hexadecimal data string.
-rm : removes the record.
-px : the output data is converted into a hexadecimal data string.
-pz : does not append line feed at the end of the output.
-max num : specifies the maximum number of shown records.
-pv : prints values of records also.
This command returns 0 on success, another on failure.
kcforesttest
The command `kcforesttest' is a utility for facility test and performance test of the directory tree database. This command is used in the following format. `path' specifies the path of a database file. `rnum' specifies the number of iterations.
-getw : performs getting with a buffer operation only.
-rem : performs removing operation only.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-oat : opens the database with the auto transaction option.
-oas : opens the database with the auto synchronization option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-psiz num : specifies the size of each page.
-pccap num : specifies the capacity size of the page cache.
-rcd : use the decimal comparator instead of the lexical one.
-rcld : use the lexical descending comparator instead of the ascending one.
-rcdd : use the decimal descending comparator instead of the lexical one.
-lv : reports all errors.
-it num : specifies the number of repetition.
-hard : performs physical synchronization.
This command returns 0 on success, another on failure.
kcforestmgr
The command `kcforestmgr' is a utility for test and debugging of the file tree database and its applications. `path' specifies the path of a database file. `key' specifies the key of a record. `value' specifies the value of a record. `file' specifies the input/output file.
-otr : opens the database with the truncation option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-tc : tunes the database with the compression option.
-bnum num : specifies the number of buckets of the hash table.
-psiz num : specifies the size of each page.
-rcd : use the decimal comparator instead of the lexical one.
-rcld : use the lexical descending comparator instead of the ascending one.
-rcdd : use the decimal descending comparator instead of the lexical one.
-st : prints miscellaneous information.
-add : performs adding operation.
-app : performs appending operation.
-rep : performs replacing operation.
-inci : performs integer increment operation.
-incd : performs real number increment operation.
-sx : the input data is evaluated as a hexadecimal data string.
-rm : removes the record.
-px : the output data is converted into a hexadecimal data string.
-pz : does not append line feed at the end of the output.
-des : visits records in descending order.
-max num : specifies the maximum number of shown records.
-pv : prints values of records also.
This command returns 0 on success, another on failure.
kcpolytest
The command `kcpolytest' is a utility for facility test and performance test of the polymorphic database. This command is used in the following format. `path' specifies the path of a database file. `rnum' specifies the number of iterations.
kcpolytest order [-th num] [-rnd] [-set|-get|-getw|-rem|-etc] [-tran] [-oat|-oas|-onl|-onl|-otl|-onr] [-lv] pathrnum
kcpolytest index [-th num] [-rnd] [-set|-get|-rem|-etc] [-tran] [-oat|-oas|-onl|-onl|-otl|-onr] [-lv] pathrnum
Performs indexing operations.
kcpolytest misc path
Performs miscellaneous tests.
Options feature the following.
-th num : specifies the number of worker threads.
-rnd : performs random test.
-set : performs setting operation only.
-get : performs getting operation only.
-getw : performs getting with a buffer operation only.
-rem : performs removing operation only.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-oat : opens the database with the auto transaction option.
-oas : opens the database with the auto synchronization option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-lv : reports all errors.
-it num : specifies the number of repetition.
-hard : performs physical synchronization.
-ru : reuses the existing database.
-tmp str : specifies the path of a directory for temporary storage.
-dbnum num : specifies the number of temporary databases.
-clim num : specifies the limit size of cache memory.
-cbnum num : specifies the bucket number of cache memory.
-xnl : executes with the no locking option.
-xpm : executes with the parallel mapper option.
-xpr : executes with the parallel reducer option.
-xpf : executes with the parallel flusher option.
-xnc : executes with the no compression option.
This command returns 0 on success, another on failure.
kcpolymgr
The command `kcpolymgr' is a utility for test and debugging of the polymorphic database and its applications. `path' specifies the path of a database file. `key' specifies the key of a record. `value' specifies the value of a record. `file' specifies the input/output file. `src' specifies other database files.
kcpolymgr create [-otr] [-onl|-otl|-onr] path
Creates a database file.
kcpolymgr inform [-onl|-otl|-onr] [-st] path
Prints status information.
kcpolymgr set [-onl|-otl|-onr] [-add|-app|-rep|-inci|-incd] [-sx] pathkeyvalue
Stores a record.
kcpolymgr remove [-onl|-otl|-onr] [-sx] pathkey
Removes a record.
kcpolymgr get [-onl|-otl|-onr] [-rm] [-sx] [-px] [-pz] pathkey
-otr : opens the database with the truncation option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-st : prints miscellaneous information.
-add : performs adding operation.
-app : performs appending operation.
-rep : performs replacing operation.
-inci : performs integer increment operation.
-incd : performs real number increment operation.
-sx : the input data is evaluated as a hexadecimal data string.
-rm : removes the record.
-px : the output data is converted into a hexadecimal data string.
-pz : performs not append line feed at the end of the output.
-mp : performs prefix matching instead of usual scan.
-mr : performs regular expression matching instead of usual scan.
-ms : performs similar matching instead of usual scan.
-des : visits records in descending order.
-max num : specifies the maximum number of shown records.
-pv : prints values of records also.
This command returns 0 on success, another on failure.
kclangctest
The command `kclangctest' is a utility for facility test and performance test of the C language binding. This command is used in the following format. `path' specifies the path of a database file. `rnum' specifies the number of iterations.
kclangctest order [-rnd] [-etc] [-tran] [-oat|-oas|-onl|-otl|-onr] pathrnum
Performs in-order tests.
kclangctest index [-rnd] [-etc] [-oat|-oas|-onl|-otl|-onr] pathrnum
Performs indexing operations.
kclangctest map [-rnd] [-etc] [-bnum num] rnum
Performs test of memory-saving hash map.
kclangctest list [-rnd] [-etc] rnum
Performs test of memory-saving array list.
Options feature the following.
-rnd : performs random test.
-etc : performs miscellaneous operations.
-tran : performs transaction.
-oat : opens the database with the auto transaction option.
-oas : opens the database with the auto synchronization option.
-onl : opens the database with the no locking option.
-otl : opens the database with the try locking option.
-onr : opens the database with the no auto repair option.
-bnum num : specifies the number of buckets of the hash table.
This command returns 0 on success, another on failure.
kyotocabinet-1.2.79/doc/spex.html 0000644 0001750 0001750 00000214046 11757416061 015740 0 ustar mikio mikio
Fundamental Specifications of Kyoto Cabinet Version 1
Fundamental Specifications of Kyoto Cabinet Version 1
Kyoto Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. Each key must be unique within a database. There is neither concept of data tables nor data types. Records are organized in hash table or B+ tree.
The following access methods are provided to the database: storing a record with a key and a value, deleting a record by a key, retrieving a record by a key. Moreover, traversal access to every key are provided. These access methods are similar to ones of the original DBM (and its followers: NDBM and GDBM) library defined in the UNIX standard. Kyoto Cabinet is an alternative for the DBM because of its higher performance.
Each operation of the hash database has the time complexity of "O(1)". Therefore, in theory, the performance is constant regardless of the scale of the database. In practice, the performance is determined by the speed of the main memory or the storage device. If the size of the database is less than the capacity of the main memory, the performance will seem on-memory speed, which is faster than std::map of STL. Of course, the database size can be greater than the capacity of the main memory and the upper limit is 8 exabytes. Even in that case, each operation needs only one or two seeking of the storage device.
Each operation of the B+ tree database has the time complexity of "O(log N)". Therefore, in theory, the performance is logarithmic to the scale of the database. Although the performance of random access of the B+ tree database is slower than that of the hash database, the B+ tree database supports sequential access in order of the keys, which realizes forward matching search for strings and range search for integers. The performance of sequential access is much faster than that of random access.
As the API is based on object-oriented design, the hash database and the the B+ tree database have same methods which inherited from the upper abstract class. Beside them, seven kinds of databases are provided under the same base class. The prototype hash database is powered by the standard container of std::unordered_map. The prototype tree database is powered by the standard container of std::map. The stash database is powered by the original implementation of naive hash map saving memory. The cache hash database is powered by the original implementation of doubly-linked hash map with LRU deletion algorithm. The cache tree database is powered by the cache hash database and provides B+ tree mechanism. The directory hash database is powered by the directory mechanism of the file system and stores records as respective files in a directory. The directory tree database is powered by the directory hash database and provides B+ tree mechanism. All databases have practical utility methods related to transaction and cursor. Programs for command line interface are also included in the package.
Kyoto Cabinet runs very fast. For example, elapsed time to store one million records is 0.9 seconds for the hash database, and 1.1 seconds for the B+ tree database. Moreover, the size of database is very small. For example, overhead for a record is 16 bytes for the hash database, and 4 bytes for the B+ tree database. Furthermore, scalability of Kyoto Cabinet is great. The database size can be up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C, Java, Python, Ruby, Perl, and Lua. Kyoto Cabinet is available on platforms which have API conforming to C++03 with the TR1 library extensions. Kyoto Cabinet is a free software licensed under the GNU General Public License. The FOSS License Exception is also provided in order to accommodate products under other free and open source licenses. The Specific FOSS Library Linking Exception is also provided in order to be available in some specific FOSS libraries. On the other hand, a commercial license is also provided. If you use Kyoto Cabinet within a proprietary software, the commercial license is required.
Features
This section describes the features of Kyoto Cabinet.
Genealogy
The original DBM was developed by Kenneth Thompson as a part of the original AT&T UNIX. After that, a lot of followers developed such DBM-like products as NDBM, SDBM, GDBM, TDB, and BerkeleyDB. In 2003, I developed QDBM to replace GDBM for performance reason.
In 2007, Tokyo Cabinet was developed as the successor to QDBM on the following purposes. They were achieved and Tokyo Cabinet could replace conventional DBM products.
improves space efficiency : smaller size of database file.
improves time efficiency : faster processing speed.
improves parallelism : higher performance in multi-thread environment.
improves usability : simplified API.
improves robustness : database file is not corrupted even under catastrophic situation.
supports 64-bit architecture : enormous memory space and database file are available.
In 2009, Kyoto Cabinet was developed as another successor to QDBM. Compared with the sibling product (Tokyo Cabinet), the following advantages were pursued. However, the performance of Tokyo Cabinet is higher than Kyoto Cabinet, at least in single thread operations.
improves space efficiency : smaller size of database file.
improves parallelism : higher performance in multi-thread environment.
improves portability : abstraction of the lower layer to support non-POSIX systems.
improves robustness : database file is not corrupted even under catastrophic situation.
I'll maintain the both of Tokyo Cabinet and Kyoto Cabinet because their values are different.
Effective Implementation of Hash Database
Kyoto Cabinet uses hash algorithm to retrieve records. If a bucket array has sufficient number of elements, the time complexity of retrieval is "O(1)". That is, the time required for retrieving a record is constant, regardless of the scale of a database. It is also the same about storing and deleting. Collision of hash values is managed by separate chaining. Data structure of the chains is binary search tree. Even if a bucket array has unusually scarce elements, the time complexity of retrieval is "O(log n)".
Kyoto Cabinet attains performance improvement in retrieval by loading the whole of the bucket array onto the RAM. If the bucket array is on RAM, it is possible to access a region of a target record by about one set of file operations such as `lseek', `read', and `write'. The bucket array saved in a file is not read into RAM with the `read' call but directly mapped to RAM with the `mmap' call. Therefore, preparation time on connecting to a database is very short, and two or more processes can share the same memory map.
The hash function used for hash table is MurMurHash 2.0. If the number of elements of the bucket array is about a half of records stored within a database, although it depends on characteristic of the input, the probability of collision of hash values is about 55.3% (35.5% if the same, 20.4% if twice, 11.0% if four times, 5.7% if eight times). In that case, it is possible to retrieve a record by two or less sets of file operations. If it is made into a performance index, in order to handle a database containing one million of records, a bucket array with half a million of elements is required. The size of each element is 6 bytes. That is, if 3M bytes of RAM is available, a database containing one million records can be handled.
When overwriting a record with a value whose size is greater than the existing one, it is necessary to move the region to another position of the file. Because the time complexity of the operation depends on the size of the region of a record, extending values successively is inefficient. However, Kyoto Cabinet deals with this problem by alignment. If the incremental data can be placed in the padding region trailing the records, it is not necessary to move the region of the record.
Generally speaking, while succession of updating, fragmentation of available regions occurs, and the size of a database grows rapidly. Kyoto Cabinet deals with this problem by the free block pool and the automatic defragmentation mechanism. If a record is removed or shifted to another position, the region will be treated as a free block. The free block pool manages free blocks and reuses the best fit region for a new record. The automatic defragmentation is to shift records and free blocks separately. Successive free blocks coalesce into one.
Useful Implementation of B+ Tree Database
Although the B+ tree database is slower than the hash database, it features ordering access to each record. The order can be assigned by users. Records in the B+ tree database are sorted and arranged in logical pages. Sparse index organized in B tree that is multiway balanced tree are maintained for each page. Thus, the time complexity of retrieval and so on is "O(log n)". Cursor is provided to access each record in order. The cursor can jump to a position specified by a key and can step forward or backward from the current position. Because each page is arranged as double linked list, the time complexity of stepping cursor is "O(1)".
The B+ tree database is implemented based on the above the hash database. Because each page of the B+ tree database is stored as each record in the hash database, the B+ tree database inherits efficiency of storage management of the hash database. Because the header of each record is smaller and alignment of each page is adjusted according to the page size, in most cases, the size of database file is cut by half compared to one of the hash database.
Although operations of many pages are required to update the B+ tree database, Kyoto Cabinet expedites the process by the page cache and reducing file operations. The page cache is implemented with double layered LRU list, which realizes that frequently accessed pages are cached in the "hot" list and recently accessed pages are cached in the "warm" LRU list. If the page cache works efficiently and the whole of the sparse index is cached on memory, it is possible to retrieve a record by one or less set of file operations.
Each page of the B+ tree database can be stored with compressed. The default compression method is "Deflate" by ZLIB. Because records in a page has similar patterns, high efficiency of compression is expected due to the Lempel-Ziv algorithm. In case of handling text data, the size of a database is reduced to about 50% or less. If the scale of a database is large and disk I/O is the bottleneck, featuring compression makes the processing speed improved to a large extent. Moreover, you can specify such external compression algorithms as LZO and LZMA.
Practical Functionality
Kyoto Cabinet features transaction mechanisms. It is possible to commit a series of operations between the beginning and the end of the transaction in a lump, or to abort the transaction and perform rollback to the state before the transaction. Two isolation levels are supported: "serializable" and "read uncommitted". Durability is secured by write ahead logging and shadow paging.
Automatic transaction and automatic recovery mechanisms are also supported. If the automatic transaction option is specified when opening the database, every updating operation is guarded by transaction which is committed implicitly. Therefore, durability can be assured without explicit transaction operations. The automatic recovery mechanism works after the database is crashed outside transaction. If inconsistency of the database is detected when opening the database, all regions are scanned as with "fsck" and the database is reconstructed with surviving records implicitly.
Kyoto Cabinet provides two modes to connect to a database: "reader" and "writer". A reader can perform retrieving but neither storing nor deleting. A writer can perform all access methods. Exclusion control between processes is performed when connecting to a database by file locking. While a writer is connected to a database, neither readers nor writers can be connected. While a reader is connected to a database, other readers can be connect, but writers can not. According to this mechanism, data consistency is guaranteed with simultaneous connections in multitasking environment.
Functions of API are reentrant and available in multi-thread environment. Different database objects can be operated in parallel entirely. For simultaneous operations against the same database object, rwlock (reader-writer lock) is used for exclusion control. That is, while a writing thread is operating an object, other reading threads and writing threads are blocked. However, while a reading thread is operating an object, reading threads are not blocked. Locking granularity depends on data structures. The hash database uses record locking. The B+ tree database uses page locking.
In order to improve performance and concurrency, Kyoto Cabinet uses such atomic operations built in popular CPUs as atomic-increment and CAS (compare-and-swap). Lock primitives provided by the native environment such as the POSIX thread package are alternated by own primitives using CAS.
Simple but Flexible Interfaces
Kyoto Cabinet provides simple APIs based on object-oriented design. Every operation for database is encapsulated and published as lucid methods as `open', `close', `set', `remove', `get', and so on. The classes of the hash database and the B+ tree database are derived class of the common abstract class which defines the interface. Porting an application from one database to another is easy. Moreover, the polymorphic database API is provided to assign a database in run-time.
Kyoto Cabinet supports the "visitor" pattern. You can define arbitrary database operations with call back functions. The visitor class encapsulates that call back functions and their state data. The database class has the "accept" method, which accepts an instance of the visitor class and calls its functions with a record data. The return value of the call back function is reflected as the new state of the record.
In addition, a lot of useful utilities are provided such as "prefix search", "regex search", "logging", "hot backup", "pseudo-snapshot", and "merging". A framework for "MapReduce" is also provided. Although it is not distributed, it is useful for aggregate calculation with less CPU loading and less memory usage. The plain text database is an interface to treat a plain text file as a database file. It is useful to use a text file as input or output data for the MapReduce framework. The index database is a wrapper of a polymorphic database in order to improve the efficiency of the `append' operation. It is useful to construct inverted indices.
While the core API is provided for C++, bindings for other languages such as C, Java, Python, Ruby, Perl, and Lua are also provided. Command line interfaces are also provided corresponding to each API. They are useful for prototyping, test, and debugging.
Installation
This section describes how to install Kyoto Cabinet with the source package. As for a binary package, see its installation manual.
Preparation
Kyoto Cabinet is available on UNIX-like systems. At least, the following environments are supported.
Linux 2.6 and later (i386/x86-64/PowerPC/Alpha/SPARC)
FreeBSD 7.1 and later (i386/x86-64)
Solaris 10 and later (i386/x86-64/SPARC)
Mac OS X 10.5 and later (x86-64)
Windows XP and later (i386/x86-64)
gcc (GNU Compiler Collection) 4.2 or later and make (GNU Make) are required to install Kyoto Cabinet with the source package. They are installed by default on Linux, FreeBSD and so on.
As Kyoto Cabinet depends on the following libraries, install them beforehand.
ZLIB : for loss-less data compression. 1.2.3 or later is required.
Installation
When an archive file of Kyoto Cabinet is extracted, change the current working directory to the generated directory and perform installation.
Run the configuration script.
$ ./configure
Build programs.
$ make
Perform self-diagnostic test. This takes a while.
$ make check
Install programs. This operation must be carried out by the root user.
# make install
Result
When a series of work finishes, the following files will be installed.
The following options can be specified with `./configure'.
--enable-debug : build for debugging. Enable debugging symbols, do not perform optimization, and perform static linking.
--enable-devel : build for development. Enable debugging symbols, perform optimization, and perform dynamic linking.
--enable-profile : build for profiling. Enable profiling symbols, perform optimization, and perform dynamic linking.
--enable-static : build by static linking.
--disable-shared : avoid to build shared libraries.
--disable-atomic : build without atomic operations.
--disable-zlib : build without ZLIB compression.
--enable-lzo : build with LZO compression.
--enable-lzma : build with LZMA compression.
`--prefix' and other options are also available as with usual UNIX software packages. If you want to install Kyoto Cabinet under `/usr' not `/usr/local', specify `--prefix=/usr'. As well, the library search path does not include `/usr/local/lib', it is necessary to set the environment variable `LD_LIBRARY_PATH' to include `/usr/local/lib' before running applications of Kyoto Cabinet.
ZLIB is enabled by default. LZO and LZMA are disabled by default. Note that the programs on which Kyoto Cabinet depends are under different licenses. For example, ZLIB is under the zlib license, LZO is under the GPL, and LZMA is under the LGPL. You must also comply with their license terms if you enable them.
How to Use the Library
Kyoto Cabinet provides API of the C++ language and it is available by programs conforming to the C++03 standard. As the header files of Kyoto Cabinet are provided as `kcutil.h', `kchashdb.h', and so on, applications should include one or more of them accordingly to use the API. As the library is provided as `libkyotocabinet.a' and `libkyotocabinet.so' and they depends on `libz.so', `libstdc++.so', `librt.so', `libpthread.so', `libm.so', and `libc.so', linker options corresponding to them are required by the build command. The typical build command is the following.
Microsoft Visual Studio (Visual C++) is required to build Kyoto Cabinet on Windows. The building configuration is described in the file `VCmakefile', which should be edited according to your environment. Then, perform the following command in a command prompt window.
> nmake -f VCmakefile
If you want, perform self-diagnostic test.
> nmake -f VCmakefile check
If all building processes finish successfully, the static library `kyotocabinet.lib' and some executable files are generated. As for now, neither DLL nor installation tool is provided. Please, install the header files, the library file, and the executable files by yourself.
If the header files and the library file are in the current directory, you can build an application program by the following command.
> cl /I. example.cc kyotocabinet.lib
By default, the library is built with linking to `LIBCMT.LIB' by the `/MT' option. If you want to use `MSVCRT.LIB', which is required by the MFC, rebuild the library with the `/MD' option and set the same option when building applications. If your environment is 64-bit version, add the `/D_SYS_WIN64_' option to compiler options to improve performance.
Many people use virus checking softwares on Windows. However, they are harmful for database softwares. To avoid unexpected errors and performance overhead of database functions, set aside the data directory from virus checking. If the above self-diagnostic test fails, please confirm the configuration of the virus checker first.
Tutorial
This section describes how to use Kyoto Cabinet with the command line utilities and some sample application programs.
Command Line Utility for the File Hash Database
To begin with, let's build a file hash database with the command line utility `kchashmgr'. The database stores a list of staffs of a company. Each record is composed of the key and the value. The key is the staff ID and the value is person's name.
The database must be created just one time before any database operation. Let's create a database file "casket.kch" with the default configuration.
$ kchashmgr create staffs.kch
Register some staffs into the database.
$ kchashmgr set staffs.kch 1001 "George Washington"
$ kchashmgr set staffs.kch 1002 "John Adams"
$ kchashmgr set staffs.kch 1003 "Thomas Jefferson"
$ kchashmgr set staffs.kch 1004 "James Madison"
Check the current contents.
$ kchashmgr list -pv staffs.kch
1001 George Washington
1002 John Adams
1003 Thomas Jefferson
1004 James Madison
To retrieve the value of a record, search the database with the key.
$ kchashmgr get staffs.kch 1003
Thomas Jefferson
Of course, you can remove a record with the key.
$ kchashmgr remove staffs.kch 1003
That's all for the fundamental operations. The DBM family have been improving performance thanks to discarding the functionality.
Sample Application of the File Hash Database
Next, let's write a sample application program handling a file hash database. See the following source code.
#include <kchashdb.h>
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
HashDB db;
// open the database
if (!db.open("casket.kch", HashDB::OWRITER | HashDB::OCREATE)) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
if (!db.set("foo", "hop") ||
!db.set("bar", "step") ||
!db.set("baz", "jump")) {
cerr << "set error: " << db.error().name() << endl;
}
// retrieve a record
string value;
if (db.get("foo", &value)) {
cout << value << endl;
} else {
cerr << "get error: " << db.error().name() << endl;
}
// traverse records
DB::Cursor* cur = db.cursor();
cur->jump();
string ckey, cvalue;
while (cur->get(&ckey, &cvalue, true)) {
cout << ckey << ":" << cvalue << endl;
}
delete cur;
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
Save the above code as a file "example.cc". Then, perform the following command line. The command `kcutilmgr conf' prints the building configuration.
Execute the application program built by the above.
$ ./example
hop
foo:hop
bar:step
baz:jump
The API of the file hash database is defined in the header `kchash.h'. So, include the header near the front of a source file. All symbols of Kyoto Cabinet are packaged in the name space `kyotocabinet'. You can use them without any prefix by importing the name space.
#include <kchashdb.h>
using namespace kyotocabinet;
The class `HashDB' contains all functionality of the file hash database and each instance expresses a file hash database file.
HashDB db;
Each database file must be opened by the `open' method before any database operation. The flag `HashDB::OWRITER' means the process will update the database. The flag `HashDB::OCREATE' means a database file will be created if it does not exist yet.
Every opened database must be closed by the `close' method when it is no longer in use. Closing the database is very important to avoid data corruption and memory leak.
db.close();
To store a record, use the `set' method with the key and the value.
db.put("foo", "hop");
To retrieve the value of a record, use the `get' method with the key. On success, the return value is true and the result is assigned into the string object pointed to by the second parameter.
string value;
if (db.get("foo", &value)) {
cout << value << endl;
}
Except for `set' and `get', there are other methods; `add', `replace', `append', `remove', `increment', and `cas'. Each method has two versions; for `std::string' parameters and for `char*' and `size_t' parameters.
Traversing records is a bit complicated task. It needs a cursor object, which expresses the current position in the sequence of all records in the database. Each cursor is created by the `cursor' method of the database object. Each cursor should be initialized by `jump' method before actual record operations.
DB::Cursor* cur = db.cursor();
cur->jump();
The cursor class has such methods against the record at the current position as `set_value', `remove', `get_key', `get_value', and `get'. Most methods have an optional stepping parameter to shift the current position to the next record atomically. Therefore, iterating such methods with the stepping parameter results in that all records are visited.
Every operation against a record can be abstracted by the "visitor" pattern. A visitor object specifies call back methods which receives the state of a record and returns the new state. Let's see the next sample using the visitor pattern.
#include <kchashdb.h>
using namespace std;
using namespace kyotocabinet;
// main routine
int main(int argc, char** argv) {
// create the database object
HashDB db;
// open the database
if (!db.open("casket.kch", HashDB::OREADER)) {
cerr << "open error: " << db.error().name() << endl;
}
// define the visitor
class VisitorImpl : public DB::Visitor {
// call back function for an existing record
const char* visit_full(const char* kbuf, size_t ksiz,
const char* vbuf, size_t vsiz, size_t *sp) {
cout << string(kbuf, ksiz) << ":" << string(vbuf, vsiz) << endl;
return NOP;
}
// call back function for an empty record space
const char* visit_empty(const char* kbuf, size_t ksiz, size_t *sp) {
cerr << string(kbuf, ksiz) << " is missing" << endl;
return NOP;
}
} visitor;
// retrieve a record with visitor
if (!db.accept("foo", 3, &visitor, false) ||
!db.accept("dummy", 5, &visitor, false)) {
cerr << "accept error: " << db.error().name() << endl;
}
// traverse records with visitor
if (!db.iterate(&visitor, false)) {
cerr << "iterate error: " << db.error().name() << endl;
}
// close the database
if (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
The methods `accept' and `iterate' receive visitor objects. Each visitor object must be implement the interface `DB::Visitor'. The method `visit_full' is called for an existing record. The parameters specify the pointer to key buffer, the length of the key buffer, the pointer to the value buffer, the length of the value buffer, and the pointer to the variable to notice the length of the return value. The return value is `NOP' for no update, `REMOVE' to remove the record, or otherwise the pointer to the buffer contains arbitrary byte pattern to update the value. The method `visit_empty' is called for an empty record space. The specification is the same to `visit_full' except that it does not receive the record value.
As it is, almost all built-in operations like `set', `remove', and `get' are implemented with the `accept' method. The following code is to store a record.
As Kyoto Cabinet provides various database classes, they have the common base class, which defines the common interface of all database classes. That is, you can use the following classes in the same way.
class
file
description
ProtoHashDB
kcprotodb.h
prototype hash database.
on-memory database implemented with std::unorderd_map.
ProtoTreeDB
kcprotodb.h
prototype tree database.
on-memory database implemented with std::map.
StashDB
kcstashdb.h
stash database.
on-memory database saving memory.
CacheDB
kccachedb.h
cache hash database.
on-memory database featuring LRU deletion.
GrassDB
kccachedb.h
cache tree database.
on-memory database of B+ tree: cache with order.
HashDB
kchashdb.h
file hash database.
file database of hash table: typical DBM.
TreeDB
kchashdb.h
file tree database.
file database of B+ tree: DBM with order.
DirDB
kcdirdb.h
directory hash database.
respective files in a directory of the file system.
ForestDB
kcdirdb.h
directory tree database.
directory database of B+ tree: huge DBM with order.
TextDB
kctextdb.h
plain text database.
emulation to handle a plain text file as a database.
PolyDB
kcpolydb.h
polymorphic database.
dynamic binding of the above databases.
Each database has different features in persistence, algorithm, time complexity, record sequence, and lock model for concurrency.
class
persistence
algorithm
complexity
sequence
lock unit
ProtoHashDB
volatile
hash table
O(1)
undefined
whole (rwlock)
ProtoTreeDB
volatile
red black tree
O(log N)
lexical order
whole (rwlock)
StashDB
volatile
hash table
O(1)
undefined
record (rwlock)
CacheDB
volatile
hash table
O(1)
undefined
record (mutex)
GrassDB
volatile
B+ tree
O(log N)
custom order
page (rwlock)
HashDB
persistent
hash table
O(1)
undefined
record (rwlock)
TreeDB
persistent
B+ tree
O(log N)
custom order
page (rwlock)
DirDB
persistent
undefined
undefined
undefined
record (rwlock)
ForestDB
persistent
B+ tree
O(log N)
custom order
page (rwlock)
TextDB
persistent
plain text
undefined
stored order
record (rwlock)
The C language binding is also provided as a wrapper of the polymorphic database API. Include the header file `kclangc.h' and use the pointer to `KCDB' as a database object.
This section describes tips and hacks to use Kyoto Cabinet.
Tuning the Stash Database
The stash database (StashDB) is on-memory database saving memory. The following tuning methods are provided.
tune_buckets : sets the number of buckets of the hash table.
The default tuning of the bucket number is about one million. If you intend to store more records, call `tune_buckets' to set the bucket number. The suggested ratio of the bucket number is the same to the total number of records and it is okay from 80% to 400%. If the ratio decreases smaller than 100%, the time efficiency will decrease rapidly because the collision chain is linear linked list.
Tuning the Cache Hash Database
The cache hash database (CacheDB) is on-memory database featuring LRU deletion. The following tuning methods are provided.
tune_options : sets the optional features.
tune_buckets : sets the number of buckets of the hash table.
tune_compressor : set the data compressor.
cap_count : sets the capacity by record number.
cap_size : sets the capacity by memory usage.
The optional features by `tune_options' is useful to reduce the memory usage at the expense of time efficiency. If `CacheDB::TCOMPRESS' is specified, the key and the value of each record is compressed implicitly when stored in the file. If the value is bigger than 1KB or more, compression is effective.
The default tuning of the bucket number is about one million. If you intend to store more records, call `tune_buckets' to set the bucket number. The suggested ratio of the bucket number is the same to the total number of records and it is okay from 50% to 400%. If the ratio decreases smaller than 100%, the time efficiency will decrease gradually because the collision chain is binary search tree.
The default compression algorithm of the `CacheDB::TCOMPRESS' option is "Deflate" by ZLIB. If you want to use another algorithm, call `tune_compressor' to set a functor which implements compression and decompression functions.
By default, the cache hash database maintains all records on memory and no record is expired. If you want to expire old records to keep the memory usage constant, call `cap_count' and/or `cap_size' to limit the capacity.
If you want to cache ten millions of records and keep the memory usage less than 8GB, the following tuning is suggested for example.
All tuning methods must be called before the database is opened.
Tuning the Cache Tree Database
The cache tree database (GrassDB) is on-memory database of B+ tree. Because each node of B+ tree is serialized as a page buffer and treated as a record in the cache hash database, all tuning methods of the cache hash database except for capacity limitation are inherited to the cache tree database. Moreover, the following tuning methods are added.
tune_page : sets the size of each page.
tune_page_cache : sets the capacity size of the page cache.
tune_comparator : sets the record comparator.
The tuning of the page size by `tune_page' does not have to be modified in most cases. The default is 8192, which is the twice of the typical page size of popular environments. If the size of each node exceeds the parameter, the node is divided into two.
The default tuning of the capacity size of the page cache is 64MB. If your want to reduce memory usage, call `tune_page_cache' to convert most pages into flat byte arrays which are serialized or compressed in order to improve space efficiency.
The default record comparator is the lexical ordering function. That is, records in the B+ tree database are placed in the lexical order of each key. If you want to use another ordering, call `tune_comparator' to set a functor which implements the ordering function.
If you want to cache ten millions of records and keep the memory usage as small as possible, the following tuning is suggested for example.
All tuning methods must be called before the database is opened.
Tuning the File Hash Database
The file hash database (HashDB) is file database of hash table. The following tuning methods are provided.
tune_alignment : sets the power of the alignment of record size.
tune_fbp : sets the power of the capacity of the free block pool.
tune_options : sets the optional features.
tune_buckets : sets the number of buckets of the hash table.
tune_map : sets the size of the internal memory-mapped region.
tune_defrag : sets the unit step number of auto defragmentation.
tune_compressor : set the data compressor.
The default alignment power is 3, which means the address of each record is aligned to a multiple of 8 (1<<3) bytes. If you trust that the database is constructed at a time and not updated often, call `tune_alignment' to set the alignment power 0, which means 1 (1<<0) byte. If the typical size of each record is expected to be larger than 1KB, tune the alignment 8 or more.
The tuning of the free block pool by `tune_fbp' does not have to be modified in most cases. The default is 10, which means the capacity of the free block pool is 1024 (1<<10).
The optional features by `tune_options' is useful to reduce the size of the database file at the expense of scalability or time efficiency. If `HashDB::TSMALL' is specified, the width of record addressing is reduced from 6 bytes to 4 bytes. As the result, the footprint for each record is reduced from 16 bytes to 12 bytes. However, it limits the maximum size of the database file up to 16GB (2GB multiplied by the alignment). If `HashDB::TLINEAR' is specified, the data structure of the collision chain of hash table is changed from binary tree to linear linked list. In that case, the footprint of each record is reduced from 16 bytes to 10 bytes although the time efficiency becomes sensitive to the number of the hash buckets. If `HashDB::TCOMPRESS' is specified, the value of each record is compressed implicitly when stored in the file. If the value is bigger than 1KB or more, compression is effective.
The default tuning of the bucket number is about one million. If you intend to store more records, call `tune_buckets' to set the bucket number. The suggested ratio of the bucket number is the twice of the total number of records and it is okay from 100% to 400%. If the ratio decreases smaller than 100%, the time efficiency will decrease gradually. If you set the bucket number, setting the `HashDB::TLINEAR' option is recommended to improve time and space efficiency.
The default tuning of the size of the internal memory-mapped region is 64MB. If the database size is expected to be larger than 64MB, call `tune_map to set the map size larger than the expected size of the database. Although the capacity of the RAM on the machine limits the map size, increasing the map size is effective to improve performance.
By default, auto defragmentation is disabled. If the existing records in the database are modified (removed or modified with varying the size), fragmentation of available regions proceeds gradually. In that case, call `tune_defrag' to enable auto defragmentation and set the unit step number. The suggested unit step number is 8, which means that a set of defragmentation operations is performed each 8 updating operations. The more the unit is, space efficiency becomes higher but time efficiency becomes lower.
The default compression algorithm of the `HashDB::TCOMPRESS' option is "Deflate" by ZLIB. If you want to use another algorithm, call `tune_compressor' to set a functor which implements compression and decompression functions.
If you intend to store ten thousands of records and reduce the database size as possible, the following tuning is suggested for example.
If you have a monster machine with 512GB RAM and intend to store ten billion records and improve time efficiency as possible, the following tuning is suggested for example.
All tuning methods must be called before the database is opened. Because the settings of `tune_alignment', `tune_fbp', `tune_options', and `tune_buckets' are recorded as the meta data of the database, the methods must be called before the database is created and they can not be modified afterward. Because other tuning parameters are not recorded in the database, they should be specified before every time opening the database.
Tuning the File Tree Database
The file tree database (TreeDB) is file database of B+ tree. Because each node of B+ tree is serialized as a page buffer and stored as a record in the file hash database, all tuning methods of the file hash database are inherited to the file tree database. Moreover, the following tuning methods are added.
tune_page : sets the size of each page.
tune_page_cache : sets the capacity size of the page cache.
tune_comparator : sets the record comparator.
The tuning of the page size by `tune_page' does not have to be modified in most cases. The default is 8192, which is the twice of the typical page size of popular environments. If the size of each node exceeds the parameter, the node is divided into two.
The default tuning of the capacity size of the page cache is 64MB. If your machine has abundant RAM, call `tune_page_cache' to load all nodes on the page cache. If the RAM is not abundant, it is better to keep the default page cache size and assign the RAM for the internal memory-mapped region by `tune_map'.
The default record comparator is the lexical ordering function. That is, records in the B+ tree database are placed in the lexical order of each key. If you want to use another ordering, call `tune_comparator' to set a functor which implements the ordering function.
The default alignment of the file tree database is 256 (1<<8). The default bucket number of the file tree database is about 65536. Other default tuning parameters are the same to the file hash database. Note that the bucket number should be calculated by the number of pages. The suggested ratio of the bucket number is about 10% of the number of records. If the compression option is specified, all records in each page are compressed at once. Therefore, compression is more effective for the file tree database rather than for the file hash database.
If you intend to store ten thousands of records and reduce the database size as possible, the following tuning is suggested for example.
If you have a monster machine with 512GB RAM and intend to store ten billion records and improve time efficiency as possible, the following tuning is suggested for example.
All tuning methods must be called before the database is opened. Because the setting of `tune_page' is recorded as the meta data of the database, the methods must be called before the database is created and it can not be modified afterward. Because other tuning parameters are not recorded in the database, they should be specified before every time opening the database.
Tuning the Directory Hash Database
The directory hash database (DirDB) is powered by the directory mechanism of the file system and stores records as respective files in a directory. The following tuning methods are provided.
tune_options : sets the optional features.
The optional features by `tune_options' is useful to reduce the size of the database file at the expense of time efficiency. If `DirDB::TCOMPRESS' is specified, the key and the value of each record is compressed implicitly when stored in the file. If the value is bigger than 1KB or more, compression is effective.
Performance of the directory hash database is strongly based on the file system implementation and its tuning. Some file systems such as EXT2 are not good at storing a lot of files in a directory. But, other file systems such as EXT3 and ReiserFS are relatively efficient in that situation. In general, file systems featuring B tree or its variants are more suitable than linear search algorithms.
All tuning methods must be called before the database is opened. Because the settings of `tune_options' are recorded as the meta data of the database, the method must be called before the database is created and they can not be modified afterward.
Tuning the Directory Tree Database
The directory tree database (ForestDB) is directory database of B+ tree. As with that the file tree database is based on the file hash database, the directory tree database is based on the directory hash database. So, all tuning methods of the directory hash database are inherited to the directory tree database. Additional tuning methods are the same as ones of the file tree database.
The performance characteristics of the directory tree database is similar to those of the directory hash database. However, because records are organized in pages, frequency of I/O operations is less and performance is better in many cases.
Choosing Suitable Databases
In order to choose suitable database types for your application, it is important to clarify the requirement specification. If it does not require persistency of records, on-memory databases are suggested. There are the prototype hash database (ProtoHashDB), the prototype tree database (ProtoTreeDB), the stash database (StashDB), the cache hash database (CacheDB), and the cache tree database (GrassDB). If the order of keys is important for your application logic, the cache tree database is suitable. If not, the stash database is suitable. The memory usage of the cache tree database is smaller than the others. The cache hash database can delete old records implicitly and keep the memory usage constant. The prototype databases have few cases to flourish.
If your application requires persistency of records, persistent databases are suggested. There are the file hash database (HashDB), the file tree database (TreeDB), the directory hash database (DirDB), and the directory tree database (ForestDB). If the order of keys is important for your application logic, the file tree database is suitable. If not, the file hash database is suitable. In most cases, performance and concurrency of the file hash database is better than the others. If the size of each record is large, the directory hash database is suitable.
Most DBM implementations including Kyoto Cabinet and Tokyo Cabinet are optimized to store small records. As it is, if you want to handle very large records, using the file system directly is better solution than using DBM. If you store and retrieve large records, the processing time by the `write' and `read' system calls is dominant rather than the `open' and `lseek' system calls. Although typical DBMs reduce the workload to locate the position of each record, they increase the workload to read/write the data of each record. If you want to handle large records but don't want to use the file system directly, use the directory hash database. It's a mere wrapper of the directory mechanism of the file system. If you want to handle large records in order of keys, use the directory tree database. The directory tree database is the final weapon of scalability.
time efficiency: HashDB > TreeDB > DirDB > ForestDB
space efficiency: TreeDB > HashDB > ForestDB > DirDB
If you want to decide the database type doing performance test with the production code, use the polymorphic database. It can specify the database type dinamically when opening the database. In fact, the polymorphic database is suggested in most usecases though it involves a little bit of performance overhead in runtime. That's why the official script language bindings support the polymorphic database only.
Transaction
If an application process which opened a database terminated without closing the database, it involves risks that some records may be missing and the database may be broken. By default, durability is settled when the database is closed properly and it is not settled for each updating operation. Kyoto Cabinet deal with the problem by transaction mechanism based on WAL (write ahead logging). Transaction is begun and committed by application explicitly. Durability during transaction is settled for each updating operation. Transaction can be aborted by application. In that case, all update operations during transaction are voided and the content of the database is rollbacked. Although transaction is very useful like this, throughput of updating operation decreases to about 50% of the default manner due to overhead of writing WAL data.
If you can't be bothered to begin and commit transaction explicitly, use auto transaction mechanism by specifying the `BasicDB::AUTOTRAN' option when opening the database. Auto transaction is begun and committed implicitly for each operation. Overhead of auto transaction is lighter than explicit transaction.
performance penalty: Throughput will be down to about 1% or less.
Various Iterators
Kyoto Cabinet supports four kinds of iterators: cursor, atomic iterator, parallel iterator, and MapReduce. Each of them has its particular feature and it is important to choose the best suited one for your task.
Cursor is called "external iterator" as well. You can create multiple cursors of a database object simultaneously and each cursor can located at different places.
Atomic iterator is useful to retrieve or update records in a database atomically. Only one thread can use the atomic iterator at the same time and other threads accessing any record are blocked dualing its iteration.
class VisitorImpl : public DB::Visitor { /* implement visit_full */ };
VisitorImpl visitor;
db.iterate(&visitor, false);
Parallel iterator is useful to retrieve records in parallel. Although it cannot update any record, concurrent processing improves throughput. Multiple threads generated implicitly scan records simultaneously.
class VisitorImpl : public DB::Visitor { /* implement visit_full */ };
VisitorImpl visitor;
db.scan_parallel(&visitor, 8);
MapReduce is useful to compute all records and organize extracted data chunks by arbitrary keys. MapReduce is composed of three phases: "map", "shuffle", and "reduce". "map" or "mapper" is a user-defined function to scan all records and extract data, which are emitted as key-value records by the built-in "emit" function. "shuffle" is an implicit procedure to organize the extracted data by keys. And, "reduce" or "reducer" is a user-defined function to process a set of values organized by the same key.
The default behavior of MapReduce is based on atomic iterator. The `MapReduce::XNOLOCK' option make the mapper based on cursor. The `MapReduce::XPARAMAP' option make the mapper based on parallel iterator. The `MapReduce::XPARARED' option make the reducer based on a parallel processing model by a thread-pooling.
The plain text database (TextDB) allows you to use a plain text file as the input database or the output database of the MapReduce framework. When you store a record into a plain text database, the key is ignored and the value is appended at the end of the plain text, separating each record with a line feed character. When you use iterator or cursor, each line is retrieved as a record and the key is generated automatically from the offset of the line. The parallel iterator is also supported and you can process a text file in parallel easily.
Backup
Any hardware will break down suddenly. Especially such storage devices as HDD and SSD are fragile. Therefore, making backup files of your database file periodically is very important even if you use transaction. You can copy a database file by such popular commands as `cp' and `tar' when the database is not being updated by another process.
If an application uses multi threads and you want to make a backup file of the database in safety, use the `BasicDB::copy' method, which synchronizes the database status with the database file and makes a copy file. During the copying operation, it is assured that the database file is not updated.
db.copy("backup.kch");
You may want "hot backup", which means that other threads are not blocked while a thread is creating a backup file. In that case, use the `File::synchronize' method which synchronizes the database file and calls a function defined arbitrary. The call back function can execute a "snapshot" command provided by the operating system.
Chiefly for the cache hash database and the cache tree database, the "pseudo-snapshot" mechanism is provided. The `BasicDB::dump_snapshot' dumps all records into a stream or a file. The `BasicDB::load_snapshot' method loads records from a stream or a file. Although the operations are performed atomically, they don't finish momentarily but take time in proportion of the database size with blocking the other threads. Because the format of pseudo-snapshot data is common among the all database classes, it is useful to migrate records for each other.
If you don't want to let the other threads be blocked. Use the cursor mechanism and save/load records by yourself.
Encrypted Database
The `tune_compressor' method of the file tree database and so on can set an arbitrary data compression functor. In fact, the functor can perform not only data compression but also data encryption. The class `ArcfourCompressor' implements a lightweight cipher algorithm based on Arcfour (aka. RC4). It is useful to improve security of your database casually without high overhead.
If you use the polymorphic database, it is very easy to enable encryption. The naming option "zcomp" specifies the compression algorithm and the naming option "zkey" specifies the encryption key.
"zcomp" supports "zlib" for the raw format of ZLIB, "def" for the Deflate format, "gz" for the gzip format, "arc" for Arcfour encryption, and "arcz" for Arcfour encryption compressed by ZLIB.
Note that the hash database types (CacheDB, HashDB, DirDB) compress the value of each record only. That is, the key of each record is not compressed there. However, the tree database types (GrassDB, TreeDB, ForestDB) compress all data in database. So, if you want to use the compressor for encryption, choose one of tree database types.
Space Efficiency of On-memory Databases
The stash database (StashDB), the cache hash database (CacheDB), and the cache tree database (GrassDB) are useful to save memory usage of associative array of strings. They can be substituted for std::map in C++, java.lang.Map in Java, and built-in associative array mechanisms of many scripting languages. The stash database and the cache hash database improve space efficiency by serializing the key and the value of each record into a byte array. The cache tree database improves space efficiency by serializing records in each page into a byte array.
For example, if you store ten million records and each is composed of a 8-byte key and a 8-byte value, `std::map<std::string, std::string>' (ProtoTreeDB) uses about 1.2GB memory. In the same situation, the stash database uses 465MB memory; the cache hash database uses 618MB memory; and the cache tree database uses 318MB memory. The cache tree database provides the best space efficiency in this use case. However, as for time efficiency, the stash database and the cache hash database are superior to the cache tree database, due to the difference of hash table and B+ tree. Note that B+ tree is very good at sequeitial access but not suitable for random access. To improve time efficency of B+ tree, set the page size 1024 or less.
If you want to reduce the memory usage extremely, use the cache tree database with the compression option. Moreover, set the bucket number around 5% of the record number, set the page size 32768 or more, and set the capacity of the page cache less than 5% of the total record size. For example, for the above situation of ten million records, the bucket number should be 500 thousand, the page size should be 32768, and the page cache should be 8MB. Those are expressed as "%#opts=c#bnum=500k#psiz=32768#pccap=8m" for the polymorphic database. Consequently, ten million records take 60MB memory only.
Sharing One database by Multiple Processes
Multiple processes cannot access one database file at the same time. A database file is locked by reader-writer lock while a process is connected to it. Note that the `BasicDB::ONOLOCK' option should not be used in order to escape the file locking mechanism. This option is for workaround against some file systems such as NFS, which does not support file locking mechanisms.
If you want to get multiple processes to share one database, use Kyoto Tycoon instead. It is a lightweight database server as network interface to Kyoto Cabinet.
License
To use Kyoto Cabinet, you can choose either GNU GPL or a commercial license. If you choose GPL, the source code of application programs have to be licensed under a license compatible with GPL. If you choose the commercial license, you will be exempted from such duty imposed by GPL.
GNU General Public License
Kyoto Cabinet is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
Kyoto Cabinet is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see `http://www.gnu.org/licenses/'.
FOSS License Exception
The FOSS License Exception is also provided in order to accommodate products under other free and open source licenses. See the body text for details.
Specific FOSS Library Linking Exception
The Specific FOSS Library Linking Exception is also provided in order to be available in some specific FOSS libraries. See the body text for details.
Commercial License
If you use Kyoto Cabinet within a proprietary software, a commercial license is required.
The commercial license allows you to utilize Kyoto Cabinet by including it in your applications for purpose of developing and producing your applications and to utilize Kyoto Cabinet in order to transfer, sale, rent, lease, distribute or sublicense your applications to any third parties. See the license guide for details.
Author
Kyoto Cabinet was written and is maintained by FAL Labs. You can contact the author by e-mail to `info@fallabs.com'.
Kyoto Cabinet: a straightforward implementation of DBM
Copyright (C) 2009-2012 Mikio Hirabayashi
Last Update: Fri, 04 Mar 2011 23:07:26 -0800
Overview
Kyoto Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. Each key must be unique within a database. There is neither concept of data tables nor data types. Records are organized in hash table or B+ tree.
Kyoto Cabinet runs very fast. For example, elapsed time to store one million records is 0.9 seconds for hash database, and 1.1 seconds for B+ tree database. Moreover, the size of database is very small. For example, overhead for a record is 16 bytes for hash database, and 4 bytes for B+ tree database. Furthermore, scalability of Kyoto Cabinet is great. The database size can be up to 8EB (9.22e18 bytes).
Kyoto Cabinet is written in the C++ language, and provided as API of C++, C, Java, Python, Ruby, Perl, and Lua. Kyoto Cabinet is available on platforms which have API conforming to C++03 with the TR1 library extensions. Kyoto Cabinet is a free software licensed under the GNU General Public License.
Documents
The following are documents of Kyoto Cabinet. They are contained also in the source package.
the pointer to the variable into which the size of the region of the return value is assigned.
mode
the compression mode.
Returns:
the pointer to the result data, or NULL on failure.
Note:
Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
the pointer to the variable into which the size of the region of the return value is assigned.
mode
the compression mode.
Returns:
the pointer to the result data, or NULL on failure.
Note:
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x6d.html 0000644 0001750 0001750 00000014063 11757460020 021405 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x73.html 0000644 0001750 0001750 00000051217 11757460020 020314 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_enum.html 0000644 0001750 0001750 00000012115 11757460020 020551 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Enumerations
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1PolyDB-members.html 0000644 0001750 0001750 00000073730 11757460020 024412 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1BasicDB_1_1Logger-members.html 0000644 0001750 0001750 00000011167 11757460020 026304 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1SpinLock-members.html 0000644 0001750 0001750 00000007126 11757460020 024777 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x64.html 0000644 0001750 0001750 00000020470 11757460020 020311 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1BasicDB_1_1Error-members.html 0000644 0001750 0001750 00000022054 11757460020 026153 0 ustar mikio mikio
Kyoto Cabinet: Member List
template<class BASEDB, uint8_t DBTYPE>
class kyotocabinet::PlantDB< BASEDB, DBTYPE >
Plant database.
Parameters:
BASEDB
a class compatible with the file hash database class.
DBTYPE
the database type number of the class.
Note:
This class template is a template for concrete classes to operate tree databases. Template instance classes can be inherited but overwriting methods is forbidden. The class TreeDB is the instance of the file tree database. The class ForestDB is the instance of the directory tree database. Before every database operation, it is necessary to call the BasicDB::open method in order to open a database file and connect the database object to it. To avoid data missing or corruption, it is important to close every database file by the BasicDB::close method when the database is no longer in use. It is forbidden for multible database objects in a process to open the same database at the same time. It is forbidden to share a database object with child processes.
true for writable operation, or false for read-only operation.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
true for writable operation, or false for read-only operation.
Returns:
true on success, or false on failure.
Note:
The operations for specified records are performed atomically and other threads accessing the same records are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
true for writable operation, or false for read-only operation.
checker
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
The whole iteration is performed atomically and other threads are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
This function is for reading records and not for updating ones. The return value of the visitor is just ignored. To avoid deadlock, any explicit database operation must not be performed in this function.
the connection mode. BasicDB::OWRITER as a writer, BasicDB::OREADER as a reader. The following may be added to the writer mode by bitwise-or: BasicDB::OCREATE, which means it creates a new database if the file does not exist, BasicDB::OTRUNCATE, which means it creates a new database regardless if the file exists, BasicDB::OAUTOTRAN, which means each updating operation is performed in implicit transaction, BasicDB::OAUTOSYNC, which means each updating operation is followed by implicit synchronization with the file system. The following may be added to both of the reader mode and the writer mode by bitwise-or: BasicDB::ONOLOCK, which means it opens the database file without file locking, BasicDB::OTRYLOCK, which means locking is performed without blocking, BasicDB::ONOREPAIR, which means the database file is not repaired implicitly even if file destruction is detected.
Returns:
true on success, or false on failure.
Note:
Every opened database must be closed by the BasicDB::close method when it is no longer in use. It is not allowed for two or more database objects in the same process to keep their connections to the same database file at the same time.
Synchronize updated contents with the file and the device.
Parameters:
hard
true for physical synchronization with the device, or false for logical synchronization with the file system.
proc
a postprocessor object. If it is NULL, no postprocessing is performed.
checker
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
The operation of the postprocessor is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Occupy database by locking and do something meanwhile.
Parameters:
writable
true to use writer lock, or false to use reader lock.
proc
a processor object. If it is NULL, no processing is performed.
Returns:
true on success, or false on failure.
Note:
The operation of the processor is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
the optional features by bitwise-or: BasicDB::TSMALL to use 32-bit addressing, BasicDB::TLINEAR to use linear collision chaining, BasicDB::TCOMPRESS to compress each record.
Several built-in comparators are provided. LEXICALCOMP for the default lexical comparator. DECIMALCOMP for the decimal comparator. LEXICALDESCCOMP for the lexical descending comparator. DECIMALDESCCOMP for the lexical descending comparator.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x6c.html 0000644 0001750 0001750 00000024361 11757460020 021406 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x68.html 0000644 0001750 0001750 00000011334 11757460020 020314 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x6f.html 0000644 0001750 0001750 00000034054 11757460020 020376 0 ustar mikio mikio
Kyoto Cabinet: Class Members
the count of the current step of the progress, or -1 if not applicable.
allcnt
the estimation count of all steps of the progress, or -1 if not applicable.
Returns:
true to continue the process, or false to stop the process.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x69.html 0000644 0001750 0001750 00000015307 11757460020 021334 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
true for writable operation, or false for read-only operation.
step
true to move the cursor to the next record, or false for no move.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1LinkedHashMap_1_1Iterator-members.html 0000644 0001750 0001750 00000014520 11757460020 030073 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/structKCIDX-members.html 0000644 0001750 0001750 00000004374 11757460017 021272 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/structKCREC-members.html 0000644 0001750 0001750 00000004664 11757460017 021261 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x6e.html 0000644 0001750 0001750 00000012746 11757460020 020401 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x64.html 0000644 0001750 0001750 00000017103 11757460020 021323 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1DecimalDescendingComparator-members.html 0000644 0001750 0001750 00000006761 11757460020 030633 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1IndexDB-members.html 0000644 0001750 0001750 00000025472 11757460020 024536 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1TaskQueue-members.html 0000644 0001750 0001750 00000011305 11757460020 025156 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1TinyHashMap-members.html 0000644 0001750 0001750 00000013354 11757460020 025442 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1SlottedSpinLock-members.html 0000644 0001750 0001750 00000010032 11757460020 026324 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1CondVar-members.html 0000644 0001750 0001750 00000007517 11757460020 024615 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x6b.html 0000644 0001750 0001750 00000011600 11757460020 020362 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func.html 0000644 0001750 0001750 00000024323 11757460020 020544 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1BasicDB_1_1Cursor-members.html 0000644 0001750 0001750 00000022627 11757460020 026345 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1PolyDB_1_1Cursor-members.html 0000644 0001750 0001750 00000024002 11757460020 026234 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1BasicDB_1_1MetaTrigger-members.html 0000644 0001750 0001750 00000015146 11757460020 027300 0 ustar mikio mikio
Kyoto Cabinet: Member List
the pointer to the variable into which the size of the region of the return value is assigned.
mode
the compression mode.
Returns:
the pointer to the result data, or NULL on failure.
Note:
Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
the pointer to the variable into which the size of the region of the return value is assigned.
mode
the compression mode.
Returns:
the pointer to the result data, or NULL on failure.
Note:
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classes.html 0000644 0001750 0001750 00000052511 11757460020 017156 0 ustar mikio mikio
Kyoto Cabinet: Class Index
If no record corresponds to the key, a new record is created. If the corresponding record exists, the given value is appended at the end of the existing value.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1SlottedRWLock-members.html 0000644 0001750 0001750 00000011012 11757460020 025742 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x63.html 0000644 0001750 0001750 00000040331 11757460020 021321 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/structKCMAPITER-members.html 0000644 0001750 0001750 00000004426 11757460017 021745 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/structKCSTR-members.html 0000644 0001750 0001750 00000004663 11757460017 021317 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1PlantDB_1_1Cursor-members.html 0000644 0001750 0001750 00000024662 11757460020 026403 0 ustar mikio mikio
Kyoto Cabinet: Member List
This function can call the MapReduce::emit method to emit a record. To avoid deadlock, any explicit database operation must not be performed in this function.
This function can call the MapReduce::emit method to emit a record. To avoid deadlock, any explicit database operation must not be performed in this function.
This function can call the MapReduce::emit method to emit a record. To avoid deadlock, any explicit database operation must not be performed in this function.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x75.html 0000644 0001750 0001750 00000013656 11757460020 021336 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1BasicDB-members.html 0000644 0001750 0001750 00000062771 11757460020 024513 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1LinkedHashMap-members.html 0000644 0001750 0001750 00000021020 11757460020 025712 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/structKCCUR-members.html 0000644 0001750 0001750 00000004375 11757460017 021300 0 ustar mikio mikio
Kyoto Cabinet: Member List
template<class STRMAP, uint8_t DBTYPE>
class kyotocabinet::ProtoDB< STRMAP, DBTYPE >
Prototype implementation of database with STL.
Parameters:
STRMAP
a class compatible with the map class of STL.
DBTYPE
the database type number of the class.
Note:
This class template is a template for concrete classes which wrap data structures compatible with std::map. Template instance classes can be inherited but overwriting methods is forbidden. The class ProtoHashDB is the instance using std::unordered_map. The class ProtoTreeDB is the instance using std::map. Before every database operation, it is necessary to call the BasicDB::open method in order to open a database file and connect the database object to it. To avoid data missing or corruption, it is important to close every database file by the BasicDB::close method when the database is no longer in use. It is forbidden for multible database objects in a process to open the same database at the same time. It is forbidden to share a database object with child processes.
true for writable operation, or false for read-only operation.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
true for writable operation, or false for read-only operation.
Returns:
true on success, or false on failure.
Note:
The operations for specified records are performed atomically and other threads accessing the same records are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
true for writable operation, or false for read-only operation.
checker
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
The whole iteration is performed atomically and other threads are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
This function is for reading records and not for updating ones. The return value of the visitor is just ignored. To avoid deadlock, any explicit database operation must not be performed in this function.
the connection mode. BasicDB::OWRITER as a writer, BasicDB::OREADER as a reader. The following may be added to the writer mode by bitwise-or: BasicDB::OCREATE, which means it creates a new database if the file does not exist, BasicDB::OTRUNCATE, which means it creates a new database regardless if the file exists, BasicDB::OAUTOTRAN, which means each updating operation is performed in implicit transaction, BasicDB::OAUTOSYNC, which means each updating operation is followed by implicit synchronization with the file system. The following may be added to both of the reader mode and the writer mode by bitwise-or: BasicDB::ONOLOCK, which means it opens the database file without file locking, BasicDB::OTRYLOCK, which means locking is performed without blocking, BasicDB::ONOREPAIR, which means the database file is not repaired implicitly even if file destruction is detected.
Returns:
true on success, or false on failure.
Note:
Every opened database must be closed by the BasicDB::close method when it is no longer in use. It is not allowed for two or more database objects in the same process to keep their connections to the same database file at the same time.
Synchronize updated contents with the file and the device.
Parameters:
hard
true for physical synchronization with the device, or false for logical synchronization with the file system.
proc
a postprocessor object. If it is NULL, no postprocessing is performed.
checker
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
The operation of the postprocessor is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Occupy database by locking and do something meanwhile.
Parameters:
writable
true to use writer lock, or false to use reader lock.
proc
a processor object. If it is NULL, no processing is performed.
Returns:
true on success, or false on failure.
Note:
The operation of the processor is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x77.html 0000644 0001750 0001750 00000012411 11757460020 020311 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x76.html 0000644 0001750 0001750 00000012267 11757460020 020321 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Check whether the database was reorganized or not.
Friends
class
PlantDB< CacheDB, BasicDB::TYPEGRASS >
Detailed Description
On-memory hash database with LRU deletion.
Note:
This class is a concrete class to operate a hash database on memory. This class can be inherited but overwriting methods is forbidden. Before every database operation, it is necessary to call the CacheDB::open method in order to open a database file and connect the database object to it. To avoid data missing or corruption, it is important to close every database file by the CacheDB::close method when the database is no longer in use. It is forbidden for multible database objects in a process to open the same database at the same time. It is forbidden to share a database object with child processes.
true for writable operation, or false for read-only operation.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
true for writable operation, or false for read-only operation.
Returns:
true on success, or false on failure.
Note:
The operations for specified records are performed atomically and other threads accessing the same records are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
true for writable operation, or false for read-only operation.
checker
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
The whole iteration is performed atomically and other threads are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
This function is for reading records and not for updating ones. The return value of the visitor is just ignored. To avoid deadlock, any explicit database operation must not be performed in this function.
the connection mode. CacheDB::OWRITER as a writer, CacheDB::OREADER as a reader. The following may be added to the writer mode by bitwise-or: CacheDB::OCREATE, which means it creates a new database if the file does not exist, CacheDB::OTRUNCATE, which means it creates a new database regardless if the file exists, CacheDB::OAUTOTRAN, which means each updating operation is performed in implicit transaction, CacheDB::OAUTOSYNC, which means each updating operation is followed by implicit synchronization with the file system. The following may be added to both of the reader mode and the writer mode by bitwise-or: CacheDB::ONOLOCK, which means it opens the database file without file locking, CacheDB::OTRYLOCK, which means locking is performed without blocking, CacheDB::ONOREPAIR, which means the database file is not repaired implicitly even if file destruction is detected.
Returns:
true on success, or false on failure.
Note:
Every opened database must be closed by the CacheDB::close method when it is no longer in use. It is not allowed for two or more database objects in the same process to keep their connections to the same database file at the same time.
Synchronize updated contents with the file and the device.
Parameters:
hard
true for physical synchronization with the device, or false for logical synchronization with the file system.
proc
a postprocessor object. If it is NULL, no postprocessing is performed.
checker
a progress checker object. If it is NULL, no checking is performed.
Returns:
true on success, or false on failure.
Note:
The operation of the postprocessor is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Occupy database by locking and do something meanwhile.
Parameters:
writable
true to use writer lock, or false to use reader lock.
proc
a processor object. If it is NULL, no processing is performed.
Returns:
true on success, or false on failure.
Note:
The operation of the processor is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Check whether the database was reorganized or not.
Returns:
true if reorganized, or false if not.
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x6f.html 0000644 0001750 0001750 00000024236 11757460020 021412 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Kyoto Cabinet: a straightforward implementation of DBM
Introduction
Kyoto Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. Each key must be unique within a database. There is neither concept of data tables nor data types. Records are organized in hash table or B+ tree.
The following access methods are provided to the database: storing a record with a key and a value, deleting a record by a key, retrieving a record by a key. Moreover, traversal access to every key are provided. These access methods are similar to ones of the original DBM (and its followers: NDBM and GDBM) library defined in the UNIX standard. Kyoto Cabinet is an alternative for the DBM because of its higher performance.
Each operation of the hash database has the time complexity of "O(1)". Therefore, in theory, the performance is constant regardless of the scale of the database. In practice, the performance is determined by the speed of the main memory or the storage device. If the size of the database is less than the capacity of the main memory, the performance will seem on-memory speed, which is faster than std::map of STL. Of course, the database size can be greater than the capacity of the main memory and the upper limit is 8 exabytes. Even in that case, each operation needs only one or two seeking of the storage device.
Each operation of the B+ tree database has the time complexity of "O(log N)". Therefore, in theory, the performance is logarithmic to the scale of the database. Although the performance of random access of the B+ tree database is slower than that of the hash database, the B+ tree database supports sequential access in order of the keys, which realizes forward matching search for strings and range search for integers. The performance of sequential access is much faster than that of random access.
As the API is based on object-oriented design, the hash database and the the B+ tree database have same methods which inherited from the upper abstract class. Beside them, seven kinds of databases are provided under the same base class. The prototype hash database is powered by the standard container of std::unordered_map. The prototype tree database is powered by the standard container of std::map. The stash database is powered by the original implementation of naive hash map saving memory. The cache hash database is powered by the original implementation of doubly-linked hash map with LRU deletion algorithm. The cache tree database is powered by the cache hash database and provides B+ tree mechanism. The directory hash database is powered by the directory mechanism of the file system and stores records as respective files in a directory. The directory tree database is powered by the directory hash database and provides B+ tree mechanism. All databases have practical utility methods related to transaction and cursor. Programs for command line interface are also included in the package.
All databases have practical utility methods related to transaction and cursor. Programs for command line interface are also included in the package.
The following classes are most important. If you are new to Kyoto Cabinet, learn the polymorphic database first.
The following code is a more complex example, which uses the Visitor pattern.
#include <kcpolydb.h>using namespace std;
using namespace kyotocabinet;
// main routineint main(int argc, char** argv) {
// create the database objectPolyDB db;
// open the databaseif (!db.open("casket.kch", PolyDB::OREADER)) {
cerr << "open error: " << db.error().name() << endl;
}
// define the visitorclass VisitorImpl : publicDB::Visitor {
// call back function for an existing recordconstchar* visit_full(constchar* kbuf, size_t ksiz,
constchar* vbuf, size_t vsiz, size_t *sp) {
cout << string(kbuf, ksiz) << ":" << string(vbuf, vsiz) << endl;
return NOP;
}
// call back function for an empty record spaceconstchar* visit_empty(constchar* kbuf, size_t ksiz, size_t *sp) {
cerr << string(kbuf, ksiz) << " is missing" << endl;
return NOP;
}
} visitor;
// retrieve a record with visitorif (!db.accept("foo", 3, &visitor, false) ||
!db.accept("dummy", 5, &visitor, false)) {
cerr << "accept error: " << db.error().name() << endl;
}
// traverse records with visitorif (!db.iterate(&visitor, false)) {
cerr << "iterate error: " << db.error().name() << endl;
}
// close the databaseif (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
The following code is an example of word counting with the MapReduce framework.
#include <kcpolydb.h>#include <kcdbext.h>using namespace std;
using namespace kyotocabinet;
// main routineint main(int argc, char** argv) {
// create the database objectPolyDB db;
// open the databaseif (!db.open()) {
cerr << "open error: " << db.error().name() << endl;
}
// store records
db.set("1", "this is a pen");
db.set("2", "what a beautiful pen this is");
db.set("3", "she is beautiful");
// define the mapper and the reducerclass MapReduceImpl : publicMapReduce {
// call back function of the mapperbool map(constchar* kbuf, size_t ksiz, constchar* vbuf, size_t vsiz) {
vector<string> words;
strsplit(string(vbuf, vsiz), ' ', &words);
for (vector<string>::iterator it = words.begin();
it != words.end(); it++) {
emit(it->data(), it->size(), "", 0);
}
returntrue;
}
// call back function of the reducerbool reduce(constchar* kbuf, size_t ksiz, ValueIterator* iter) {
size_t count = 0;
constchar* vbuf;
size_t vsiz;
while ((vbuf = iter->next(&vsiz)) != NULL) {
count++;
}
cout << string(kbuf, ksiz) << ": " << count << endl;
returntrue;
}
} mr;
// execute the MapReduce processif (!mr.execute(&db)) {
cerr << "MapReduce error: " << db.error().name() << endl;
}
// close the databaseif (!db.close()) {
cerr << "close error: " << db.error().name() << endl;
}
return 0;
}
The C language binding is also provided as a wrapper of the polymorphic database API. The following code is an example.
#include <kclangc.h>/* call back function for an existing record */constchar* visitfull(constchar* kbuf, size_t ksiz,
constchar* vbuf, size_t vsiz, size_t *sp, void* opq) {
fwrite(kbuf, 1, ksiz, stdout);
printf(":");
fwrite(vbuf, 1, vsiz, stdout);
printf("\n");
returnKCVISNOP;
}
/* call back function for an empty record space */constchar* visitempty(constchar* kbuf, size_t ksiz, size_t *sp, void* opq) {
fwrite(kbuf, 1, ksiz, stdout);
printf(" is missing\n");
returnKCVISNOP;
}
/* main routine */int main(int argc, char** argv) {
KCDB* db;
KCCUR* cur;
char *kbuf, *vbuf;
size_t ksiz, vsiz;
constchar *cvbuf;
/* create the database object */
db = kcdbnew();
/* open the database */if (!kcdbopen(db, "casket.kch", KCOWRITER | KCOCREATE)) {
fprintf(stderr, "open error: %s\n", kcecodename(kcdbecode(db)));
}
/* store records */if (!kcdbset(db, "foo", 3, "hop", 3) ||
!kcdbset(db, "bar", 3, "step", 4) ||
!kcdbset(db, "baz", 3, "jump", 4)) {
fprintf(stderr, "set error: %s\n", kcecodename(kcdbecode(db)));
}
/* retrieve a record */
vbuf = kcdbget(db, "foo", 3, &vsiz);
if (vbuf) {
printf("%s\n", vbuf);
kcfree(vbuf);
} else {
fprintf(stderr, "get error: %s\n", kcecodename(kcdbecode(db)));
}
/* traverse records */
cur = kcdbcursor(db);
kccurjump(cur);
while ((kbuf = kccurget(cur, &ksiz, &cvbuf, &vsiz, 1)) != NULL) {
printf("%s:%s\n", kbuf, cvbuf);
kcfree(kbuf);
}
kccurdel(cur);
/* retrieve a record with visitor */if (!kcdbaccept(db, "foo", 3, visitfull, visitempty, NULL, 0) ||
!kcdbaccept(db, "dummy", 5, visitfull, visitempty, NULL, 0)) {
fprintf(stderr, "accept error: %s\n", kcecodename(kcdbecode(db)));
}
/* traverse records with visitor */if (!kcdbiterate(db, visitfull, NULL, 0)) {
fprintf(stderr, "iterate error: %s\n", kcecodename(kcdbecode(db)));
}
/* close the database */if (!kcdbclose(db)) {
fprintf(stderr, "close error: %s\n", kcecodename(kcdbecode(db)));
}
/* delete the database object */kcdbdel(db);
return 0;
}
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x72.html 0000644 0001750 0001750 00000030223 11757460020 021320 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x65.html 0000644 0001750 0001750 00000017454 11757460020 021335 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1AtomicInt64-members.html 0000644 0001750 0001750 00000014050 11757460020 025310 0 ustar mikio mikio
Kyoto Cabinet: Member List
true for writable operation, or false for read-only operation.
step
true to move the cursor to the next record, or false for no move.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/structKCLIST-members.html 0000644 0001750 0001750 00000004404 11757460017 021413 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:35 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x74.html 0000644 0001750 0001750 00000032672 11757460020 021334 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
true for writable operation, or false for read-only operation.
step
true to move the cursor to the next record, or false for no move.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x66.html 0000644 0001750 0001750 00000013647 11757460020 021336 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
the pointer to the variable into which the size of the region of the return value is assigned.
Returns:
the pointer to the result data, or NULL on failure.
Note:
Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
the pointer to the variable into which the size of the region of the return value is assigned.
Returns:
the pointer to the result data, or NULL on failure.
Note:
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1ProtoDB_1_1Cursor-members.html 0000644 0001750 0001750 00000024662 11757460020 026430 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x7e.html 0000644 0001750 0001750 00000031507 11757460020 020376 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1Comparator-members.html 0000644 0001750 0001750 00000005775 11757460020 025374 0 ustar mikio mikio
Kyoto Cabinet: Member List
true for writable operation, or false for read-only operation.
step
true to move the cursor to the next record, or false for no move.
Returns:
true on success, or false on failure.
Note:
The operation for each record is performed atomically and other threads accessing the same record are blocked. To avoid deadlock, any explicit database operation must not be performed in this function.
the pointer to the variable into which the size of the region of the return value is assigned.
step
true to move the cursor to the next record, or false for no move.
Returns:
the pointer to the key region of the current record, or NULL on failure.
Note:
If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
the pointer to the variable into which the size of the region of the return value is assigned.
step
true to move the cursor to the next record, or false for no move.
Returns:
the pointer to the value region of the current record, or NULL on failure.
Note:
If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
Get a pair of the key and the value of the current record.
Parameters:
ksp
the pointer to the variable into which the size of the region of the return value is assigned.
vbp
the pointer to the variable into which the pointer to the value region is assigned.
vsp
the pointer to the variable into which the size of the value region is assigned.
step
true to move the cursor to the next record, or false for no move.
Returns:
the pointer to the key region, or NULL on failure.
Note:
If the cursor is invalidated, NULL is returned. Because an additional zero code is appended at the end of each region of the key and the value, each region can be treated as a C-style string. The return value should be deleted explicitly by the caller with the detele[] operator.
the connection mode. File::OWRITER as a writer, File::OREADER as a reader. The following may be added to the writer mode by bitwise-or: File::OCREATE, which means it creates a new file if the file does not exist, File::OTRUNCATE, which means it creates a new file regardless if the file exists. The following may be added to both of the reader mode and the writer mode by bitwise-or: File::ONOLOCK, which means it opens the file without file locking, File::TRYLOCK, which means locking is performed without blocking.
the pointer to the variable into which the size of the region of the return value is assigned.
limit
the limit length to read. If it is nagative, no limit is specified.
Returns:
the pointer to the region of the read data, or NULL on failure.
Note:
Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a C-style string. Because the region of the return value is allocated with the the new[] operator, it should be released with the delete[] operator when it is no longer in use.
Get the reference of the value of the last record.
Detailed Description
template<class KEY, class VALUE, class HASH = std::hash<KEY>, class EQUALTO = std::equal_to<KEY>>
class kyotocabinet::LinkedHashMap< KEY, VALUE, HASH, EQUALTO >
Doubly-linked hash map.
Parameters:
KEY
the key type.
VALUE
the value type.
HASH
the hash functor.
EQUALTO
the equality checking functor.
Member Enumeration Documentation
template<class KEY , class VALUE , class HASH = std::hash<KEY>, class EQUALTO = std::equal_to<KEY>>
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1DirDB-members.html 0000644 0001750 0001750 00000103064 11757460020 024177 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1DB_1_1Cursor-members.html 0000644 0001750 0001750 00000020660 11757460020 025376 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1ScopedSpinRWLock-members.html 0000644 0001750 0001750 00000006021 11757460020 026377 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x7e.html 0000644 0001750 0001750 00000031407 11757460020 021410 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1CacheDB_1_1Cursor-members.html 0000644 0001750 0001750 00000024062 11757460020 026322 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_eval.html 0000644 0001750 0001750 00000050621 11757460020 020540 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Enumerator
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x70.html 0000644 0001750 0001750 00000016474 11757460020 020317 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1ScopedMutex-members.html 0000644 0001750 0001750 00000005674 11757460020 025523 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1CacheDB-members.html 0000644 0001750 0001750 00000106362 11757460017 024476 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x73.html 0000644 0001750 0001750 00000047214 11757460020 021331 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1ArcfourCompressor-members.html 0000644 0001750 0001750 00000010137 11757460020 026727 0 ustar mikio mikio
Kyoto Cabinet: Member List
Check whether a string matches the regular expression.
Parameters:
str
the string.
alt
the alternative string with which each substring is replaced. Each "$" in the string escapes the following character. Special escapes "$1" through "$9" refer to partial substrings corresponding to sub-expressions in the regular expression. "$0" and "$&" refer to the whole matching substring.
Check whether a string matches the regular expression.
Parameters:
str
the string.
pattern
the matching pattern.
alt
the alternative string with which each substring is replaced. Each "$" in the string escapes the following character. Special escapes "$1" through "$9" refer to partial substrings corresponding to sub-expressions in the regular expression. "$0" and "$&" refer to the whole matching substring.
opts
the optional features by bitwise-or: Regex::IGNCASE for case-insensitive matching, Regex::MATCHONLY for matching only usage.
Returns:
the result string.
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_0x69.html 0000644 0001750 0001750 00000020053 11757460020 020313 0 ustar mikio mikio
Kyoto Cabinet: Class Members
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1ScopedSpinLock-members.html 0000644 0001750 0001750 00000005751 11757460020 026137 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x76.html 0000644 0001750 0001750 00000012045 11757460020 021326 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1LZMA-members.html 0000644 0001750 0001750 00000010424 11757460020 024013 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1TinyHashMap_1_1Iterator-members.html 0000644 0001750 0001750 00000011207 11757460020 027607 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1DirDB_1_1Cursor-members.html 0000644 0001750 0001750 00000023722 11757460020 026037 0 ustar mikio mikio
Kyoto Cabinet: Member List
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/functions_func_0x6e.html 0000644 0001750 0001750 00000011075 11757460020 021406 0 ustar mikio mikio
Kyoto Cabinet: Class Members - Functions
Generated on Fri May 25 2012 01:21:36 for Kyoto Cabinet by 1.7.6.1
kyotocabinet-1.2.79/doc/api/classkyotocabinet_1_1LexicalDescendingComparator-members.html 0000644 0001750 0001750 00000006761 11757460020 030656 0 ustar mikio mikio
Kyoto Cabinet: Member List