riak-client 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/RELNOTES.md +3 -0
- data/lib/riak/bucket.rb +1 -1
- data/lib/riak/client.rb +14 -7
- data/lib/riak/client/beefcake/messages.rb +13 -0
- data/lib/riak/multi.rb +101 -0
- data/lib/riak/multiexist.rb +14 -0
- data/lib/riak/multiget.rb +7 -107
- data/lib/riak/version.rb +1 -1
- metadata +12 -234
- data/.document +0 -5
- data/.gitignore +0 -44
- data/.rspec +0 -2
- data/Gemfile +0 -17
- data/Guardfile +0 -20
- data/Rakefile +0 -124
- data/riak-client.gemspec +0 -71
- data/spec/failover/failover.rb +0 -59
- data/spec/fixtures/bitcask.txt +0 -25
- data/spec/fixtures/cat.jpg +0 -0
- data/spec/fixtures/multipart-basic-conflict.txt +0 -15
- data/spec/fixtures/multipart-blank.txt +0 -7
- data/spec/fixtures/multipart-mapreduce.txt +0 -10
- data/spec/fixtures/multipart-with-body.txt +0 -16
- data/spec/fixtures/multipart-with-marked-tombstones.txt +0 -17
- data/spec/fixtures/multipart-with-unmarked-tombstone.txt +0 -16
- data/spec/fixtures/server.cert.crt +0 -15
- data/spec/fixtures/server.cert.key +0 -15
- data/spec/fixtures/test.pem +0 -1
- data/spec/fixtures/yz_schema_template.xml +0 -18
- data/spec/integration/riak/bucket_types_spec.rb +0 -308
- data/spec/integration/riak/conflict_resolution_spec.rb +0 -96
- data/spec/integration/riak/counters_spec.rb +0 -36
- data/spec/integration/riak/crdt/configuration_spec.rb +0 -38
- data/spec/integration/riak/crdt_search_spec.rb +0 -176
- data/spec/integration/riak/crdt_spec.rb +0 -332
- data/spec/integration/riak/crdt_validation/map_spec.rb +0 -63
- data/spec/integration/riak/crdt_validation/set_spec.rb +0 -122
- data/spec/integration/riak/encodings/crdt_spec.rb +0 -122
- data/spec/integration/riak/encodings/kv_spec.rb +0 -87
- data/spec/integration/riak/encodings/yz_spec.rb +0 -142
- data/spec/integration/riak/preflist_spec.rb +0 -43
- data/spec/integration/riak/properties_spec.rb +0 -69
- data/spec/integration/riak/protobuffs/interrupted_request_spec.rb +0 -33
- data/spec/integration/riak/protobuffs/timeouts_spec.rb +0 -178
- data/spec/integration/riak/protobuffs_backends_spec.rb +0 -40
- data/spec/integration/riak/search_spec.rb +0 -104
- data/spec/integration/riak/secondary_index_spec.rb +0 -72
- data/spec/integration/riak/security_spec.rb +0 -105
- data/spec/integration/riak/threading_spec.rb +0 -154
- data/spec/integration/riak/time_series_spec.rb +0 -212
- data/spec/integration/yokozuna/index_spec.rb +0 -61
- data/spec/integration/yokozuna/queries_spec.rb +0 -115
- data/spec/integration/yokozuna/schema_spec.rb +0 -49
- data/spec/riak/beefcake_protobuffs_backend/bucket_properties_operator_spec.rb +0 -247
- data/spec/riak/beefcake_protobuffs_backend/crdt_operator_spec.rb +0 -244
- data/spec/riak/beefcake_protobuffs_backend/object_methods_spec.rb +0 -53
- data/spec/riak/beefcake_protobuffs_backend/protocol_spec.rb +0 -189
- data/spec/riak/beefcake_protobuffs_backend/ts_cell_codec_spec.rb +0 -124
- data/spec/riak/beefcake_protobuffs_backend_spec.rb +0 -162
- data/spec/riak/bucket_properties_spec.rb +0 -135
- data/spec/riak/bucket_spec.rb +0 -275
- data/spec/riak/bucket_type_spec.rb +0 -50
- data/spec/riak/bucket_typed/bucket_spec.rb +0 -78
- data/spec/riak/client_spec.rb +0 -304
- data/spec/riak/core_ext/to_param_spec.rb +0 -15
- data/spec/riak/counter_spec.rb +0 -122
- data/spec/riak/crdt/counter_spec.rb +0 -55
- data/spec/riak/crdt/hyper_log_log_spec.rb +0 -56
- data/spec/riak/crdt/inner_counter_spec.rb +0 -21
- data/spec/riak/crdt/inner_flag_spec.rb +0 -39
- data/spec/riak/crdt/inner_map_spec.rb +0 -47
- data/spec/riak/crdt/inner_register_spec.rb +0 -40
- data/spec/riak/crdt/inner_set_spec.rb +0 -33
- data/spec/riak/crdt/map_spec.rb +0 -78
- data/spec/riak/crdt/set_spec.rb +0 -61
- data/spec/riak/crdt/shared_examples.rb +0 -88
- data/spec/riak/crdt/typed_collection_spec.rb +0 -225
- data/spec/riak/escape_spec.rb +0 -72
- data/spec/riak/feature_detection_spec.rb +0 -77
- data/spec/riak/index_collection_spec.rb +0 -53
- data/spec/riak/instrumentation_spec.rb +0 -124
- data/spec/riak/link_spec.rb +0 -85
- data/spec/riak/list_buckets_spec.rb +0 -41
- data/spec/riak/map_reduce/filter_builder_spec.rb +0 -32
- data/spec/riak/map_reduce/phase_spec.rb +0 -142
- data/spec/riak/map_reduce_spec.rb +0 -434
- data/spec/riak/multiget_spec.rb +0 -81
- data/spec/riak/node_spec.rb +0 -26
- data/spec/riak/robject_spec.rb +0 -542
- data/spec/riak/search/index_spec.rb +0 -72
- data/spec/riak/search/query_spec.rb +0 -88
- data/spec/riak/search/result_collection_spec.rb +0 -89
- data/spec/riak/search/result_document_spec.rb +0 -106
- data/spec/riak/search/schema_spec.rb +0 -63
- data/spec/riak/search_spec.rb +0 -107
- data/spec/riak/secondary_index_spec.rb +0 -225
- data/spec/riak/serializers_spec.rb +0 -121
- data/spec/riak/stamp_spec.rb +0 -54
- data/spec/riak/time_series/deletion_spec.rb +0 -33
- data/spec/riak/time_series/listing_spec.rb +0 -51
- data/spec/riak/time_series/submission_spec.rb +0 -35
- data/spec/riak/util/gzip_spec.rb +0 -49
- data/spec/riak/walk_spec_spec.rb +0 -203
- data/spec/spec_helper.rb +0 -67
- data/spec/support/certs/README.md +0 -13
- data/spec/support/certs/ca.crt +0 -21
- data/spec/support/certs/client.crl +0 -13
- data/spec/support/certs/client.crt +0 -94
- data/spec/support/certs/client.csr +0 -18
- data/spec/support/certs/client.key +0 -27
- data/spec/support/certs/empty_ca.crt +0 -21
- data/spec/support/certs/server.crl +0 -13
- data/spec/support/certs/server.crt +0 -94
- data/spec/support/certs/server.key +0 -27
- data/spec/support/crdt_search_config.rb +0 -112
- data/spec/support/crdt_search_fixtures.rb +0 -42
- data/spec/support/integration_setup.rb +0 -10
- data/spec/support/search_config.rb +0 -83
- data/spec/support/search_corpus_setup.rb +0 -39
- data/spec/support/test_client.rb +0 -52
- data/spec/support/test_client.yml.example +0 -10
- data/spec/support/unified_backend_examples.rb +0 -402
- data/spec/support/version_filter.rb +0 -12
- data/spec/support/wait_until.rb +0 -20
data/.document
DELETED
data/.gitignore
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
## NOTE: This file must be manually kept in sync with the gemspec, but
|
2
|
-
## should not normally need to be modified unless new top-level files
|
3
|
-
## or directory trees are being added.
|
4
|
-
|
5
|
-
## MAC OS
|
6
|
-
.DS_Store
|
7
|
-
|
8
|
-
## TEXTMATE
|
9
|
-
*.tmproj
|
10
|
-
tmtags
|
11
|
-
|
12
|
-
## EMACS
|
13
|
-
*~
|
14
|
-
\#*
|
15
|
-
.\#*
|
16
|
-
|
17
|
-
## VIM
|
18
|
-
*.swp
|
19
|
-
|
20
|
-
## VS Code
|
21
|
-
.vscode/
|
22
|
-
|
23
|
-
## PROJECT::GENERAL
|
24
|
-
coverage
|
25
|
-
rdoc
|
26
|
-
pkg
|
27
|
-
|
28
|
-
## PROJECT::SPECIFIC
|
29
|
-
_notes
|
30
|
-
doc
|
31
|
-
.yardoc
|
32
|
-
.bundle
|
33
|
-
spec/support/test_client.yml
|
34
|
-
Gemfile.lock
|
35
|
-
**/bin
|
36
|
-
*.rbc
|
37
|
-
.rvmrc
|
38
|
-
|
39
|
-
.riaktest
|
40
|
-
**/.riaktest
|
41
|
-
.ruby-version
|
42
|
-
tmp
|
43
|
-
tags
|
44
|
-
vendor/
|
data/.rspec
DELETED
data/Gemfile
DELETED
data/Guardfile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
|
-
|
4
|
-
# Note: The cmd option is now required due to the increasing number of ways
|
5
|
-
# rspec may be run, below are examples of the most common uses.
|
6
|
-
# * bundler: 'bundle exec rspec'
|
7
|
-
# * bundler binstubs: 'bin/rspec'
|
8
|
-
# * spring: 'bin/rsspec' (This will use spring if running and you have
|
9
|
-
# installed the spring binstubs per the docs)
|
10
|
-
# * zeus: 'zeus rspec' (requires the server to be started separetly)
|
11
|
-
# * 'just' rspec: 'rspec'
|
12
|
-
guard :rspec, cmd: 'bundle exec rspec', all_after_pass: true, all_on_start: true do
|
13
|
-
watch(%r{^spec/.+_spec\.rb$})
|
14
|
-
watch(%r{^lib/riak/(.+)\.rb$}) { |m| "spec/riak/#{m[1]}_spec.rb" }
|
15
|
-
watch(%r{^lib/riak/client/}) { 'spec/riak/beefcake_protobuffs_backend' }
|
16
|
-
watch('spec/spec_helper.rb') { "spec" }
|
17
|
-
|
18
|
-
watch(/^spec\/integration/) { 'spec:integration' }
|
19
|
-
end
|
20
|
-
|
data/Rakefile
DELETED
@@ -1,124 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rubygems/package_task'
|
3
|
-
require 'yard'
|
4
|
-
require 'rspec/core'
|
5
|
-
require 'rspec/core/rake_task'
|
6
|
-
|
7
|
-
def gemspec
|
8
|
-
$riakclient_gemspec ||= Gem::Specification.load("riak-client.gemspec")
|
9
|
-
end
|
10
|
-
|
11
|
-
Gem::PackageTask.new(gemspec) do |pkg|
|
12
|
-
pkg.need_zip = false
|
13
|
-
pkg.need_tar = false
|
14
|
-
end
|
15
|
-
|
16
|
-
YARD::Rake::YardocTask.new :doc do |doc|
|
17
|
-
doc.options = ["--markup markdown",
|
18
|
-
"--markup-provider=kramdown",
|
19
|
-
"--charset utf-8",
|
20
|
-
'-',
|
21
|
-
'lib/**/*.rb',
|
22
|
-
'*.md',
|
23
|
-
'*.markdown'
|
24
|
-
].map{|e| e.split(' ')}.flatten
|
25
|
-
end
|
26
|
-
|
27
|
-
task :gem => :gemspec
|
28
|
-
|
29
|
-
desc %{Validate the gemspec file.}
|
30
|
-
task :gemspec do
|
31
|
-
gemspec.validate
|
32
|
-
end
|
33
|
-
|
34
|
-
desc "Cleans up white space in source files"
|
35
|
-
task :clean_whitespace do
|
36
|
-
no_file_cleaned = true
|
37
|
-
|
38
|
-
Dir["**/*.rb"].each do |file|
|
39
|
-
contents = File.read(file)
|
40
|
-
cleaned_contents = contents.gsub(/([ \t]+)$/, '')
|
41
|
-
unless cleaned_contents == contents
|
42
|
-
no_file_cleaned = false
|
43
|
-
puts " - Cleaned #{file}"
|
44
|
-
File.open(file, 'w') { |f| f.write(cleaned_contents) }
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
if no_file_cleaned
|
49
|
-
puts "No files with trailing whitespace found"
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
desc "Run Unit Specs Only"
|
54
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
55
|
-
spec.rspec_opts = %w[--profile --tag ~integration --tag ~slow]
|
56
|
-
end
|
57
|
-
|
58
|
-
namespace :spec do
|
59
|
-
desc "Run Integration Specs Only (without explicitly slow specs)"
|
60
|
-
RSpec::Core::RakeTask.new(:integration) do |spec|
|
61
|
-
spec.rspec_opts = %w[--profile --tag '~slow' --tag '~time_series' --tag integration]
|
62
|
-
end
|
63
|
-
|
64
|
-
desc "Run All Specs (without explicitly slow specs)"
|
65
|
-
RSpec::Core::RakeTask.new(:all) do |spec|
|
66
|
-
spec.rspec_opts = %w[--profile --tag '~slow']
|
67
|
-
end
|
68
|
-
|
69
|
-
desc "Run Slow Specs Only"
|
70
|
-
RSpec::Core::RakeTask.new(:slow) do |spec|
|
71
|
-
spec.rspec_opts = %w[--profile --tag slow]
|
72
|
-
end
|
73
|
-
|
74
|
-
desc "Run Time Series Specs Only"
|
75
|
-
RSpec::Core::RakeTask.new(:time_series) do |spec|
|
76
|
-
spec.rspec_opts = %w[--profile --tag time_series]
|
77
|
-
end
|
78
|
-
|
79
|
-
desc "Run Security Specs Only"
|
80
|
-
RSpec::Core::RakeTask.new(:security) do |spec|
|
81
|
-
spec.rspec_opts = %w[--profile --tag yes_security --tag ~time_series]
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
desc "Run Unit Test Specs (excluding slow, integration and time_series)"
|
86
|
-
RSpec::Core::RakeTask.new(:ci) do |spec|
|
87
|
-
spec.rspec_opts = %w[--profile --tag '~slow' --tag '~integration' --tag '~time_series']
|
88
|
-
end
|
89
|
-
task :default => :ci
|
90
|
-
|
91
|
-
|
92
|
-
desc "Generate Protocol Buffers message definitions from riak_pb"
|
93
|
-
task :pb_defs => 'beefcake:pb_defs'
|
94
|
-
|
95
|
-
namespace :beefcake do
|
96
|
-
task :pb_defs => 'lib/riak/client/beefcake/messages.rb'
|
97
|
-
|
98
|
-
PROTO_FILES = %w{riak_kv riak_search riak_yokozuna riak_dt riak_ts}
|
99
|
-
PROTO_TMP = PROTO_FILES.map{|f| "tmp/#{f}.pb.rb"}
|
100
|
-
|
101
|
-
task :clean do
|
102
|
-
sh "rm -rf tmp/riak_pb"
|
103
|
-
sh "rm -rf #{PROTO_TMP.join ' '}"
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
file 'lib/riak/client/beefcake/messages.rb' => PROTO_TMP do |t|
|
108
|
-
sh "cat lib/riak/client/beefcake/header tmp/riak.pb.rb #{t.prerequisites.join ' '} lib/riak/client/beefcake/footer > #{t.name}"
|
109
|
-
end
|
110
|
-
|
111
|
-
PROTO_FILES.each do |f|
|
112
|
-
file "tmp/#{f}.pb.rb" => 'tmp/riak_pb' do |t|
|
113
|
-
sh "protoc --beefcake_out tmp -I tmp/riak_pb/src tmp/riak_pb/src/#{f}.proto"
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
directory 'tmp'
|
118
|
-
|
119
|
-
directory 'tmp/riak_pb' => 'tmp' do
|
120
|
-
cd 'tmp' do
|
121
|
-
sh "git clone -b 2.2 https://github.com/basho/riak_pb.git"
|
122
|
-
end
|
123
|
-
end
|
124
|
-
end
|
data/riak-client.gemspec
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
$:.push File.expand_path("../lib", __FILE__)
|
2
|
-
require 'riak/version'
|
3
|
-
|
4
|
-
Gem::Specification.new do |gem|
|
5
|
-
# Meta
|
6
|
-
gem.name = "riak-client"
|
7
|
-
gem.version = Riak::VERSION
|
8
|
-
gem.summary = %Q{riak-client is a rich client for Riak, the distributed database by Basho.}
|
9
|
-
gem.description = %Q{riak-client is a rich client for Riak, the distributed database by Basho. It supports the full HTTP and Protocol Buffers interfaces including storage operations, bucket configuration, link-walking, secondary indexes and map-reduce.}
|
10
|
-
gem.email = ['bryce@basho.com']
|
11
|
-
gem.homepage = "http://github.com/basho/riak-ruby-client"
|
12
|
-
gem.authors = ['Bryce Kerley']
|
13
|
-
gem.license = 'Apache-2.0'
|
14
|
-
|
15
|
-
gem.required_ruby_version = '>= 1.9.3'
|
16
|
-
|
17
|
-
# Deps
|
18
|
-
gem.add_development_dependency 'activesupport', '~> 4.2'
|
19
|
-
gem.add_development_dependency 'instrumentable', '~> 1.1'
|
20
|
-
gem.add_development_dependency 'kramdown', '~> 1.4'
|
21
|
-
gem.add_development_dependency 'rake', '~> 10.1'
|
22
|
-
gem.add_development_dependency 'rspec', '~> 3.0'
|
23
|
-
gem.add_development_dependency 'rubocop', '~> 0.40.0'
|
24
|
-
gem.add_development_dependency 'simplecov', '~> 0.10'
|
25
|
-
gem.add_development_dependency 'yard', '~> 0.8'
|
26
|
-
|
27
|
-
gem.add_runtime_dependency 'beefcake', '~> 1.1'
|
28
|
-
gem.add_runtime_dependency 'cert_validator', '~> 0.0.1'
|
29
|
-
gem.add_runtime_dependency 'i18n', '~> 0.6'
|
30
|
-
gem.add_runtime_dependency 'innertube', '~> 1.0'
|
31
|
-
gem.add_runtime_dependency 'multi_json', '~> 1.0'
|
32
|
-
|
33
|
-
# Files
|
34
|
-
|
35
|
-
# NOTE: This section must be manually kept in sync with the
|
36
|
-
# .gitignore file, but should not normally need to be modified
|
37
|
-
# unless new top-level files or directory trees are being added.
|
38
|
-
includes = %W{
|
39
|
-
lib/**/*
|
40
|
-
spec/**/*
|
41
|
-
Gemfile
|
42
|
-
Rakefile
|
43
|
-
Guardfile
|
44
|
-
LICENSE*
|
45
|
-
RELNOTES*
|
46
|
-
README*
|
47
|
-
erl_src/*
|
48
|
-
.gitignore
|
49
|
-
.document
|
50
|
-
.rspec
|
51
|
-
riak-client.gemspec
|
52
|
-
}
|
53
|
-
|
54
|
-
excludes = %W{
|
55
|
-
**/*.swp
|
56
|
-
**/#*
|
57
|
-
**/.#*
|
58
|
-
**/*~
|
59
|
-
**/*.rbc
|
60
|
-
**/.DS_Store
|
61
|
-
spec/support/test_server.yml
|
62
|
-
.ruby-version
|
63
|
-
}
|
64
|
-
|
65
|
-
files = includes.map {|glob| Dir[glob] }.flatten.select {|f| File.file?(f) }.sort
|
66
|
-
files.reject! {|f| excludes.any? {|e| File.fnmatch?(e, f) } }
|
67
|
-
|
68
|
-
gem.files = files
|
69
|
-
gem.test_files = files.grep(/^spec/)
|
70
|
-
gem.require_paths = ['lib']
|
71
|
-
end
|
data/spec/failover/failover.rb
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../../lib')
|
2
|
-
require 'riak'
|
3
|
-
|
4
|
-
# This is not a formal spec yet. It's designed to be run agains a local dev
|
5
|
-
# cluster while you bring nodes up and down.
|
6
|
-
[
|
7
|
-
{:protocol => 'pbc', :protobuffs_backend => :Beefcake},
|
8
|
-
{:protocol => 'http', :http_backend => :NetHTTP},
|
9
|
-
{:protocol => 'http', :http_backend => :Excon}
|
10
|
-
].each do |opts|
|
11
|
-
@client = Riak::Client.new(
|
12
|
-
{
|
13
|
-
:nodes => (1..3).map { |i|
|
14
|
-
{
|
15
|
-
:http_port => 8090 + i,
|
16
|
-
:pb_port => 8080 + i
|
17
|
-
}
|
18
|
-
}
|
19
|
-
}.merge(opts)
|
20
|
-
)
|
21
|
-
|
22
|
-
errors = []
|
23
|
-
p opts
|
24
|
-
|
25
|
-
n = 10
|
26
|
-
c = 1000
|
27
|
-
|
28
|
-
(0...n).map do |t|
|
29
|
-
Thread.new do
|
30
|
-
# Generate a stream of put reqs. Put a . for each success, an X for
|
31
|
-
# each failure.
|
32
|
-
c.times do |i|
|
33
|
-
begin
|
34
|
-
o = @client['test'].new("#{t}:#{i}")
|
35
|
-
o.content_type = 'text/plain'
|
36
|
-
o.data = i.to_s
|
37
|
-
o.store
|
38
|
-
o2 = @client['test'].get("#{t}:#{i}")
|
39
|
-
o2.data == i.to_s or raise "wrong data"
|
40
|
-
print '.'
|
41
|
-
rescue => e
|
42
|
-
print 'X'
|
43
|
-
errors << e
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end.each do |thread|
|
48
|
-
thread.join
|
49
|
-
end
|
50
|
-
|
51
|
-
# Put errors
|
52
|
-
puts
|
53
|
-
errors.each do |e|
|
54
|
-
puts e.inspect
|
55
|
-
puts e.backtrace.map { |x| " #{x}" }.join("\n")
|
56
|
-
end
|
57
|
-
|
58
|
-
puts "\n\n"
|
59
|
-
end
|
data/spec/fixtures/bitcask.txt
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
Bitcask is an Erlang application that provides an API for storing and retrieving key/value data into a log-structured hash table that provides very fast access. The design owes a lot to the principles found in log-structured file systems and draws inspiration from a number of designs that involve log file merging.
|
2
|
-
|
3
|
-
Strengths
|
4
|
-
Low latency per item read or written
|
5
|
-
This is due to the write-once, append-only nature of the Bitcask database files. High throughput, especially when writing an incoming stream of random items Because the data being written doesn't need to be ordered on disk and because the log structured design allows for minimal disk head movement during writes these operations generally saturate the I/O and disk bandwidth.
|
6
|
-
|
7
|
-
Ability to handle datasets larger than RAM w/o degradation
|
8
|
-
Because access to data in Bitcask is direct lookup from an in-memory hash table finding data on disk is very efficient, even when data sets are very large.
|
9
|
-
|
10
|
-
Single Seek to Retrieve Any Value
|
11
|
-
Bitcask's in-memory hash-table of keys point directly to locations on disk where the data lives. Bitcask never uses more than one disk seek to read a value and sometimes, due to file-system caching done by the operating system, even that isn't necessary.
|
12
|
-
|
13
|
-
Predictable Lookup and Insert Performance
|
14
|
-
As you might expect from the description above, read operations have a fixed, predictable behavior. What you might not expect is that this is also true for writes. Write operations are at most a seek to the end of the current file open writing and an append to that file.
|
15
|
-
|
16
|
-
Fast, bounded Crash Recovery
|
17
|
-
Due to the append-only write once nature of Bitcask files, recovery is easy and fast. The only items that might be lost are partially written records at the tail of the file last opened for writes. Recovery need only review the last record or two written and verify CRC data to ensure that the data is consistent.
|
18
|
-
|
19
|
-
Easy Backup
|
20
|
-
In most systems backup can be very complicated but here again Bitcask simplifies this process due to its append-only write once disk format. Any utility that archives or copies files in disk-block order will properly backup or copy a Bitcask database.
|
21
|
-
|
22
|
-
Weakness
|
23
|
-
Keys Must Fit In Memory
|
24
|
-
Bitcask keeps all keys in memory at all times, this means that your system must have enough memory to contain your entire keyspace with room for other operational components and operating system resident filesystem buffer space.
|
25
|
-
|
data/spec/fixtures/cat.jpg
DELETED
Binary file
|
@@ -1,15 +0,0 @@
|
|
1
|
-
--8XZD3w6ttFTHIz6LCmhVxn9Ex0K
|
2
|
-
Content-Type: text/plain
|
3
|
-
Link: </buckets/test>; rel="up"
|
4
|
-
Etag: 2baUwethOoLrVkwnMqzBRW
|
5
|
-
Last-Modified: Mon, 15 Oct 2012 19:36:06 GMT
|
6
|
-
|
7
|
-
bar
|
8
|
-
--8XZD3w6ttFTHIz6LCmhVxn9Ex0K
|
9
|
-
Content-Type: text/plain
|
10
|
-
Link: </buckets/test>; rel="up"
|
11
|
-
Etag: 6NtlHf8Lc3TEcCTKOVqEkl
|
12
|
-
Last-Modified: Mon, 15 Oct 2012 19:35:57 GMT
|
13
|
-
|
14
|
-
foo
|
15
|
-
--8XZD3w6ttFTHIz6LCmhVxn9Ex0K--
|
@@ -1,10 +0,0 @@
|
|
1
|
-
|
2
|
-
--NT6cqYFYCfbYZsocVt15tNWCpG9
|
3
|
-
Content-Type: application/json
|
4
|
-
|
5
|
-
{"phase":0,"data":["source :gemcutter\n\ngem 'i18n'\ngem 'builder'\ngem 'rspec', \"~>2.0.0\"\ngem 'fakeweb', \">=1.2\"\ngem 'rack', '>=1.0'\ngem 'rake'\ngem 'bundler'\ngem 'excon', \"~>0.3.4\"\n\nif defined? JRUBY_VERSION\n gem 'json'\n gem 'jruby-openssl'\nelse\n gem 'curb', '>=0.6'\n gem 'yajl-ruby'\nend\n\ngroup :integration do\n gem 'activesupport', '~>3.0'\nend\n"]}
|
6
|
-
--NT6cqYFYCfbYZsocVt15tNWCpG9
|
7
|
-
Content-Type: application/json
|
8
|
-
|
9
|
-
{"phase":0,"data":["source \"http://rubygems.org\"\n\ngem 'rake'\ngem 'gollum-site'\ngem 'rdiscount'\ngem 'RedCloth'\ngem 'rspec'\n"]}
|
10
|
-
--NT6cqYFYCfbYZsocVt15tNWCpG9--
|
@@ -1,16 +0,0 @@
|
|
1
|
-
|
2
|
-
--5EiMOjuGavQ2IbXAqsJPLLfJNlA
|
3
|
-
Content-Type: multipart/mixed; boundary=7extjTzvYIKVMVHowUiTn0LfvSs
|
4
|
-
|
5
|
-
--7extjTzvYIKVMVHowUiTn0LfvSs
|
6
|
-
X-Riak-Vclock: a85hYGBgyWDKBVHMr9s3ZzAlMuaxMtyZcPAIH1RYyObHDqiwxIZjcOG1M98chAq3bUQIz7SSFQEKM4FUbwMKZwEA
|
7
|
-
Location: /riak/foo/baz
|
8
|
-
Content-Type: text/plain
|
9
|
-
Link: </riak/foo>; rel="up"
|
10
|
-
Etag: 6JdI51eFrvv5lDwY6un7a2
|
11
|
-
Last-Modified: Sat, 16 Jan 2010 22:13:44 GMT
|
12
|
-
|
13
|
-
SCP sloooow....
|
14
|
-
--7extjTzvYIKVMVHowUiTn0LfvSs--
|
15
|
-
|
16
|
-
--5EiMOjuGavQ2IbXAqsJPLLfJNlA--
|
@@ -1,17 +0,0 @@
|
|
1
|
-
|
2
|
-
--ADqgQtdmA5iQgyR5UGzX6V3HZtI
|
3
|
-
Content-Type: multipart/mixed; boundary=Ljz1mP3hZzqPu6DH1Y4L8k7hfxy
|
4
|
-
|
5
|
-
--Ljz1mP3hZzqPu6DH1Y4L8k7hfxy
|
6
|
-
X-Riak-Vclock: a85hYGBgzGDKBVIcypz/fvrNPcuWwZTIlMfKIOotdIIvCwA=
|
7
|
-
Location: /buckets/links/keys/target
|
8
|
-
Content-Type: application/octet-stream
|
9
|
-
Link: </buckets/links>; rel="up"
|
10
|
-
Etag: 5bUNdzHJhZDdCr7KlWxXq
|
11
|
-
Last-Modified: Tue, 18 Oct 2011 19:10:13 GMT
|
12
|
-
X-Riak-Deleted: true
|
13
|
-
|
14
|
-
|
15
|
-
--Ljz1mP3hZzqPu6DH1Y4L8k7hfxy--
|
16
|
-
|
17
|
-
--ADqgQtdmA5iQgyR5UGzX6V3HZtI--
|