rjack-zookeeper 3.3.6.0-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc ADDED
@@ -0,0 +1,2 @@
1
+ === 3.3.6.0 (2013-1-3)
2
+ * Initial release.
data/Manifest.txt ADDED
@@ -0,0 +1,15 @@
1
+ History.rdoc
2
+ Manifest.txt
3
+ README.rdoc
4
+ Rakefile
5
+ assembly.xml
6
+ pom.xml
7
+ bin/rjack-zookeeper-cli
8
+ bin/rjack-zookeeper-fg
9
+ config/zoo.cfg
10
+ init/rjack-zookeeper
11
+ lib/rjack-zookeeper/base.rb
12
+ lib/rjack-zookeeper.rb
13
+ test/setup.rb
14
+ test/test_zookeeper.rb
15
+ lib/rjack-zookeeper/zookeeper-3.3.6.jar
data/README.rdoc ADDED
@@ -0,0 +1,54 @@
1
+ = rjack-zookeeper
2
+
3
+ * http://rjack.rubyforge.org/zookeeper
4
+
5
+ == Description
6
+
7
+ A gem packaging of {ZooKeeper}[http://zookeeper.apache.org/] for JRuby
8
+ including the ZooKeeper jar (used for server and client), foreground and
9
+ init daemon scripts, and CLI client script.
10
+
11
+ == Requirements
12
+
13
+ ZooKeeper's Log4j dependencies are fullfilled via rjack-slf4j.
14
+
15
+ There is a potential conflict between the version of
16
+ {JLine}[https://github.com/jline/jline2] foisted into JRuby
17
+ and the ZooKeeper CLI client. Zookeeper 3.3.x is JLine 1.0
18
+ compatible, and will run with JLine enabled if under JRuby 1.6.8 (and
19
+ prior). If run under JRuby 1.7.x which includes JLine 2, JLine will
20
+ be disabled in the CLI.
21
+
22
+ == License
23
+
24
+ === rjack-zookeeper
25
+
26
+ Copyright (c) 2011-2013 David Kellum
27
+
28
+ Licensed under the Apache License, Version 2.0 (the "License"); you
29
+ may not use this file except in compliance with the License. You
30
+ may obtain a copy of the License at:
31
+
32
+ http://www.apache.org/licenses/LICENSE-2.0
33
+
34
+ Unless required by applicable law or agreed to in writing, software
35
+ distributed under the License is distributed on an "AS IS" BASIS,
36
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
37
+ implied. See the License for the specific language governing
38
+ permissions and limitations under the License.
39
+
40
+ === ZooKeeper
41
+
42
+ Copyright (c) 2009 The Apache Software Foundation
43
+
44
+ Licensed under the Apache License, Version 2.0 (the "License"); you
45
+ may not use this file except in compliance with the License. You
46
+ may obtain a copy of the License at:
47
+
48
+ http://www.apache.org/licenses/LICENSE-2.0
49
+
50
+ Unless required by applicable law or agreed to in writing, software
51
+ distributed under the License is distributed on an "AS IS" BASIS,
52
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
53
+ implied. See the License for the specific language governing
54
+ permissions and limitations under the License.
data/Rakefile ADDED
@@ -0,0 +1,7 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+ require 'rjack-tarpit'
6
+
7
+ RJack::TarPit.new( "rjack-zookeeper" ).define_tasks
data/assembly.xml ADDED
@@ -0,0 +1,15 @@
1
+ <assembly>
2
+ <id>bin</id>
3
+ <formats>
4
+ <format>dir</format>
5
+ </formats>
6
+ <includeBaseDirectory>false</includeBaseDirectory>
7
+ <dependencySets>
8
+ <dependencySet>
9
+ <useProjectArtifact>false</useProjectArtifact>
10
+ <includes>
11
+ <include>org.apache.zookeeper:zookeeper</include>
12
+ </includes>
13
+ </dependencySet>
14
+ </dependencySets>
15
+ </assembly>
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #--
4
+ # Copyright (c) 2011-2013 David Kellum
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
7
+ # may not use this file except in compliance with the License. You
8
+ # may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15
+ # implied. See the License for the specific language governing
16
+ # permissions and limitations under the License.
17
+ #++
18
+
19
+ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
20
+
21
+ require 'rubygems'
22
+
23
+ module BinScript
24
+ require 'rjack-zookeeper/base'
25
+ require 'rjack-slf4j/log4j-over-slf4j'
26
+ require 'rjack-logback'
27
+ require 'optparse'
28
+
29
+ include RJack
30
+ Logback.config_console( :thread => true )
31
+ Logback[ 'org.apache.zookeeper' ].level = :warn
32
+
33
+ OptionParser.new do |opts|
34
+ opts.on( "-v", "--version", "Display version" ) do
35
+
36
+ puts "rjack-zookeeper-fg: #{ RZooKeeper::VERSION }"
37
+ exit 1
38
+ end
39
+ opts.on( "-d", "--debug", "Enable verbose DEBUG logging" ) do
40
+ Logback.root.level = Logback::DEBUG
41
+ Logback[ 'org.apache.zookeeper' ].level = nil
42
+ end
43
+ end.parse!
44
+
45
+ require 'rjack-zookeeper'
46
+
47
+ RZooKeeper::ZooKeeperMain::main( ARGV )
48
+ end
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #--
4
+ # Copyright (c) 2011-2013 David Kellum
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
7
+ # may not use this file except in compliance with the License. You
8
+ # may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15
+ # implied. See the License for the specific language governing
16
+ # permissions and limitations under the License.
17
+ #++
18
+
19
+ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
20
+
21
+ require 'rubygems'
22
+
23
+ module BinScript
24
+ require 'rjack-zookeeper/base'
25
+ require 'rjack-slf4j/log4j-over-slf4j'
26
+ require 'rjack-logback'
27
+ require 'optparse'
28
+
29
+ include RJack
30
+ Logback.config_console( :thread => true )
31
+ Logback[ 'org.apache.zookeeper' ].level = :warn
32
+
33
+ config = 'zoo.cfg'
34
+
35
+ OptionParser.new do |opts|
36
+ opts.on( "-v", "--version", "Display version" ) do
37
+
38
+ puts "rjack-zookeeper-fg: #{ RZooKeeper::VERSION }"
39
+ exit 1
40
+ end
41
+ opts.on( "-d", "--debug", "Enable verbose DEBUG logging" ) do
42
+ Logback.root.level = Logback::DEBUG
43
+ end
44
+ opts.on( "-c", "--zk-config=FILE",
45
+ "ZooKeeper config file (./zoo.cfg)" ) do |c|
46
+ config = c
47
+ end
48
+ end.parse!
49
+
50
+ require 'java'
51
+
52
+ # Disable log4j JMX registrations unless already set (i.e. false).
53
+ # Otherwise can fail with NoClassDefFoundError:
54
+ # o.a.log4j.jmx.HierarchyDynamicMBean
55
+ Java::java.lang.System.properties[ 'zookeeper.jmx.log4j.disable' ] ||= 'true'
56
+
57
+ require 'rjack-zookeeper'
58
+ Logback[ 'org.apache.zookeeper' ].level = nil
59
+
60
+ RZooKeeper::QuorumPeerMain::main( [ config ] )
61
+ end
data/config/zoo.cfg ADDED
@@ -0,0 +1,12 @@
1
+ # The number of milliseconds of each tick
2
+ tickTime=2000
3
+ # The number of ticks that the initial
4
+ # synchronization phase can take
5
+ initLimit=10
6
+ # The number of ticks that can pass between
7
+ # sending a request and getting an acknowledgement
8
+ syncLimit=5
9
+ # the directory where the snapshot is stored.
10
+ dataDir=./data
11
+ # the port at which the clients will connect
12
+ clientPort=2181
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #. hashdot.profile += daemon
4
+ #. hashdot.pid_file = ./rjack-zookeeper.pid
5
+ #. hashdot.io_redirect.file = ./rjack-zookeeper.log
6
+ #. hashdot.vm.options += -Xmx1g
7
+ #. hashdot.vm.options += -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
8
+
9
+ #--
10
+ # Copyright (c) 2011-2013 David Kellum
11
+ #
12
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
13
+ # may not use this file except in compliance with the License. You
14
+ # may obtain a copy of the License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the License is distributed on an "AS IS" BASIS,
20
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
21
+ # implied. See the License for the specific language governing
22
+ # permissions and limitations under the License.
23
+ #++
24
+
25
+ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
26
+
27
+ require 'rubygems'
28
+ gem( "rjack-zookeeper", "= 3.3.6.0" )
29
+
30
+ module BinScript
31
+ require 'rjack-zookeeper/base'
32
+ require 'rjack-slf4j/log4j-over-slf4j'
33
+ require 'rjack-logback'
34
+
35
+ include RJack
36
+ Logback.config_console( :full => true, :thread => true )
37
+ Logback[ 'org.apache.zookeeper' ].level = :warn
38
+
39
+ require 'java'
40
+
41
+ # Disable log4j JMX registrations unless already set (i.e. false).
42
+ # Otherwise can fail with NoClassDefFoundError:
43
+ # o.a.log4j.jmx.HierarchyDynamicMBean
44
+ Java::java.lang.System.properties[ 'zookeeper.jmx.log4j.disable' ] ||= 'true'
45
+
46
+ require 'rjack-zookeeper'
47
+ Logback[ 'org.apache.zookeeper' ].level = nil
48
+
49
+ RZooKeeper::QuorumPeerMain::main( [ 'zoo.cfg' ] )
50
+ end
@@ -0,0 +1,31 @@
1
+ #--
2
+ # Copyright (c) 2011-2013 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You may
6
+ # obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'rjack-zookeeper/base'
18
+
19
+ require 'rjack-slf4j'
20
+
21
+ require 'java'
22
+
23
+ module RJack::RZooKeeper
24
+
25
+ Dir.glob( File.join( LIB_DIR, '*.jar' ) ).each { |jar| require jar }
26
+
27
+ java_import "org.apache.zookeeper.ZooKeeper"
28
+ java_import "org.apache.zookeeper.ZooKeeperMain"
29
+ java_import "org.apache.zookeeper.server.quorum.QuorumPeerMain"
30
+
31
+ end
@@ -0,0 +1,23 @@
1
+ #--
2
+ # Copyright (c) 2011-2013 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You may
6
+ # obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ module RJack
18
+ module RZooKeeper
19
+ ZOOKEEPER_VERSION = '3.3.6'
20
+ VERSION = ZOOKEEPER_VERSION + '.0'
21
+ LIB_DIR = File.dirname( __FILE__ ) # :nodoc:
22
+ end
23
+ end
data/pom.xml ADDED
@@ -0,0 +1,66 @@
1
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2
+
3
+ <modelVersion>4.0.0</modelVersion>
4
+ <groupId>rjack</groupId>
5
+ <artifactId>rjack-zookeeper</artifactId>
6
+ <packaging>pom</packaging>
7
+ <version>1.0</version>
8
+ <name>ZooKeeper for Gem</name>
9
+
10
+ <properties>
11
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12
+ </properties>
13
+
14
+ <dependencies>
15
+
16
+ <dependency>
17
+ <groupId>org.apache.zookeeper</groupId>
18
+ <artifactId>zookeeper</artifactId>
19
+ <version>3.3.6</version>
20
+ <exclusions>
21
+ <exclusion>
22
+ <groupId>org.slf4j</groupId>
23
+ <artifactId>slf4j-log4j12</artifactId>
24
+ </exclusion>
25
+ <exclusion>
26
+ <groupId>log4j</groupId>
27
+ <artifactId>log4j</artifactId>
28
+ </exclusion>
29
+ <exclusion>
30
+ <groupId>junit</groupId>
31
+ <artifactId>junit</artifactId>
32
+ </exclusion>
33
+ <exclusion>
34
+ <groupId>jline</groupId>
35
+ <artifactId>jline</artifactId>
36
+ </exclusion>
37
+ </exclusions>
38
+ </dependency>
39
+ </dependencies>
40
+
41
+ <build>
42
+ <plugins>
43
+ <plugin>
44
+ <artifactId>maven-assembly-plugin</artifactId>
45
+ <version>2.2.1</version>
46
+ <configuration>
47
+ <attach>false</attach>
48
+ <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
49
+ <descriptors>
50
+ <descriptor>assembly.xml</descriptor>
51
+ </descriptors>
52
+ </configuration>
53
+ <executions>
54
+ <execution>
55
+ <id>assembly</id>
56
+ <phase>package</phase>
57
+ <goals>
58
+ <goal>single</goal>
59
+ </goals>
60
+ </execution>
61
+ </executions>
62
+ </plugin>
63
+ </plugins>
64
+ </build>
65
+
66
+ </project>
data/test/setup.rb ADDED
@@ -0,0 +1,18 @@
1
+ $LOAD_PATH.unshift( File.join( File.dirname( __FILE__ ), '..', 'lib' ) )
2
+
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+
6
+ require 'minitest/unit'
7
+ require 'minitest/autorun'
8
+
9
+ require 'rjack-slf4j/log4j-over-slf4j'
10
+ require 'rjack-logback'
11
+
12
+ RJack::Logback.config_console( :stderr => true )
13
+
14
+ if ARGV.include?( '-v' ) || ARGV.include?( '--verbose' )
15
+ RJack::Logback.root.level = :debug
16
+ else
17
+ RJack::Logback[ 'org.apache.zookeeper' ].level = :warn
18
+ end
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env jruby
2
+ #.hashdot.profile += jruby-shortlived
3
+
4
+ #--
5
+ # Copyright (c) 2011-2013 David Kellum
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
8
+ # may not use this file except in compliance with the License. You may
9
+ # obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16
+ # implied. See the License for the specific language governing
17
+ # permissions and limitations under the License.
18
+ #++
19
+
20
+ require File.join( File.dirname( __FILE__ ), "setup" )
21
+
22
+ require 'rjack-zookeeper'
23
+
24
+ class TestZooKeeper < MiniTest::Unit::TestCase
25
+
26
+ def test
27
+ pass #FIXME
28
+ end
29
+
30
+ end
metadata ADDED
@@ -0,0 +1,143 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rjack-zookeeper
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 3.3.6.0
6
+ platform: java
7
+ authors:
8
+ - David Kellum
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-03 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rjack-slf4j
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: 1.6.5
21
+ - - <
22
+ - !ruby/object:Gem::Version
23
+ version: '1.8'
24
+ none: false
25
+ requirement: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.6.5
30
+ - - <
31
+ - !ruby/object:Gem::Version
32
+ version: '1.8'
33
+ none: false
34
+ prerelease: false
35
+ type: :runtime
36
+ - !ruby/object:Gem::Dependency
37
+ name: minitest
38
+ version_requirements: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ~>
41
+ - !ruby/object:Gem::Version
42
+ version: '2.3'
43
+ none: false
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: '2.3'
49
+ none: false
50
+ prerelease: false
51
+ type: :development
52
+ - !ruby/object:Gem::Dependency
53
+ name: rjack-logback
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ version: '1.2'
59
+ none: false
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ~>
63
+ - !ruby/object:Gem::Version
64
+ version: '1.2'
65
+ none: false
66
+ prerelease: false
67
+ type: :development
68
+ - !ruby/object:Gem::Dependency
69
+ name: rjack-tarpit
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ~>
73
+ - !ruby/object:Gem::Version
74
+ version: '2.0'
75
+ none: false
76
+ requirement: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ~>
79
+ - !ruby/object:Gem::Version
80
+ version: '2.0'
81
+ none: false
82
+ prerelease: false
83
+ type: :development
84
+ description:
85
+ email:
86
+ - dek-oss@gravitext.com
87
+ executables:
88
+ - rjack-zookeeper-cli
89
+ - rjack-zookeeper-fg
90
+ extensions: []
91
+ extra_rdoc_files:
92
+ - History.rdoc
93
+ - README.rdoc
94
+ files:
95
+ - History.rdoc
96
+ - Manifest.txt
97
+ - README.rdoc
98
+ - Rakefile
99
+ - assembly.xml
100
+ - pom.xml
101
+ - bin/rjack-zookeeper-cli
102
+ - bin/rjack-zookeeper-fg
103
+ - config/zoo.cfg
104
+ - init/rjack-zookeeper
105
+ - lib/rjack-zookeeper/base.rb
106
+ - lib/rjack-zookeeper.rb
107
+ - test/setup.rb
108
+ - test/test_zookeeper.rb
109
+ - lib/rjack-zookeeper/zookeeper-3.3.6.jar
110
+ homepage: http://rjack.rubyforge.org/zookeeper
111
+ licenses: []
112
+ post_install_message:
113
+ rdoc_options:
114
+ - --main
115
+ - README.rdoc
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ! '>='
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ segments:
124
+ - 0
125
+ hash: 2
126
+ none: false
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ segments:
133
+ - 0
134
+ hash: 2
135
+ none: false
136
+ requirements: []
137
+ rubyforge_project:
138
+ rubygems_version: 1.8.24
139
+ signing_key:
140
+ specification_version: 3
141
+ summary: A gem packaging of ZooKeeper for JRuby including the ZooKeeper jar (used for server and client), foreground and init daemon scripts, and CLI client script.
142
+ test_files: []
143
+ ...