Permalink
Browse files

Merge remote-tracking branch 'origin/dev'

  • Loading branch information...
2 parents edc0528 + 7536ecc commit 39613d1216b8f4b21d0aa3dadfb7cbd944e05e4b @tatsuya6502 tatsuya6502 committed Feb 3, 2013
View
@@ -0,0 +1,4 @@
+Original authors "Hibari developers", in chronological order, are:
+
+ Gemini Mobile Technologies, Inc.
+ Cloudian, Inc.
View
@@ -1,4 +1,4 @@
-Copyright (c) 2005-2011 Gemini Mobile Technologies, Inc. All rights reserved.
+Copyright (c) 2005-2013 Hibari developers. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
168 Makefile
@@ -13,7 +13,31 @@ PLT=$(HOME)/.dialyzer_plt.$(OTPREL)
DIALYZE_IGNORE_WARN?=dialyze-ignore-warnings.txt
DIALYZE_NOSPEC_IGNORE_WARN?=dialyze-nospec-ignore-warnings.txt
-.PHONY: all test bootstrap-package check-package package generate compile eunit build-plt check-plt dialyze dialyze-spec dialyze-nospec dialyze-eunit dialyze-eunit-spec dialyze-eunit-nospec ctags etags clean realclean distclean
+ifeq ($(shell uname -s),Darwin)
+ ifeq ($(shell uname -m),x86_64)
+ otp_configure_flags= --enable-darwin-64bit
+ else
+ otp_configure_flags= --enable-darwin-universal
+ endif
+else
+ otp_configure_flags=
+endif
+
+.PHONY: all test \
+ compile compile-eqc compile-proper \
+ eunit-compile eqc-compile proper-compile \
+ eunit eunit-core eunit-thrift \
+ eqc proper \
+ doc \
+ build-plt check-plt \
+ dialyze dialyze-spec dialyze-nospec \
+ dialyze-eunit dialyze-eunit-spec dialyze-eunit-nospec \
+ dialyze-eqc dialyze-eqc-spec dialyze-eqc-nospec \
+ dialyze-proper dialyze-proper-spec dialyze-proper-nospec \
+ ctags etags \
+ clean realclean distclean \
+ otp_make_release_tests otp_run_release_tests \
+ bootstrap-package check-package package generate
all: compile
@@ -26,7 +50,7 @@ bootstrap-package: package
@mkdir ./tmp
tar -C ./tmp -xzf ../$(RELTGZ)
./tmp/hibari/bin/hibari start
- @sleep 5
+ @sleep 10
./tmp/hibari/bin/hibari-admin bootstrap
@sleep 1
@@ -51,15 +75,55 @@ generate: clean compile
@find ./lib -name svn -type l | xargs rm -f
@find ./lib -name rr-cache -type l | xargs rm -f
./rebar generate
- @perl -i -pe 's/%% (.* generated) at .*//g;' rel/hibari/releases/*/*.{rel,script}
+ @perl -i -pe 's/%% (.* generated) at .*//g;' \
+ rel/hibari/releases/*/*.rel \
+ rel/hibari/releases/*/*.script
compile:
@echo "compiling: $(RELPKG) ..."
./rebar compile
-eunit: compile
+compile-eqc:
+ @echo "compiling-eqc: $(RELPKG) ..."
+ ./rebar compile -D QC -D QC_EQC
+
+compile-proper:
+ @echo "compiling-proper: $(RELPKG) ..."
+ ./rebar compile -D QC -D QC_PROPER
+
+eunit-compile: compile
+ @echo "eunit test compiling: $(RELPKG) ..."
+ ./rebar eunit-compile
+
+eqc-compile: compile-eqc
+ @echo "eqc test compiling: $(RELPKG) ..."
+ ./rebar eunit-compile -D QC -D QC_EQC
+
+proper-compile: compile-proper
+ @echo "proper test compiling: $(RELPKG) ..."
+ ./rebar eunit-compile -D QC -D QC_PROPER
+
+eunit: eunit-compile
@echo "eunit testing: $(RELPKG) ..."
- ./rebar eunit
+ ./rebar eunit skip_apps=meck
+
+eunit-core: eunit-compile
+ @echo "eunit testing (core): $(RELPKG) ..."
+ ./rebar eunit skip_apps='meck,asciiedoc,edown,gdss_ubf_proto,ubf_thrift,ubf'
+
+eunit-thrift: eunit-compile
+ @echo "eunit testing (thrift): $(RELPKG) ..."
+ ./rebar eunit skip_apps='gdss_brick,gdss_client,gdss_admin,cluster_info,partition_detector,congestion_watcher,gmt_util,riak_err,meck,asciiedoc,edown'
+
+eqc: eqc-compile
+ @echo "eqc testing: $(RELPKG) ... not implemented yet"
+
+proper: proper-compile
+ @echo "proper testing: $(RELPKG) ... not implemented yet"
+
+doc: compile
+ @echo "edoc generating: $(RELPKG) ..."
+ ./rebar doc
build-plt: $(PLT)
@@ -70,26 +134,47 @@ dialyze: dialyze-spec
dialyze-spec: build-plt clean compile
@echo "dialyzing w/spec: $(RELPKG) ..."
- find ./lib -wholename "*/meck/test/cover_test_module.beam" -exec rm {} \;
dialyzer --plt $(PLT) -Wunmatched_returns -r ./lib | fgrep -v -f $(DIALYZE_IGNORE_WARN)
dialyze-nospec: build-plt clean compile
@echo "dialyzing w/o spec: $(RELPKG) ..."
- find ./lib -wholename "*/meck/test/cover_test_module.beam" -exec rm {} \;
- dialyzer --plt $(PLT) --no_spec -r ./lib | fgrep -v -f $(DIALYZE_NOSPEC_IGNORE_WARN)
+ dialyzer --plt $(PLT) --no_spec -Wno_undefined_callbacks -r ./lib | fgrep -v -f $(DIALYZE_NOSPEC_IGNORE_WARN)
dialyze-eunit: dialyze-eunit-spec
-dialyze-eunit-spec: build-plt clean compile
+dialyze-eunit-spec: build-plt clean eunit-compile
@echo "dialyzing .eunit w/spec: $(RELPKG) ..."
- ./rebar eunit-compile
#TODO dialyzer --plt $(PLT) -Wunmatched_returns -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_IGNORE_WARN)
dialyzer --plt $(PLT) -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_IGNORE_WARN)
-dialyze-eunit-nospec: build-plt clean compile
+dialyze-eunit-nospec: build-plt clean eunit-compile
@echo "dialyzing .eunit w/o spec: $(RELPKG) ..."
./rebar eunit-compile
- dialyzer --plt $(PLT) --no_spec -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_NOSPEC_IGNORE_WARN)
+ dialyzer --plt $(PLT) --no_spec -Wno_undefined_callbacks -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_NOSPEC_IGNORE_WARN)
+
+dialyze-eqc: dialyze-eqc-spec
+
+dialyze-eqc-spec: build-plt clean eqc-compile
+ @echo "dialyzing .eqc w/spec: $(RELPKG) ..."
+ #TODO dialyzer --plt $(PLT) -Wunmatched_returns -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_IGNORE_WARN)
+ dialyzer --plt $(PLT) -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_IGNORE_WARN)
+
+dialyze-eqc-nospec: build-plt clean eqc-compile
+ @echo "dialyzing .eqc w/o spec: $(RELPKG) ..."
+ ./rebar eqc-compile
+ dialyzer --plt $(PLT) --no_spec -Wno_undefined_callbacks -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_NOSPEC_IGNORE_WARN)
+
+dialyze-proper: dialyze-proper-spec
+
+dialyze-proper-spec: build-plt clean proper-compile
+ @echo "dialyzing .proper w/spec: $(RELPKG) ..."
+ #TODO dialyzer --plt $(PLT) -Wunmatched_returns -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_IGNORE_WARN)
+ dialyzer --plt $(PLT) -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_IGNORE_WARN)
+
+dialyze-proper-nospec: build-plt clean proper-compile
+ @echo "dialyzing .proper w/o spec: $(RELPKG) ..."
+ ./rebar proper-compile
+ dialyzer --plt $(PLT) --no_spec -Wno_undefined_callbacks -r `find ./lib -name .eunit -print | xargs echo` | fgrep -v -f $(DIALYZE_NOSPEC_IGNORE_WARN)
ctags:
find ./lib -name "*.[he]rl" -print | fgrep -v .eunit | ctags -
@@ -142,3 +227,62 @@ $(PLT):
tools \
webtool \
xmerl
+
+otp: otp.git
+ make -C $(CURDIR)/otp.git install
+
+otp.git:
+ rm -rf $(CURDIR)/otp
+ mkdir -p $(CURDIR)/otp
+ git clone git://github.com/erlang/otp.git otp.git
+ (cd $(CURDIR)/otp.git && \
+ git co OTP_R15B && \
+ ./otp_build autoconf && \
+ ./configure \
+ --disable-hipe \
+ --enable-debug \
+ --enable-kernel-poll \
+ --enable-threads \
+ --enable-dynamic-ssl-lib \
+ --enable-shared-zlib \
+ --enable-smp-support \
+ $(otp_configure_flags) \
+ --prefix=$(CURDIR)/otp)
+ make -C $(CURDIR)/otp.git
+
+otp-debug: otp.git
+ env ERL_TOP=$(CURDIR)/otp.git make -C otp.git/erts/emulator debug FLAVOR=smp
+
+otp-valgrind: otp.git
+ env ERL_TOP=$(CURDIR)/otp.git make -C otp.git/erts/emulator valgrind FLAVOR=smp
+
+cerl-debug: otp.git
+ env ERL_TOP=$(CURDIR)/otp.git otp.git/bin/cerl -debug
+
+cerl-valgrind: otp.git
+ env ERL_TOP=$(CURDIR)/otp.git otp.git/bin/cerl -valgrind
+
+## See https://github.com/erlang/otp/wiki/Running-tests for details
+otp_make_release_tests: otp.git
+ rm -rf otp.git/release/tests
+ env ERL_TOP=$(CURDIR)/otp.git ERL_LIBS=$(CURDIR)/otp.git/lib \
+ make -C otp.git release_tests
+
+otp_run_release_tests: otp_make_release_tests
+ @echo ""
+ @echo "** Warning killing all local beam, beam.smp, and epmd programs **"
+ @echo ""
+ sleep 10
+ killall -q -9 beam || true
+ killall -q -9 beam.smp || true
+ killall -q -9 epmd || true
+ @echo ""
+ @echo "** Open '$(CURDIR)/otp.git/release/tests/test_server/index.html' in your browser**"
+ @echo ""
+ sleep 10
+ (cd $(CURDIR)/otp.git/release/tests/test_server && \
+ env ERL_TOP=$(CURDIR)/otp.git ERL_LIBS=$(CURDIR)/otp.git/lib \
+ $(CURDIR)/otp.git/bin/erl \
+ -s ts install \
+ -s ts run \
+ -s erlang halt)
View
130 README.md
@@ -0,0 +1,130 @@
+# Welcome to Hibari
+
+Hibari is a production-ready, distributed, key-value, big-data
+store (NOSQL database). Hibari uses chain replication for strong
+consistency, high-availability, and durability. Hibari has excellent
+performance especially for read and large value operations.
+
+**Product Info** (Cloudian, Inc.)
+
+- [Hibari White Paper](http://www.cloudian.com/cloud-storage-products/white-papers/2011-08-Hibari-Whitepaper.pdf) (PDF format, 558KB)
+- [Hibari NOSQL Database (Japanese)](http://www.cloudian.jp/technologies/hibari-nosql-database.html)
+
+
+# News
+
+- Feb 4, 2013 - Hibari v0.1.10 Released. [Release Note](https://github.com/hibari/hibari/blob/master/relnotes/v0.1.10.txt)
+
+
+# Quick Start
+
+Please read Getting Started section of Hibari Application Developer Guide.
+
+- [English Version](http://hibari.github.com/hibari-doc/hibari-app-developer-guide.en.html#getting-started)
+- [Japanese Version](http://hibari.github.com/hibari-doc/hibari-app-developer-guide.ja.html#getting-started)
+
+
+# Hibari Documentation
+
+- [English Version](http://hibari.github.com/hibari-doc/)
+- [Japanese Version](http://hibari.github.com/hibari-doc/)
+
+They are a bit outdated. Documentation rework is planned for Hibari
+v0.6.
+
+
+# Mailing Lists
+
+- [Google Group **hibaridb-users** for English Speakers](http://groups.google.com/forum/#!forum/hibaridb-users)
+- [Google Group **hibaridb-users-ja** for Japanese Speakers](http://groups.google.com/forum/#!forum/hibaridb-users-ja)
+
+# Hibari Clients
+
+As of Hibari v0.1 (since year 2010), only the native Erlang client is
+used in production. All other client APIs (Thrift, JSON-RPC, UBF, and
+S3) are still in proof of concept stage and only implement basic
+operations.
+
+Hibari v0.5 will have a full-featured Thrift client.
+
+
+# Roadmap
+
+Short-term roadmap (as of February 2013)
+
+## v0.1 series (unstable)
+
+- v0.1.10
+ * Minor bug fixes
+ * Update for Erlang/OTP R15
+ * Support for building on Ubuntu, including ARMv7 architecture
+ * Move S3 and JSON-RPC components out from Hibari distribution
+ (remove from the `repo` manifests.) S3 and JSON-RPC will become
+ separate projects and will use `rebar` to manage
+ dependencies. (Hibari will continue using `repo`)
+
+
+## v0.5 series (unstable)
+
+- v0.5
+ * A complete Thrift API (`do`, `get_many`, and `testset` flag for
+ `set` and `replace`)
+ * More `hibari` and `hibari-admin` commands (e.g. control and
+ monitor scavenger)
+ * Delete table operation, which is missing in v0.1 series
+ * Server-side timestamp and rename (Server-side timestamp is
+ required by Thrift API)
+ * Server-side counter
+ * The latest external libraries (ubf, ubf-thrift, riak-err)
+ * Update for Erlang/OTP R16
+ * Basho Bench driver
+
+
+## v0.6 series (stable)
+
+- v0.6
+ * Source code package. Application developers can build Hibari
+ without `repo` by using this package. (Hibari developers will
+ continue using `repo`.)
+ * Documentation rework
+ * Sample codes
+ * Cookbook for Opscode Chef for automated single-node and multi-node
+ deployments
+ * More QuickCheck and EUnit test cases
+
+
+## Unscheduled Features
+
+- MapReduce (mruby?)
+- SNMP support
+- LETS (Google LevelDB) or HanoiDB as an alternative key storage for
+ optimizing RAM usage
+- Scavenger enhancements
+- Big writes/reads (`append` to a value and `partial_read` from a value)
+
+
+## License
+
+Copyright (c) 2005-2013 Hibari developers. All rights reserved.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+
+## Note for License
+
+Hibari has decided to display "Hibari developers" as the copyright
+holder name in the source code files and manuals. Actual copyright
+holder names (contributors) will be listed in the AUTHORS file.
+
+
+_EOF_
@@ -14,9 +14,12 @@ leexinc.hrl:243: The pattern <Rest, Line, {'token', _T, Push}, Error> can never
leexinc.hrl:248: The pattern <Rest, Line, {'end_token', _T, Push}, Error> can never match the type <_,_,'error' | 'skip_token',_>
leexinc.hrl:253: The pattern <Rest, Line, {'skip_token', Push}, Error> can never match the type <_,_,'error',_>
leexinc.hrl:256: The pattern <Rest, Line, {'error', _S}, Error> can never match the type <_,_,'error',_>
-yeccpre.hrl:49: Function return_error/2 will never be called
brick_chainmon.erl:1096: The created fun has no local return
brick_ets.erl:3053: The created fun has no local return
brick_mboxmon.erl:313: The created fun has no local return
brick_server.erl:4995: The created fun has no local return
+meck.erl:644: The pattern <Mod, Func, Args, [Meck = {'meck', 'exec', _Arity} | Stack]> can never match the type <atom(),_,_,[{atom(),atom(),[any()] | byte(),[any()]},...]>
+partition_detector_sup.erl:32: The return type {'ok',_} in the specification of init/1 is not a subtype of 'ignore' | {'ok',{{'one_for_all',non_neg_integer(),non_neg_integer()} | {'one_for_one',non_neg_integer(),non_neg_integer()} | {'rest_for_one',non_neg_integer(),non_neg_integer()} | {'simple_one_for_one',non_neg_integer(),non_neg_integer()},[{_,{atom() | tuple(),atom(),'undefined' | [any()]},'permanent' | 'temporary' | 'transient','brutal_kill' | 'infinity' | non_neg_integer(),'supervisor' | 'worker','dynamic' | [atom() | tuple()]}]}}, which is the expected return type for the callback of supervisor behaviour
riak_err_handler.erl:161: Expression produces a value of type 'ok' | {'error',atom()}, but this value is unmatched
+riak_err_monitor.erl:84: The specified type for the 2nd argument of handle_call/3 (reference()) is not a supertype of {pid(),_}, which is expected type for this argument in the callback of the gen_server behaviour
+riak_err_sup.erl:39: The return type {'ok',{{'one_for_one',1000,3600},[tuple()]}} in the specification of init/1 is not a subtype of 'ignore' | {'ok',{{'one_for_all',non_neg_integer(),non_neg_integer()} | {'one_for_one',non_neg_integer(),non_neg_integer()} | {'rest_for_one',non_neg_integer(),non_neg_integer()} | {'simple_one_for_one',non_neg_integer(),non_neg_integer()},[{_,{atom() | tuple(),atom(),'undefined' | [any()]},'permanent' | 'temporary' | 'transient','brutal_kill' | 'infinity' | non_neg_integer(),'supervisor' | 'worker','dynamic' | [atom() | tuple()]}]}}, which is the expected return type for the callback of supervisor behaviour
@@ -14,17 +14,15 @@ leexinc.hrl:243: The pattern <Rest, Line, {'token', _T, Push}, Error> can never
leexinc.hrl:248: The pattern <Rest, Line, {'end_token', _T, Push}, Error> can never match the type <_,_,'error' | 'skip_token',_>
leexinc.hrl:253: The pattern <Rest, Line, {'skip_token', Push}, Error> can never match the type <_,_,'error',_>
leexinc.hrl:256: The pattern <Rest, Line, {'error', _S}, Error> can never match the type <_,_,'error',_>
-yeccpre.hrl:49: Function return_error/2 will never be called
-brick_admin.erl:1315: Function bootstrap_scan_loop/0 has no local return
-brick_admin.erl:1327: Function bootstrap_scan_loop2/0 has no local return
brick_chainmon.erl:1096: The created fun has no local return
brick_ets.erl:3053: The created fun has no local return
-brick_itimer.erl:213: Function start_interval_loop/1 has no local return
-brick_itimer.erl:219: Function interval_loop/1 has no local return
brick_mboxmon.erl:313: The created fun has no local return
brick_mboxmon.erl:329: Function start_water_report_loop/3 has no local return
brick_server.erl:4995: The created fun has no local return
-ebf.erl:21: Function encode/1 has no local return
-ebf.erl:32: Function decode/1 has no local return
-ebf.erl:36: Function decode/2 has no local return
-meck.erl:450: Function invalidate_and_raise/5 has no local return
+ebf.erl:44: Function encode/1 has no local return
+ebf.erl:55: Function decode/1 has no local return
+ebf.erl:59: Function decode/2 has no local return
+ebf.erl:68: Function decode_init/0 has no local return
+ebf.erl:72: Function decode_init/1 has no local return
+meck.erl:621: Function invalidate_and_raise/6 has no local return
+meck.erl:644: The pattern <Mod, Func, Args, [Meck = {'meck', 'exec', _Arity} | Stack]> can never match the type <atom(),_,_,[{atom(),atom(),[any()] | byte(),[any()]},...]>
View
BIN rebar
Binary file not shown.
Oops, something went wrong.

0 comments on commit 39613d1

Please sign in to comment.