jruby-kafka 3.6.0-java → 4.0.0.ci.1.g0cd872b-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/lib/com/101tec/zkclient/0.8/zkclient-0.8.jar +0 -0
- data/lib/jruby-kafka.rb +0 -1
- data/lib/jruby-kafka/kafka-producer.rb +35 -25
- data/lib/jruby-kafka_jars.rb +38 -18
- data/lib/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar +0 -0
- data/lib/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar +0 -0
- data/lib/org/apache/kafka/kafka-clients/0.10.0.0/kafka-clients-0.10.0.0.jar +0 -0
- data/lib/org/apache/kafka/kafka_2.11/0.10.0.0/kafka_2.11-0.10.0.0.jar +0 -0
- data/lib/org/scala-lang/scala-library/{2.11.7/scala-library-2.11.7.jar → 2.11.8/scala-library-2.11.8.jar} +0 -0
- data/lib/org/xerial/snappy/snappy-java/{1.1.1.7/snappy-java-1.1.1.7.jar → 1.1.2.4/snappy-java-1.1.2.4.jar} +0 -0
- metadata +27 -29
- data/lib/com/101tec/zkclient/0.7/zkclient-0.7.jar +0 -0
- data/lib/jruby-kafka/version.rb +0 -4
- data/lib/net/jpountz/lz4/lz4/1.2.0/lz4-1.2.0.jar +0 -0
- data/lib/net/sf/jopt-simple/jopt-simple/3.2/jopt-simple-3.2.jar +0 -0
- data/lib/org/apache/kafka/kafka-clients/0.9.0.1/kafka-clients-0.9.0.1.jar +0 -0
- data/lib/org/apache/kafka/kafka_2.11/0.9.0.1/kafka_2.11-0.9.0.1.jar +0 -0
- data/lib/org/scala-lang/modules/scala-xml_2.11/1.0.4/scala-xml_2.11-1.0.4.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZjY4NGNmNDI0YTA4MzBiMWM5MmNlY2ExYzE3NmFlOWYzMDMxYzU1MA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
OThmZWYzMzc3ODkwNmJmZGFiNTc3ZTQ3MjY4ZmYyNmM0MmRiYjliZQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NzllMjBiY2ExNThiMmUzYzg2MTI4YmI0NmFjZTVhY2M3NTcxNTQ5ZmQ5MmFl
|
10
|
+
MjMyZGZhMjg0MTdjNWI5ZDFmMzkzODQ1MDBmMzgyZDRkNjk4MjMwMTVkMTZl
|
11
|
+
ZGNjZjRmYjNjNGQ2NWVhY2U0NGQzZWVmNjk5ZGVhNmY3MzRkNmQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZTljMjEzYjQzMjA4ZTBhZDM1NWMxMjE2NWRkMGI4ZjgwMjcxYzEzYmUyZWFl
|
14
|
+
YTEzNjMzNTBjYTFlZjM1M2ZkYjE2ZWZiZDFjNmFiN2VjMzUwZGY3M2RiMzhi
|
15
|
+
MDFkMTJjNGYxZTZmZjc3NTI5OTA3YTdhNmEwN2ViMmJkYTQ2YzE=
|
Binary file
|
data/lib/jruby-kafka.rb
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
require 'jruby-kafka/namespace'
|
2
|
-
require 'jruby-kafka/error'
|
3
2
|
require 'jruby-kafka/utility'
|
4
3
|
|
5
4
|
# noinspection JRubyStringImportInspection
|
6
|
-
class Kafka::KafkaProducer
|
5
|
+
class Kafka::KafkaProducer < Java::org.apache.kafka.clients.producer.KafkaProducer
|
7
6
|
java_import 'org.apache.kafka.clients.producer.ProducerRecord'
|
8
7
|
java_import 'org.apache.kafka.clients.producer.Callback'
|
9
|
-
KAFKA_PRODUCER = Java::org.apache.kafka.clients.producer.KafkaProducer
|
10
|
-
|
11
|
-
REQUIRED = [
|
12
|
-
:bootstrap_servers, :key_serializer
|
13
|
-
]
|
14
8
|
|
15
9
|
class RubyCallback
|
16
10
|
include Callback
|
@@ -24,30 +18,46 @@ class Kafka::KafkaProducer
|
|
24
18
|
end
|
25
19
|
end
|
26
20
|
|
27
|
-
attr_reader :
|
28
|
-
|
21
|
+
attr_reader :properties
|
22
|
+
|
23
|
+
# Create a Kafka producer.
|
24
|
+
#
|
25
|
+
# @param [Hash] config the producer configuration.
|
26
|
+
#
|
27
|
+
# @option config [String] :bootstrap_servers A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. Required.
|
28
|
+
# @option config [String] :key_serializer Serializer class for key that implements the Deserializer interface. Required.
|
29
|
+
# @option config [String] :value_serializer Serializer class for value that implements the Deserializer interface. Required.
|
30
|
+
#
|
31
|
+
# For other configuration properties and their default values see
|
32
|
+
# http://kafka.apache.org/documentation.html#producerconfigs and
|
33
|
+
# http://kafka.apache.org/0100/javadoc/index.html?org/apache/kafka/clients/consumer/KafkaConsumer.html.
|
34
|
+
#
|
29
35
|
def initialize(opts = {})
|
30
|
-
|
31
|
-
|
32
|
-
@send_method = @send_cb_method = proc { throw StandardError.new 'Producer is not connected' }
|
36
|
+
@properties = opts.clone
|
37
|
+
super Kafka::Utility.java_properties @properties
|
33
38
|
end
|
34
39
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
+
java_alias :send_method , :send, [ProducerRecord]
|
41
|
+
java_alias :send_cb_method, :send, [ProducerRecord, Callback.java_class]
|
42
|
+
|
43
|
+
# Send a message to the cluster.
|
44
|
+
#
|
45
|
+
# @param [String] topic The topic to send the message to.
|
46
|
+
# @param [Integer,nil] partition The topic partition to send the message to, or nil to allow
|
47
|
+
# the configured partitioner class to select the partition.
|
48
|
+
# @param [String,nil] key The message key, if there is one. Otherwise, nil.
|
49
|
+
# @param [String] value The message value.
|
50
|
+
# @param [Integer,nil] timestamp The message timestamp in milliseconds. If nil, the
|
51
|
+
# producer will assign it the current time.
|
52
|
+
#
|
53
|
+
# @raise [FailedToSendMessageException] if it can't send the message
|
54
|
+
def send_msg(topic, partition, key, value, timestamp=nil, &block)
|
55
|
+
record = ProducerRecord.new(topic, partition, timestamp, key, value)
|
40
56
|
|
41
|
-
# throws FailedToSendMessageException or if not connected, StandardError.
|
42
|
-
def send_msg(topic, partition, key, value, &block)
|
43
57
|
if block
|
44
|
-
send_cb_method
|
58
|
+
send_cb_method record, RubyCallback.new(block)
|
45
59
|
else
|
46
|
-
send_method
|
60
|
+
send_method record
|
47
61
|
end
|
48
62
|
end
|
49
|
-
|
50
|
-
def close
|
51
|
-
@producer.close
|
52
|
-
end
|
53
63
|
end
|
data/lib/jruby-kafka_jars.rb
CHANGED
@@ -1,20 +1,40 @@
|
|
1
1
|
# this is a generated file, to avoid over-writing it just delete this comment
|
2
|
-
|
2
|
+
begin
|
3
|
+
require 'jar_dependencies'
|
4
|
+
rescue LoadError
|
5
|
+
require 'log4j/log4j/1.2.17/log4j-1.2.17.jar'
|
6
|
+
require 'com/101tec/zkclient/0.8/zkclient-0.8.jar'
|
7
|
+
require 'org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar'
|
8
|
+
require 'net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar'
|
9
|
+
require 'org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar'
|
10
|
+
require 'org/slf4j/slf4j-log4j12/1.7.13/slf4j-log4j12-1.7.13.jar'
|
11
|
+
require 'org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar'
|
12
|
+
require 'io/netty/netty/3.7.0.Final/netty-3.7.0.Final.jar'
|
13
|
+
require 'org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar'
|
14
|
+
require 'org/apache/kafka/kafka-clients/0.10.0.0/kafka-clients-0.10.0.0.jar'
|
15
|
+
require 'junit/junit/3.8.1/junit-3.8.1.jar'
|
16
|
+
require 'org/xerial/snappy/snappy-java/1.1.2.4/snappy-java-1.1.2.4.jar'
|
17
|
+
require 'org/apache/kafka/kafka_2.11/0.10.0.0/kafka_2.11-0.10.0.0.jar'
|
18
|
+
require 'net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar'
|
19
|
+
require 'com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar'
|
20
|
+
require 'jline/jline/0.9.94/jline-0.9.94.jar'
|
21
|
+
end
|
3
22
|
|
4
|
-
|
5
|
-
require_jar( '
|
6
|
-
require_jar( '
|
7
|
-
require_jar( '
|
8
|
-
require_jar( '
|
9
|
-
require_jar( '
|
10
|
-
require_jar( '
|
11
|
-
require_jar( 'org.
|
12
|
-
require_jar( '
|
13
|
-
require_jar( 'org.
|
14
|
-
require_jar( '
|
15
|
-
require_jar( '
|
16
|
-
require_jar( 'org.
|
17
|
-
require_jar( 'org.
|
18
|
-
require_jar( '
|
19
|
-
require_jar( '
|
20
|
-
require_jar( '
|
23
|
+
if defined? Jars
|
24
|
+
require_jar( 'log4j', 'log4j', '1.2.17' )
|
25
|
+
require_jar( 'com.101tec', 'zkclient', '0.8' )
|
26
|
+
require_jar( 'org.scala-lang', 'scala-library', '2.11.8' )
|
27
|
+
require_jar( 'net.jpountz.lz4', 'lz4', '1.3.0' )
|
28
|
+
require_jar( 'org.apache.zookeeper', 'zookeeper', '3.4.6' )
|
29
|
+
require_jar( 'org.slf4j', 'slf4j-log4j12', '1.7.13' )
|
30
|
+
require_jar( 'org.slf4j', 'slf4j-api', '1.7.13' )
|
31
|
+
require_jar( 'io.netty', 'netty', '3.7.0.Final' )
|
32
|
+
require_jar( 'org.scala-lang.modules', 'scala-parser-combinators_2.11', '1.0.4' )
|
33
|
+
require_jar( 'org.apache.kafka', 'kafka-clients', '0.10.0.0' )
|
34
|
+
require_jar( 'junit', 'junit', '3.8.1' )
|
35
|
+
require_jar( 'org.xerial.snappy', 'snappy-java', '1.1.2.4' )
|
36
|
+
require_jar( 'org.apache.kafka', 'kafka_2.11', '0.10.0.0' )
|
37
|
+
require_jar( 'net.sf.jopt-simple', 'jopt-simple', '4.9' )
|
38
|
+
require_jar( 'com.yammer.metrics', 'metrics-core', '2.2.0' )
|
39
|
+
require_jar( 'jline', 'jline', '0.9.94' )
|
40
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,80 +1,80 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0.ci.1.g0cd872b
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Joseph Lawson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
+
name: concurrent-ruby
|
14
15
|
requirement: !ruby/object:Gem::Requirement
|
15
16
|
requirements:
|
16
17
|
- - <
|
17
18
|
- !ruby/object:Gem::Version
|
18
19
|
version: '2.0'
|
19
|
-
name: concurrent-ruby
|
20
|
-
prerelease: false
|
21
20
|
type: :runtime
|
21
|
+
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - <
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: jar-dependencies
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ~>
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: 0.3.2
|
33
|
-
name: jar-dependencies
|
34
|
-
prerelease: false
|
35
34
|
type: :development
|
35
|
+
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.3.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
42
43
|
requirement: !ruby/object:Gem::Requirement
|
43
44
|
requirements:
|
44
45
|
- - ~>
|
45
46
|
- !ruby/object:Gem::Version
|
46
47
|
version: '10.5'
|
47
|
-
name: rake
|
48
|
-
prerelease: false
|
49
48
|
type: :development
|
49
|
+
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.5'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
56
57
|
requirement: !ruby/object:Gem::Requirement
|
57
58
|
requirements:
|
58
59
|
- - ~>
|
59
60
|
- !ruby/object:Gem::Version
|
60
61
|
version: '3.4'
|
61
|
-
name: rspec
|
62
|
-
prerelease: false
|
63
62
|
type: :development
|
63
|
+
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
+
name: ruby-maven
|
70
71
|
requirement: !ruby/object:Gem::Requirement
|
71
72
|
requirements:
|
72
73
|
- - ~>
|
73
74
|
- !ruby/object:Gem::Version
|
74
75
|
version: '3.3'
|
75
|
-
name: ruby-maven
|
76
|
-
prerelease: false
|
77
76
|
type: :development
|
77
|
+
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ~>
|
@@ -87,7 +87,7 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- lib/com/101tec/zkclient/0.
|
90
|
+
- lib/com/101tec/zkclient/0.8/zkclient-0.8.jar
|
91
91
|
- lib/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar
|
92
92
|
- lib/io/netty/netty/3.7.0.Final/netty-3.7.0.Final.jar
|
93
93
|
- lib/jline/jline/0.9.94/jline-0.9.94.jar
|
@@ -99,45 +99,43 @@ files:
|
|
99
99
|
- lib/jruby-kafka/namespace.rb
|
100
100
|
- lib/jruby-kafka/producer.rb
|
101
101
|
- lib/jruby-kafka/utility.rb
|
102
|
-
- lib/jruby-kafka/version.rb
|
103
102
|
- lib/jruby-kafka_jars.rb
|
104
103
|
- lib/junit/junit/3.8.1/junit-3.8.1.jar
|
105
104
|
- lib/log4j/log4j/1.2.17/log4j-1.2.17.jar
|
106
|
-
- lib/net/jpountz/lz4/lz4/1.
|
107
|
-
- lib/net/sf/jopt-simple/jopt-simple/
|
108
|
-
- lib/org/apache/kafka/kafka-clients/0.
|
109
|
-
- lib/org/apache/kafka/kafka_2.11/0.
|
105
|
+
- lib/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar
|
106
|
+
- lib/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
|
107
|
+
- lib/org/apache/kafka/kafka-clients/0.10.0.0/kafka-clients-0.10.0.0.jar
|
108
|
+
- lib/org/apache/kafka/kafka_2.11/0.10.0.0/kafka_2.11-0.10.0.0.jar
|
110
109
|
- lib/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar
|
111
110
|
- lib/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar
|
112
|
-
- lib/org/scala-lang/
|
113
|
-
- lib/org/scala-lang/scala-library/2.11.7/scala-library-2.11.7.jar
|
111
|
+
- lib/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar
|
114
112
|
- lib/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar
|
115
113
|
- lib/org/slf4j/slf4j-log4j12/1.7.13/slf4j-log4j12-1.7.13.jar
|
116
|
-
- lib/org/xerial/snappy/snappy-java/1.1.
|
114
|
+
- lib/org/xerial/snappy/snappy-java/1.1.2.4/snappy-java-1.1.2.4.jar
|
117
115
|
homepage: https://github.com/joekiller/jruby-kafka
|
118
116
|
licenses:
|
119
117
|
- Apache 2.0
|
120
118
|
metadata: {}
|
121
|
-
post_install_message:
|
119
|
+
post_install_message:
|
122
120
|
rdoc_options: []
|
123
121
|
require_paths:
|
124
122
|
- lib
|
125
123
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
124
|
requirements:
|
127
|
-
- - '>='
|
125
|
+
- - ! '>='
|
128
126
|
- !ruby/object:Gem::Version
|
129
127
|
version: '0'
|
130
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
129
|
requirements:
|
132
|
-
- - '
|
130
|
+
- - ! '>'
|
133
131
|
- !ruby/object:Gem::Version
|
134
|
-
version:
|
132
|
+
version: 1.3.1
|
135
133
|
requirements:
|
136
|
-
- jar 'org.apache.kafka:kafka_2.11', '0.
|
134
|
+
- jar 'org.apache.kafka:kafka_2.11', '0.10.0.0'
|
137
135
|
- jar 'org.slf4j:slf4j-log4j12', '1.7.13'
|
138
|
-
rubyforge_project:
|
136
|
+
rubyforge_project:
|
139
137
|
rubygems_version: 2.4.5
|
140
|
-
signing_key:
|
138
|
+
signing_key:
|
141
139
|
specification_version: 4
|
142
140
|
summary: jruby Kafka wrapper
|
143
141
|
test_files: []
|
Binary file
|
data/lib/jruby-kafka/version.rb
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|