askari 0.94.6.v0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +2 -0
- data/LICENSE +22 -0
- data/README.md +161 -0
- data/Rakefile +12 -0
- data/bin/askari +7 -0
- data/classes/askari/AbstractEnvironment.class +0 -0
- data/classes/askari/Environment.class +0 -0
- data/classes/askari/JRubyEnvironment.class +0 -0
- data/classes/askari/RegionObserver.class +0 -0
- data/lib/askari/environment.rb +0 -0
- data/lib/askari/packaging.rb +19 -0
- data/lib/askari/version.rb +10 -0
- metadata +112 -0
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Moz
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
# Askari #
|
2
|
+
|
3
|
+
(J)Ruby coprocessors for HBase.
|
4
|
+
|
5
|
+
Coprocessors are a powerful feature of the HBase store, allowing schema authors to customize behavior in exotic ways. Askari is a small framework for defining and deploying "region observer" coprocessors in modern versions of JRuby.
|
6
|
+
|
7
|
+
Askari (properly, 'askari wa kifaru') is the Swahili name for the oxpecker or tickbird. These small birds sit on the backs of elephants and rhinoceroses, eating parasitic bugs.
|
8
|
+
|
9
|
+
## HBase Versions ##
|
10
|
+
|
11
|
+
Askari's been tested against these HBase versions:
|
12
|
+
|
13
|
+
* Cloudera CDH4 0.94.6
|
14
|
+
* Apache (Vanilla) 0.94.6
|
15
|
+
|
16
|
+
## Development ##
|
17
|
+
|
18
|
+
In addition to bundler, askari uses maven to pull in jar dependencies.
|
19
|
+
|
20
|
+
The integration tests require a locally-running hbase.
|
21
|
+
|
22
|
+
Bootstrap with:
|
23
|
+
|
24
|
+
# Install mvn.
|
25
|
+
rbenv install jruby-1.7.4
|
26
|
+
gem install bundler jruby-openssl
|
27
|
+
bundle
|
28
|
+
rake mvn
|
29
|
+
rake
|
30
|
+
|
31
|
+
## Hadoop & HBase Standalone Environments ##
|
32
|
+
|
33
|
+
Since it's kind of a pain to get an hbase development environment up, here's what we do to get a
|
34
|
+
standalone pseudo-distributed mode.
|
35
|
+
|
36
|
+
### OSX ###
|
37
|
+
|
38
|
+
Follow [these fine instructions](http://borrelli.org/2012/04/29/installing-hadoop-on-osx-lion/), then `brew install hbase` and salt with the below configs to taste.
|
39
|
+
|
40
|
+
You might want to change the `${user.home}/Library/Hadoop` directory prefix.
|
41
|
+
|
42
|
+
In `hadoop-env.sh`, append:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
export HADOOP_OPTS="$HADOOP_OPTS -Djava.security.krb5.realm= -Djava.security.krb.kdc="
|
46
|
+
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Djava.security.krb5.realm= -Djava.security.krb.kdc="
|
47
|
+
```
|
48
|
+
|
49
|
+
In `hbase-env.sh` append:
|
50
|
+
|
51
|
+
```bash
|
52
|
+
export HBASE_OPTS="$HBASE_OPTS -Djava.security.krb5.realm= -Djava.security.krb.kdc="
|
53
|
+
```
|
54
|
+
|
55
|
+
`core-site.xml`:
|
56
|
+
|
57
|
+
```xml
|
58
|
+
<?xml version="1.0"?>
|
59
|
+
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
60
|
+
<configuration>
|
61
|
+
<property>
|
62
|
+
<name>hadoop.tmp.dir</name>
|
63
|
+
<value>/tmp/hdfs-${user.name}</value>
|
64
|
+
</property>
|
65
|
+
<property>
|
66
|
+
<name>fs.default.name</name>
|
67
|
+
<value>hdfs://localhost:8020</value>
|
68
|
+
</property>
|
69
|
+
</configuration>
|
70
|
+
```
|
71
|
+
|
72
|
+
`hdfs-site.xml`:
|
73
|
+
|
74
|
+
```xml
|
75
|
+
<?xml version="1.0"?>
|
76
|
+
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
77
|
+
<configuration>
|
78
|
+
<property>
|
79
|
+
<name>dfs.data.dir</name>
|
80
|
+
<value>${user.home}/Library/Hadoop/dfs</value>
|
81
|
+
</property>
|
82
|
+
<property>
|
83
|
+
<name>dfs.name.dir</name>
|
84
|
+
<value>${user.home}/Library/Hadoop/nn</value>
|
85
|
+
</property>
|
86
|
+
</configuration>
|
87
|
+
```
|
88
|
+
|
89
|
+
`mapred-site.xml`
|
90
|
+
|
91
|
+
```xml
|
92
|
+
<?xml version="1.0"?>
|
93
|
+
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
94
|
+
<configuration>
|
95
|
+
<property>
|
96
|
+
<name>mapred.job.tracker</name>
|
97
|
+
<value>localhost:8021</value>
|
98
|
+
</property>
|
99
|
+
<property>
|
100
|
+
<name>mapred.local.dir</name>
|
101
|
+
<value>${user.home}/Library/Hadoop/mapred/</value>
|
102
|
+
</property>
|
103
|
+
</configuration>
|
104
|
+
```
|
105
|
+
|
106
|
+
`hbase-site.xml`:
|
107
|
+
|
108
|
+
```xml
|
109
|
+
<?xml version="1.0"?>
|
110
|
+
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
|
111
|
+
<configuration>
|
112
|
+
<property>
|
113
|
+
<name>hbase.zookeeper.quorum</name>
|
114
|
+
<value>localhost</value>
|
115
|
+
</property>
|
116
|
+
<property>
|
117
|
+
<name>hbase.rootdir</name>
|
118
|
+
<value>hdfs://localhost:8020/hbase</value>
|
119
|
+
</property>
|
120
|
+
<property>
|
121
|
+
<name>hbase.cluster.distributed</name>
|
122
|
+
<value>true</value>
|
123
|
+
</property>
|
124
|
+
<property>
|
125
|
+
<name>dfs.support.append</name>
|
126
|
+
<value>true</value>
|
127
|
+
</property>
|
128
|
+
<property>
|
129
|
+
<name>dfs.client.read.shortcircuit</name>
|
130
|
+
<value>true</value>
|
131
|
+
</property>
|
132
|
+
</configuration>
|
133
|
+
```
|
134
|
+
|
135
|
+
Turn the whole mess on with:
|
136
|
+
|
137
|
+
```sh
|
138
|
+
start-all.sh
|
139
|
+
start-hbase.sh
|
140
|
+
hbase-daemon.sh start thrift -f -c
|
141
|
+
```
|
142
|
+
|
143
|
+
Stop with:
|
144
|
+
|
145
|
+
```sh
|
146
|
+
hbase-daemon.sh stop thrift
|
147
|
+
stop-hbase.sh
|
148
|
+
stop-all.sh
|
149
|
+
```
|
150
|
+
|
151
|
+
### Ubuntu ###
|
152
|
+
|
153
|
+
Come back later.
|
154
|
+
|
155
|
+
## License ##
|
156
|
+
|
157
|
+
MIT. See [LICENSE](LICENSE).
|
158
|
+
|
159
|
+
## Contributing ##
|
160
|
+
|
161
|
+
Fork it, use feature branches, open PRs.
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# -*- ruby encoding: utf-8 -*-
|
3
|
+
|
4
|
+
require File.expand_path('../config/setup_load_paths', __FILE__)
|
5
|
+
require 'rake'
|
6
|
+
require 'rake/clean'
|
7
|
+
require 'bundler/gem_tasks'
|
8
|
+
|
9
|
+
# Load tasks
|
10
|
+
Dir["./tasks/*.rb"].sort.each { |f| require f }
|
11
|
+
|
12
|
+
task :default => :spec
|
data/bin/askari
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Askari
|
2
|
+
module Packaging
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def java_classes
|
6
|
+
Dir["#{root}/classes/**/*"]
|
7
|
+
end
|
8
|
+
|
9
|
+
def java_class_pathmap
|
10
|
+
"%{#{root}/classes/,}p"
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def root
|
16
|
+
File.expand_path('../../..', __FILE__)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Askari
|
2
|
+
# The target hbase version.
|
3
|
+
# Users should choose the largest version less than or equal to their installation's version.
|
4
|
+
HBASE_VERSION = '0.94.6'
|
5
|
+
|
6
|
+
# The askari library version.
|
7
|
+
LIBRARY_VERSION = '0.0.1'
|
8
|
+
|
9
|
+
VERSION = "#{HBASE_VERSION}.v#{LIBRARY_VERSION}"
|
10
|
+
end
|
metadata
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: askari
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.94.6.v0.0.1
|
5
|
+
prerelease: 7
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Phil Smith
|
9
|
+
- Brandon Forehand
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '10'
|
22
|
+
none: false
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '10'
|
28
|
+
none: false
|
29
|
+
prerelease: false
|
30
|
+
type: :development
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rspec
|
33
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '2.13'
|
38
|
+
none: false
|
39
|
+
requirement: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.13'
|
44
|
+
none: false
|
45
|
+
prerelease: false
|
46
|
+
type: :development
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec-fire
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.2'
|
54
|
+
none: false
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '1.2'
|
60
|
+
none: false
|
61
|
+
prerelease: false
|
62
|
+
type: :development
|
63
|
+
description: Askari is a framework for authoring and deploying HBase coprocessors in jruby.
|
64
|
+
email:
|
65
|
+
- phil.h.smith@gmail.com
|
66
|
+
- brandon@moz.com
|
67
|
+
executables:
|
68
|
+
- askari
|
69
|
+
extensions: []
|
70
|
+
extra_rdoc_files: []
|
71
|
+
files:
|
72
|
+
- README.md
|
73
|
+
- LICENSE
|
74
|
+
- Gemfile
|
75
|
+
- Rakefile
|
76
|
+
- lib/askari/environment.rb
|
77
|
+
- lib/askari/packaging.rb
|
78
|
+
- lib/askari/version.rb
|
79
|
+
- classes/askari/AbstractEnvironment.class
|
80
|
+
- classes/askari/Environment.class
|
81
|
+
- classes/askari/JRubyEnvironment.class
|
82
|
+
- classes/askari/RegionObserver.class
|
83
|
+
- bin/askari
|
84
|
+
homepage: https://github.com/seomoz/askari
|
85
|
+
licenses: []
|
86
|
+
post_install_message:
|
87
|
+
rdoc_options: []
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
- classes
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
segments:
|
96
|
+
- 0
|
97
|
+
version: '0'
|
98
|
+
hash: 2
|
99
|
+
none: false
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - '>'
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 1.3.1
|
105
|
+
none: false
|
106
|
+
requirements: []
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 1.8.24
|
109
|
+
signing_key:
|
110
|
+
specification_version: 3
|
111
|
+
summary: Askari makes HBase coprocessors in jruby.
|
112
|
+
test_files: []
|