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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/lib/com/101tec/zkclient/maven-metadata-local.xml +12 -0
  3. data/lib/com/yammer/metrics/metrics-core/maven-metadata-local.xml +12 -0
  4. data/lib/jline/jline/maven-metadata-local.xml +12 -0
  5. data/lib/jruby-kafka/group.rb +16 -3
  6. data/lib/jruby-kafka_jars.rb +6 -6
  7. data/lib/junit/junit/maven-metadata-local.xml +12 -0
  8. data/lib/log4j/log4j/maven-metadata-local.xml +12 -0
  9. data/lib/net/sf/jopt-simple/jopt-simple/maven-metadata-local.xml +12 -0
  10. data/lib/org/apache/kafka/kafka_2.9.2/maven-metadata-local.xml +12 -0
  11. data/lib/org/apache/zookeeper/zookeeper/maven-metadata-local.xml +12 -0
  12. data/lib/org/scala-lang/scala-library/maven-metadata-local.xml +12 -0
  13. data/lib/org/slf4j/slf4j-api/maven-metadata-local.xml +12 -0
  14. data/lib/org/slf4j/slf4j-log4j12/maven-metadata-local.xml +12 -0
  15. data/lib/org/xerial/snappy/snappy-java/maven-metadata-local.xml +12 -0
  16. data/lib/rubygems/axiom-types/maven-metadata-local.xml +1 -1
  17. data/lib/rubygems/coercible/maven-metadata-local.xml +1 -1
  18. data/lib/rubygems/descendants_tracker/maven-metadata-local.xml +1 -1
  19. data/lib/rubygems/equalizer/maven-metadata-local.xml +3 -3
  20. data/lib/rubygems/ice_nine/maven-metadata-local.xml +1 -1
  21. data/lib/rubygems/jar-dependencies/maven-metadata-local.xml +3 -3
  22. data/lib/rubygems/maven-tools/maven-metadata-local.xml +1 -1
  23. data/lib/rubygems/rake/maven-metadata-local.xml +1 -1
  24. data/lib/rubygems/ruby-maven/maven-metadata-local.xml +1 -1
  25. data/lib/rubygems/ruby-maven-libs/maven-metadata-local.xml +1 -1
  26. data/lib/rubygems/thread_safe/maven-metadata-local.xml +3 -3
  27. data/lib/rubygems/virtus/maven-metadata-local.xml +3 -3
  28. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 57e8bf4d2e3b3d4dd983731cf828627859ba98c8
4
- data.tar.gz: 85b93974fc499d13cabd001001cd51527e30b1f0
3
+ metadata.gz: dfdc00f4eea59fe63ed48569ce9894b7f35d89a0
4
+ data.tar.gz: abdc0849a0d8914d5d5c0181c4b23edf771ed453
5
5
  SHA512:
6
- metadata.gz: 4fd8219b7ae233b495e9d25cceb4bd4d3627e95794be3fdeaba9e64f301933b2bd36522983d13a0a4a45c658b098b7dd38d3d71f407a0bff5b22b5d14a71e308
7
- data.tar.gz: 349451819a15e1c7985cd518958a2d8f3959d0b71db5c8b8293363b868763a30e977d02c2c9bef0427f8befa1769a499a5e59a7fcd8bc4eb46e376093d94b531
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>
@@ -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
 
@@ -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( 'org.apache.zookeeper', 'zookeeper', '3.3.4' )
14
- require_jar( 'org.apache.kafka', 'kafka_2.9.2', '0.8.1.1' )
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>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>0.1.1</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>1.0.0</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>0.0.4</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -3,10 +3,10 @@
3
3
  <groupId>rubygems</groupId>
4
4
  <artifactId>equalizer</artifactId>
5
5
  <versioning>
6
- <release>0.0.9</release>
6
+ <release>0.0.10</release>
7
7
  <versions>
8
- <version>0.0.9</version>
8
+ <version>0.0.10</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>0.11.1</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</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.1.8</release>
6
+ <release>0.2.0</release>
7
7
  <versions>
8
- <version>0.1.8</version>
8
+ <version>0.2.0</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>1.0.8</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>10.4.2</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>3.1.1.0.11</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</lastUpdated>
10
+ <lastUpdated>20150320201521</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -7,6 +7,6 @@
7
7
  <versions>
8
8
  <version>3.1.1</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</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.4</release>
6
+ <release>0.3.5</release>
7
7
  <versions>
8
- <version>0.3.4</version>
8
+ <version>0.3.5</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</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.4</release>
6
+ <release>1.0.5</release>
7
7
  <versions>
8
- <version>1.0.4</version>
8
+ <version>1.0.5</version>
9
9
  </versions>
10
- <lastUpdated>20150227180156</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.1.2
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-02-27 00:00:00.000000000 Z
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