hermann 0.23.0.242-java → 0.23.0.261-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 715896bb3f1ca4df3d5d05a24697606eb0d219ca
4
- data.tar.gz: 18e6d31572fcf45e2f91065a032d2273c617adda
3
+ metadata.gz: 4e715e03945fb7ad01ee7609fcfbb4a989c8d027
4
+ data.tar.gz: a3400c46397d2b7d32506642b800c48a76cfe77d
5
5
  SHA512:
6
- metadata.gz: 43d22cb06fe0afe4afec0a20cee94b97ebe1698143038a1e36361dfa45226938a2db96cf6cb54bce9fa5c0c6445a3855409050b6d6ebe9adb46278ff48569e46
7
- data.tar.gz: c939700ce7d662f39210e02c389ae900d11ac57742ce5cb5d593ee17bded4a645341b094d94fe66c46eb526c92f8970ec32c23546bb7eb22817875b02dcb3b24
6
+ metadata.gz: 3ae5da59e45c4023cdf13168333244fa74255e4d134dd18203c4c6009f77a874c49e3099acb312fc43e6042a740133e26f4a5e22d7e9110c1e06571681125a56
7
+ data.tar.gz: 88a5d35ab6dc52d850f0bfc794222cacb82bb361ff1f260c121ae7fd678e9e2d54c8f25b39768c25ff1ff2fff796938890dd6f635031ab1c3dcd5bfe104485c4
@@ -147,6 +147,8 @@ dir_config('rdkafka', HEADER_DIRS, LIB_DIRS)
147
147
  $LOCAL_LIBS << File.join(librdkafka.path, 'lib', 'librdkafka.a')
148
148
 
149
149
  have_header('ruby/thread.h')
150
+ have_header('ruby/intern.h')
151
+ have_func('rb_thread_blocking_region')
150
152
  have_func('rb_thread_call_without_gvl')
151
153
 
152
154
  create_makefile('hermann/hermann_lib')
@@ -337,7 +337,7 @@ void consumer_init_kafka(HermannInstanceConfig* config) {
337
337
 
338
338
  // Ruby gem extensions
339
339
 
340
- #if defined(RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
340
+ #if defined(HAVE_RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
341
341
  /* NOTE: We only need this method defined if RB_THREAD_BLOCKING_REGION is
342
342
  * defined, otherwise it's unused
343
343
  */
@@ -396,8 +396,8 @@ static void consumer_consume_loop(HermannInstanceConfig* consumerConfig) {
396
396
  TRACER("\n");
397
397
 
398
398
  while (consumerConfig->run) {
399
- #ifdef RB_THREAD_BLOCKING_REGION
400
- msg = rb_thread_blocking_region(consumer_recv_msg,
399
+ #ifdef HAVE_RB_THREAD_BLOCKING_REGION
400
+ msg = (rd_kafka_message_t *) rb_thread_blocking_region((rb_blocking_function_t *) consumer_recv_msg,
401
401
  consumerConfig,
402
402
  consumer_consume_stop_callback,
403
403
  consumerConfig);
@@ -762,6 +762,9 @@ static void consumer_free(void *p) {
762
762
  rd_kafka_destroy(config->rk);
763
763
  }
764
764
 
765
+ free(config->topic);
766
+ free(config->brokers);
767
+
765
768
  // clean up the struct
766
769
  free(config);
767
770
  }
@@ -837,8 +840,8 @@ static VALUE consumer_initialize(VALUE self,
837
840
  partitionNo = FIX2INT(partition);
838
841
  Data_Get_Struct(self, HermannInstanceConfig, consumerConfig);
839
842
 
840
- consumerConfig->topic = topicPtr;
841
- consumerConfig->brokers = brokersPtr;
843
+ consumerConfig->topic = strdup(topicPtr);
844
+ consumerConfig->brokers = strdup(brokersPtr);
842
845
  consumerConfig->partition = partitionNo;
843
846
  consumerConfig->run = 1;
844
847
  consumerConfig->exit_eof = 0;
@@ -36,6 +36,10 @@
36
36
  #include <ruby/thread.h>
37
37
  #endif
38
38
 
39
+ #ifdef HAVE_RUBY_INTERN_H
40
+ #include <ruby/intern.h>
41
+ #endif
42
+
39
43
  #include <ctype.h>
40
44
  #include <signal.h>
41
45
  #include <string.h>
data/lib/hermann/java.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  module Hermann
2
2
  require 'java'
3
3
  require 'hermann_jars'
4
+ require 'concurrent'
4
5
 
5
6
  module JavaUtil
6
7
  include_package 'java.util'
@@ -1,6 +1,5 @@
1
- require 'hermann'
2
- require 'concurrent'
3
1
  require 'json'
2
+ require 'hermann'
4
3
  require 'hermann/errors'
5
4
 
6
5
  module Hermann
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hermann
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.0.242
4
+ version: 0.23.0.261
5
5
  platform: java
6
6
  authors:
7
7
  - R. Tyler Croy
@@ -10,20 +10,20 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-04-29 00:00:00.000000000 Z
13
+ date: 2015-05-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: concurrent-ruby
16
+ name: json
17
17
  version_requirements: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.7.0
21
+ version: 1.8.2
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.0
26
+ version: 1.8.2
27
27
  prerelease: false
28
28
  type: :runtime
29
29
  - !ruby/object:Gem::Dependency
@@ -40,6 +40,20 @@ dependencies:
40
40
  version: 0.3.4
41
41
  prerelease: false
42
42
  type: :runtime
43
+ - !ruby/object:Gem::Dependency
44
+ name: concurrent-ruby
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ version: 0.7.0
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: 0.7.0
55
+ prerelease: false
56
+ type: :runtime
43
57
  - !ruby/object:Gem::Dependency
44
58
  name: jar-dependencies
45
59
  version_requirements: !ruby/object:Gem::Requirement