jruby-kafka 1.1.2-java → 1.2.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/com/101tec/zkclient/maven-metadata-local.xml +12 -0
- data/lib/com/yammer/metrics/metrics-core/maven-metadata-local.xml +12 -0
- data/lib/jline/jline/maven-metadata-local.xml +12 -0
- data/lib/jruby-kafka/group.rb +16 -3
- data/lib/jruby-kafka_jars.rb +6 -6
- data/lib/junit/junit/maven-metadata-local.xml +12 -0
- data/lib/log4j/log4j/maven-metadata-local.xml +12 -0
- data/lib/net/sf/jopt-simple/jopt-simple/maven-metadata-local.xml +12 -0
- data/lib/org/apache/kafka/kafka_2.9.2/maven-metadata-local.xml +12 -0
- data/lib/org/apache/zookeeper/zookeeper/maven-metadata-local.xml +12 -0
- data/lib/org/scala-lang/scala-library/maven-metadata-local.xml +12 -0
- data/lib/org/slf4j/slf4j-api/maven-metadata-local.xml +12 -0
- data/lib/org/slf4j/slf4j-log4j12/maven-metadata-local.xml +12 -0
- data/lib/org/xerial/snappy/snappy-java/maven-metadata-local.xml +12 -0
- data/lib/rubygems/axiom-types/maven-metadata-local.xml +1 -1
- data/lib/rubygems/coercible/maven-metadata-local.xml +1 -1
- data/lib/rubygems/descendants_tracker/maven-metadata-local.xml +1 -1
- data/lib/rubygems/equalizer/maven-metadata-local.xml +3 -3
- data/lib/rubygems/ice_nine/maven-metadata-local.xml +1 -1
- data/lib/rubygems/jar-dependencies/maven-metadata-local.xml +3 -3
- data/lib/rubygems/maven-tools/maven-metadata-local.xml +1 -1
- data/lib/rubygems/rake/maven-metadata-local.xml +1 -1
- data/lib/rubygems/ruby-maven/maven-metadata-local.xml +1 -1
- data/lib/rubygems/ruby-maven-libs/maven-metadata-local.xml +1 -1
- data/lib/rubygems/thread_safe/maven-metadata-local.xml +3 -3
- data/lib/rubygems/virtus/maven-metadata-local.xml +3 -3
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfdc00f4eea59fe63ed48569ce9894b7f35d89a0
|
4
|
+
data.tar.gz: abdc0849a0d8914d5d5c0181c4b23edf771ed453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b5baa3ecadd0137dc9376bf613d0a93b1f3a2b36048c6f69812cbaaa2ddf977ae53f2f7815155487cb3baad59503ba27882f19c74d53fc9bcc9a6fe6404d00d
|
7
|
+
data.tar.gz: 7c9458bb72b2b81b4782c8c3439e8875b619dc12bf3754bf7be0a28d3b98ac7d4b5c12bb25f3f248c641ff009015af05b781c91c33ccfd1cd9176a50f69f795a
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>com.101tec</groupId>
|
4
|
+
<artifactId>zkclient</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>0.3</release>
|
7
|
+
<versions>
|
8
|
+
<version>0.3</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>com.yammer.metrics</groupId>
|
4
|
+
<artifactId>metrics-core</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>2.2.0</release>
|
7
|
+
<versions>
|
8
|
+
<version>2.2.0</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>jline</groupId>
|
4
|
+
<artifactId>jline</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>0.9.94</release>
|
7
|
+
<versions>
|
8
|
+
<version>0.9.94</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
data/lib/jruby-kafka/group.rb
CHANGED
@@ -53,6 +53,8 @@ class Kafka::Group
|
|
53
53
|
@consumer_restart_on_error = "#{false}"
|
54
54
|
@consumer_restart_sleep_ms = '0'
|
55
55
|
@consumer_id = nil
|
56
|
+
@key_decoder_class = "kafka.serializer.DefaultDecoder"
|
57
|
+
@value_decoder_class = "kafka.serializer.DefaultDecoder"
|
56
58
|
|
57
59
|
if options[:zk_connect_timeout]
|
58
60
|
@zk_connect_timeout = "#{options[:zk_connect_timeout]}"
|
@@ -123,6 +125,14 @@ class Kafka::Group
|
|
123
125
|
@auto_offset_reset = "#{options[:auto_offset_reset]}"
|
124
126
|
end
|
125
127
|
|
128
|
+
if options[:key_decoder_class]
|
129
|
+
@key_decoder_class = "#{options[:key_decoder_class]}"
|
130
|
+
end
|
131
|
+
|
132
|
+
if options[:value_decoder_class]
|
133
|
+
@value_decoder_class = "#{options[:value_decoder_class]}"
|
134
|
+
end
|
135
|
+
|
126
136
|
if options[:reset_beginning]
|
127
137
|
if not options[:auto_offset_reset] || options[:auto_offset_reset] != 'smallest'
|
128
138
|
raise KafkaError.new('reset_beginning => from-beginning must be used with auto_offset_reset => smallest')
|
@@ -191,17 +201,20 @@ class Kafka::Group
|
|
191
201
|
end
|
192
202
|
|
193
203
|
def get_streams(threads)
|
204
|
+
constructor_param_class_name = "kafka.utils.VerifiableProperties"
|
205
|
+
key_decoder_instance = Java::JavaClass.for_name(@key_decoder_class).constructor(constructor_param_class_name).new_instance(nil)
|
206
|
+
value_decoder_instance = Java::JavaClass.for_name(@value_decoder_class).constructor(constructor_param_class_name).new_instance(nil)
|
194
207
|
if @topic
|
195
208
|
topic_count_map = java.util.HashMap.new
|
196
209
|
topic_count_map.put(@topic, threads)
|
197
|
-
consumer_map = @consumer.createMessageStreams(topic_count_map)
|
210
|
+
consumer_map = @consumer.createMessageStreams(topic_count_map, key_decoder_instance, value_decoder_instance)
|
198
211
|
Array.new(consumer_map[@topic])
|
199
212
|
elsif @topics_allowed
|
200
213
|
filter = Java::kafka::consumer::Whitelist.new(@topics_allowed)
|
201
|
-
Array.new(@consumer.createMessageStreamsByFilter(filter, threads))
|
214
|
+
Array.new(@consumer.createMessageStreamsByFilter(filter, threads, key_decoder_instance, value_decoder_instance))
|
202
215
|
else # @topics_filtered
|
203
216
|
filter = Java::kafka::consumer::Blacklist.new(@topics_filtered)
|
204
|
-
Array.new(@consumer.createMessageStreamsByFilter(filter, threads))
|
217
|
+
Array.new(@consumer.createMessageStreamsByFilter(filter, threads, key_decoder_instance, value_decoder_instance))
|
205
218
|
end
|
206
219
|
end
|
207
220
|
|
data/lib/jruby-kafka_jars.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# this is a generated file, to avoid over-writing it just delete this comment
|
2
2
|
require 'jar_dependencies'
|
3
3
|
|
4
|
-
require_jar( 'org.scala-lang', 'scala-library', '2.9.2' )
|
5
|
-
require_jar( 'junit', 'junit', '3.8.1' )
|
6
|
-
require_jar( 'com.101tec', 'zkclient', '0.3' )
|
7
4
|
require_jar( 'org.slf4j', 'slf4j-api', '1.7.10' )
|
8
|
-
require_jar( 'com.yammer.metrics', 'metrics-core', '2.2.0' )
|
9
5
|
require_jar( 'org.slf4j', 'slf4j-log4j12', '1.7.10' )
|
10
6
|
require_jar( 'log4j', 'log4j', '1.2.17' )
|
11
7
|
require_jar( 'jline', 'jline', '0.9.94' )
|
12
8
|
require_jar( 'net.sf.jopt-simple', 'jopt-simple', '3.2' )
|
13
|
-
require_jar( '
|
14
|
-
require_jar( '
|
9
|
+
require_jar( 'junit', 'junit', '3.8.1' )
|
10
|
+
require_jar( 'com.yammer.metrics', 'metrics-core', '2.2.0' )
|
15
11
|
require_jar( 'org.xerial.snappy', 'snappy-java', '1.0.5' )
|
12
|
+
require_jar( 'org.apache.kafka', 'kafka_2.9.2', '0.8.1.1' )
|
13
|
+
require_jar( 'org.scala-lang', 'scala-library', '2.9.2' )
|
14
|
+
require_jar( 'com.101tec', 'zkclient', '0.3' )
|
15
|
+
require_jar( 'org.apache.zookeeper', 'zookeeper', '3.3.4' )
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>junit</groupId>
|
4
|
+
<artifactId>junit</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>3.8.1</release>
|
7
|
+
<versions>
|
8
|
+
<version>3.8.1</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>log4j</groupId>
|
4
|
+
<artifactId>log4j</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>1.2.17</release>
|
7
|
+
<versions>
|
8
|
+
<version>1.2.17</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>net.sf.jopt-simple</groupId>
|
4
|
+
<artifactId>jopt-simple</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>3.2</release>
|
7
|
+
<versions>
|
8
|
+
<version>3.2</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>org.apache.kafka</groupId>
|
4
|
+
<artifactId>kafka_2.9.2</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>0.8.1.1</release>
|
7
|
+
<versions>
|
8
|
+
<version>0.8.1.1</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>org.apache.zookeeper</groupId>
|
4
|
+
<artifactId>zookeeper</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>3.3.4</release>
|
7
|
+
<versions>
|
8
|
+
<version>3.3.4</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>org.scala-lang</groupId>
|
4
|
+
<artifactId>scala-library</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>2.9.2</release>
|
7
|
+
<versions>
|
8
|
+
<version>2.9.2</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>org.slf4j</groupId>
|
4
|
+
<artifactId>slf4j-api</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>1.7.10</release>
|
7
|
+
<versions>
|
8
|
+
<version>1.7.10</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>org.slf4j</groupId>
|
4
|
+
<artifactId>slf4j-log4j12</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>1.7.10</release>
|
7
|
+
<versions>
|
8
|
+
<version>1.7.10</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<metadata>
|
3
|
+
<groupId>org.xerial.snappy</groupId>
|
4
|
+
<artifactId>snappy-java</artifactId>
|
5
|
+
<versioning>
|
6
|
+
<release>1.0.5</release>
|
7
|
+
<versions>
|
8
|
+
<version>1.0.5</version>
|
9
|
+
</versions>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
|
+
</versioning>
|
12
|
+
</metadata>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<groupId>rubygems</groupId>
|
4
4
|
<artifactId>equalizer</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<release>0.0.
|
6
|
+
<release>0.0.10</release>
|
7
7
|
<versions>
|
8
|
-
<version>0.0.
|
8
|
+
<version>0.0.10</version>
|
9
9
|
</versions>
|
10
|
-
<lastUpdated>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
11
|
</versioning>
|
12
12
|
</metadata>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<groupId>rubygems</groupId>
|
4
4
|
<artifactId>jar-dependencies</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<release>0.
|
6
|
+
<release>0.2.0</release>
|
7
7
|
<versions>
|
8
|
-
<version>0.
|
8
|
+
<version>0.2.0</version>
|
9
9
|
</versions>
|
10
|
-
<lastUpdated>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
11
|
</versioning>
|
12
12
|
</metadata>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<groupId>rubygems</groupId>
|
4
4
|
<artifactId>thread_safe</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<release>0.3.
|
6
|
+
<release>0.3.5</release>
|
7
7
|
<versions>
|
8
|
-
<version>0.3.
|
8
|
+
<version>0.3.5</version>
|
9
9
|
</versions>
|
10
|
-
<lastUpdated>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
11
|
</versioning>
|
12
12
|
</metadata>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
<groupId>rubygems</groupId>
|
4
4
|
<artifactId>virtus</artifactId>
|
5
5
|
<versioning>
|
6
|
-
<release>1.0.
|
6
|
+
<release>1.0.5</release>
|
7
7
|
<versions>
|
8
|
-
<version>1.0.
|
8
|
+
<version>1.0.5</version>
|
9
9
|
</versions>
|
10
|
-
<lastUpdated>
|
10
|
+
<lastUpdated>20150320201521</lastUpdated>
|
11
11
|
</versioning>
|
12
12
|
</metadata>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Joseph Lawson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -60,8 +60,11 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- lib/com/101tec/zkclient/0.3/zkclient-0.3.jar
|
63
|
+
- lib/com/101tec/zkclient/maven-metadata-local.xml
|
63
64
|
- lib/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar
|
65
|
+
- lib/com/yammer/metrics/metrics-core/maven-metadata-local.xml
|
64
66
|
- lib/jline/jline/0.9.94/jline-0.9.94.jar
|
67
|
+
- lib/jline/jline/maven-metadata-local.xml
|
65
68
|
- lib/jruby-kafka.rb
|
66
69
|
- lib/jruby-kafka/consumer.rb
|
67
70
|
- lib/jruby-kafka/error.rb
|
@@ -70,14 +73,23 @@ files:
|
|
70
73
|
- lib/jruby-kafka/producer.rb
|
71
74
|
- lib/jruby-kafka_jars.rb
|
72
75
|
- lib/junit/junit/3.8.1/junit-3.8.1.jar
|
76
|
+
- lib/junit/junit/maven-metadata-local.xml
|
73
77
|
- lib/log4j/log4j/1.2.17/log4j-1.2.17.jar
|
78
|
+
- lib/log4j/log4j/maven-metadata-local.xml
|
74
79
|
- lib/net/sf/jopt-simple/jopt-simple/3.2/jopt-simple-3.2.jar
|
80
|
+
- lib/net/sf/jopt-simple/jopt-simple/maven-metadata-local.xml
|
75
81
|
- lib/org/apache/kafka/kafka_2.9.2/0.8.1.1/kafka_2.9.2-0.8.1.1.jar
|
82
|
+
- lib/org/apache/kafka/kafka_2.9.2/maven-metadata-local.xml
|
76
83
|
- lib/org/apache/zookeeper/zookeeper/3.3.4/zookeeper-3.3.4.jar
|
84
|
+
- lib/org/apache/zookeeper/zookeeper/maven-metadata-local.xml
|
77
85
|
- lib/org/scala-lang/scala-library/2.9.2/scala-library-2.9.2.jar
|
86
|
+
- lib/org/scala-lang/scala-library/maven-metadata-local.xml
|
78
87
|
- lib/org/slf4j/slf4j-api/1.7.10/slf4j-api-1.7.10.jar
|
88
|
+
- lib/org/slf4j/slf4j-api/maven-metadata-local.xml
|
79
89
|
- lib/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar
|
90
|
+
- lib/org/slf4j/slf4j-log4j12/maven-metadata-local.xml
|
80
91
|
- lib/org/xerial/snappy/snappy-java/1.0.5/snappy-java-1.0.5.jar
|
92
|
+
- lib/org/xerial/snappy/snappy-java/maven-metadata-local.xml
|
81
93
|
- lib/rubygems/axiom-types/maven-metadata-local.xml
|
82
94
|
- lib/rubygems/coercible/maven-metadata-local.xml
|
83
95
|
- lib/rubygems/descendants_tracker/maven-metadata-local.xml
|