[jira] [Resolved] (THRIFT-1779) Missing process_XXXX method in generated TProcessor implementation for all 'oneway' service functions
[ https://issues.apache.org/jira/browse/THRIFT-1779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roger Meier resolved THRIFT-1779. - Resolution: Fixed Thanks Luis! > Missing process_ method in generated TProcessor implementation for all > 'oneway' service functions > - > > Key: THRIFT-1779 > URL: https://issues.apache.org/jira/browse/THRIFT-1779 > Project: Thrift > Issue Type: Bug > Components: Cocoa - Compiler >Affects Versions: 0.9 >Reporter: Luis Laugga >Priority: Critical > Labels: patch > Fix For: 1.0 > > Attachments: thrift-issue-1779.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > The generated TProcessor class implementation for services with methods that > have the _oneway_ modifier is incomplete. > This method is missing in the service generated implementation: > *-(void)process__withSequenceID:(int32_t)seqID > inProtocol:(id)inProtocol outProtocol:(id)outProtocol* > During initialization, for _mMethodMap_: > *SEL s = @selector(process__withSequenceID:inProtocol:outProtocol:);* > *NSMethodSignature * sig = [self methodSignatureForSelector: s];* > Because the method _process__withSequenceID:inProtocol:outProtocol:_ > implementation is missing, _methodSignatureForSelector_ will return *nil* > (_sig_ is *nil*). > The following call: > *NSInvocation * invocation = [NSInvocation invocationWithMethodSignature: > sig];* > Will throw an exception: > *'NSInvalidArgumentException', reason: '+[NSInvocation > _invocationWithMethodSignature:frame:]: method signature argument cannot be > nil'* -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1803) Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes
[ https://issues.apache.org/jira/browse/THRIFT-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539781#comment-13539781 ] Tony Spataro commented on THRIFT-1803: -- Verified that the THRIFT-1766 patch fixes my problem when applied on top of 0.9.0 -- at least for the pure-Ruby protocol impl. I'm not able to test the C extension library on my laptop; let me know if this test would be valuable and I'll perform it on a Linux box. Thanks much for the contribution! > Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes > -- > > Key: THRIFT-1803 > URL: https://issues.apache.org/jira/browse/THRIFT-1803 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 > Environment: $ uname -a > Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux > (Debian 7 testing) > Cassandra 1.0.12 > rvm 1.17.2 (stable) > ruby-1.9.2-p290 > $ bundle list > Gems included by the bundle: > * bundler (1.2.3) > * cassandra (0.17.0) > * json (1.7.5) > * rake (10.0.3) > * simple_uuid (0.2.0) > * thrift (0.9.0) > * thrift_client (0.8.3) >Reporter: Aliaksei Kruk > > Cassandra supports UUID comparator type and thrift 0.8 works with UUID > without problems. > cassandra-cli: > create column family test_uuid with comparator = 'TimeUUIDType'; > ruby: > require 'cassandra' > cassandra = Cassandra.new('test', '127.0.0.1:9160') > cassandra.insert('test_uuid', '1', {SimpleUUID::UUID.new(Time.now.utc) => > 'ok' }) > execution: > $ bundle exec ruby lib/test.rb > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `encode': "\xA2" from ASCII-8BIT to UTF-8 > (Encoding::UndefinedConversionError) > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `convert_to_utf8_byte_buffer' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write_string' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `send_message' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:247:in > `send_batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:242:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `block in handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:140:in > `ensure_socket_alignment' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:53:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/protocol.rb:7:in > `_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/cassandra.rb:463:in > `insert' > from lib/test.rb:4:in `' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (THRIFT-1811) ruby tutorial as part of the regular build
Roger Meier created THRIFT-1811: --- Summary: ruby tutorial as part of the regular build Key: THRIFT-1811 URL: https://issues.apache.org/jira/browse/THRIFT-1811 Project: Thrift Issue Type: Sub-task Components: Ruby - Compiler, Ruby - Library, Tutorial Reporter: Roger Meier ruby tutorial as part of the regular build via configure.ac & co see tutorial/java as an example -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (THRIFT-1766) [Ruby] Provide support for binary types
[ https://issues.apache.org/jira/browse/THRIFT-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roger Meier resolved THRIFT-1766. - Resolution: Fixed Assignee: Nathan Beyer I committed this, thanks Nathan! - created THRIFT-1810 for ruby as part of the cross language test suite - reopened THRIFT-429 to get a binary type for the future - created THRIFT-1735 to get the ruby tutorial built automatically > [Ruby] Provide support for binary types > --- > > Key: THRIFT-1766 > URL: https://issues.apache.org/jira/browse/THRIFT-1766 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 >Reporter: Nathan Beyer >Assignee: Nathan Beyer > Attachments: THRIFT-1766-provide-support-for-binary-types.patch > > > The Ruby library didn't provide explicit support for 'binary' types, which > sort of worked on Ruby 1.8.7 and with Thrift 0.8, but it doesn't work with > Ruby 1.9.3 and the encoding changes that were included with Thrift 0.9. > This issue is intended to provide first class support for the 'binary' type. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (THRIFT-1810) add ruby to test/test.sh
Roger Meier created THRIFT-1810: --- Summary: add ruby to test/test.sh Key: THRIFT-1810 URL: https://issues.apache.org/jira/browse/THRIFT-1810 Project: Thrift Issue Type: Sub-task Components: Ruby - Library, Test Suite Reporter: Roger Meier we need ruby as part of the cross language test suite, currently just a shell script (test/test.sh) running on Linux. references THRIFT-1766 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (THRIFT-429) Make binary a full-fledged type of its own
[ https://issues.apache.org/jira/browse/THRIFT-429?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Roger Meier reopened THRIFT-429: We need a binary type and have to update this http://thrift.apache.org/docs/types/ > Make binary a full-fledged type of its own > -- > > Key: THRIFT-429 > URL: https://issues.apache.org/jira/browse/THRIFT-429 > Project: Thrift > Issue Type: Improvement >Affects Versions: 0.1 >Reporter: Chad Walters > > From the point of view of the protocol abstraction, the 'binary' type looks > like a full-fledged type but under the covers the implementation is such that > the wire format encodes 'string' and 'binary' types with the same type code. > I'd like to see 'binary' become a full-fledged type instead. > This wart of the implementation has at least one strange and unexpected > implication: protocol implementations must be careful that 'string' values > can be skipped properly by way of the readBinary() method. This affects > protocols where the wire format of 'string' is different from the wire format > of 'binary'. I encountered this problem when implementing the JSON protocol. > I am not sure if there are other implications of this wart -- it's possible > there are others that have not been surfaced yet. > This is unfortunately a backwards-compatibility breaking change and has > implications for those who have large investments in persisted Thrift > structures. I realize that the down-side here so far is fairly limited -- the > JSON protocol was able to work around this without too big a problem. We had > discussed this a year ago and got some level of agreement that we wouldn't do > this until there were some other significant backwards-compatibility breakage. > However, it only becomes harder over time for such a change to be made, as > more people persist more and more Thrift data. I think it is pretty clear > that in retrospect we would not have designed things such that the same type > code is used on the wire for 'string' and 'binary'. I wonder if the current > users of Thrift who would be impacted by this now would agree to take on the > pain of this change now so that future users will not have to go through this > pain (also, their own pain might be lessened by doing this sooner rather than > later). > I am raising the issue and targeting for 0.1 to prompt a little bit of > discussion. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1803) Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes
[ https://issues.apache.org/jira/browse/THRIFT-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539762#comment-13539762 ] Nathan Beyer commented on THRIFT-1803: -- {quote} Tony Spataro added a comment - 26/Dec/12 13:35 Thank you for pointer to the related issue; THRIFT-1766 seems like the core issue here. The Cassandra Ruby library isn't yet aware of String encodings. In this particular case, I don't think it would make a difference because the cassandra library does grok that UUID objects must be converted to a String, and the encoding of the resulting String objects is correct (BINARY, aka ASCII-8BIT) – so the Cassandra library is doing the right thing for an IDL element whose type is "binary."{quote} Based on that, Cassandra is doing the appropriate thing. THRIFT-1766 should fix this issue then. If you or anyone can try running a patched version and testing it to see if it fixes the issue, I'd appreciate the additional verification of THRIFT-1766's patches. > Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes > -- > > Key: THRIFT-1803 > URL: https://issues.apache.org/jira/browse/THRIFT-1803 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 > Environment: $ uname -a > Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux > (Debian 7 testing) > Cassandra 1.0.12 > rvm 1.17.2 (stable) > ruby-1.9.2-p290 > $ bundle list > Gems included by the bundle: > * bundler (1.2.3) > * cassandra (0.17.0) > * json (1.7.5) > * rake (10.0.3) > * simple_uuid (0.2.0) > * thrift (0.9.0) > * thrift_client (0.8.3) >Reporter: Aliaksei Kruk > > Cassandra supports UUID comparator type and thrift 0.8 works with UUID > without problems. > cassandra-cli: > create column family test_uuid with comparator = 'TimeUUIDType'; > ruby: > require 'cassandra' > cassandra = Cassandra.new('test', '127.0.0.1:9160') > cassandra.insert('test_uuid', '1', {SimpleUUID::UUID.new(Time.now.utc) => > 'ok' }) > execution: > $ bundle exec ruby lib/test.rb > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `encode': "\xA2" from ASCII-8BIT to UTF-8 > (Encoding::UndefinedConversionError) > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `convert_to_utf8_byte_buffer' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write_string' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `send_message' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:247:in > `send_batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:242:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `block in handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:140:in > `ensure_socket_alignment' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:53:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/protocol.rb:7:in > `_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/cassandra.rb:463:in > `insert' > from lib/test.rb:4:in `' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1766) [Ruby] Provide support for binary types
[ https://issues.apache.org/jira/browse/THRIFT-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539756#comment-13539756 ] Nathan Beyer commented on THRIFT-1766: -- {quote}Roger Meier added a comment - 26/Dec/12 16:50 I think we should create a dedicated base type binary instead of adding such fields. see http://thrift.apache.org/docs/types/{quote} I agree, but it seems that ship has already sailed. The use of binary types as a string without encoding using the IDL's metadata is already in most of the libraries already - it seemed to be in Java, C++ and Python already. I created this issue and the patches, so that I could get Java and Ruby interop going. Any reason to prevent putting this into the Ruby library without a full protocol enhancement? There was an issue about a full binary type, THRIFT-429, but that was closed as it was seemingly deemed "not necessary". Perhaps that issue should be reopened, or a new issue created for a protocol enhancement to get full binary support. > [Ruby] Provide support for binary types > --- > > Key: THRIFT-1766 > URL: https://issues.apache.org/jira/browse/THRIFT-1766 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 >Reporter: Nathan Beyer > Attachments: THRIFT-1766-provide-support-for-binary-types.patch > > > The Ruby library didn't provide explicit support for 'binary' types, which > sort of worked on Ruby 1.8.7 and with Thrift 0.8, but it doesn't work with > Ruby 1.9.3 and the encoding changes that were included with Thrift 0.9. > This issue is intended to provide first class support for the 'binary' type. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1766) [Ruby] Provide support for binary types
[ https://issues.apache.org/jira/browse/THRIFT-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539753#comment-13539753 ] Nathan Beyer commented on THRIFT-1766: -- {quote}Roger Meier added a comment - 26/Dec/12 16:45 Could you provide some patches to integrate ruby into the cross language test suite(THRIFT-847)? We use test/test.sh to test across languages such as cpp+java+py+js+nodejs.{quote} I thought the Ruby library was already participating in this. There's already some external tests reference in the Rake commands, but perhaps those are for something else (compiler tests?). Are these the tests you're referring to: https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=tree;f=test/rb;h=c9e42987ef18bb61285298d82d8ef5f5d59bc77e;hb=HEAD Are you just asking for some additional test cases? Either way, should that work happen on this issue or on THRIFT-847? I'd prefer to do it on THRIFT-847 or a new issue, if you don't mind. > [Ruby] Provide support for binary types > --- > > Key: THRIFT-1766 > URL: https://issues.apache.org/jira/browse/THRIFT-1766 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 >Reporter: Nathan Beyer > Attachments: THRIFT-1766-provide-support-for-binary-types.patch > > > The Ruby library didn't provide explicit support for 'binary' types, which > sort of worked on Ruby 1.8.7 and with Thrift 0.8, but it doesn't work with > Ruby 1.9.3 and the encoding changes that were included with Thrift 0.9. > This issue is intended to provide first class support for the 'binary' type. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1804) Binary+compact protocol corruption in ARM compilation
[ https://issues.apache.org/jira/browse/THRIFT-1804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539736#comment-13539736 ] Elias Karakoulakis commented on THRIFT-1804: Root cause might be that gcc-4.4.5 for ARM is misbehaving: | GCC 4.3.5 and GCC 4.4.5 on ARM: These can miscompile value >> 1 even at -O0. A test failure in test/Assembler/alignstack.ll is one symptom of the problem. (from http://llvm.org/docs/GettingStarted.html#requirements) > Binary+compact protocol corruption in ARM compilation > - > > Key: THRIFT-1804 > URL: https://issues.apache.org/jira/browse/THRIFT-1804 > Project: Thrift > Issue Type: Bug > Components: Build Process >Affects Versions: 0.9 > Environment: - Debian/ARM Squeeze 6.0.6 native armv5te, compiler: gcc > (Debian 4.4.5-8) 4.4.5 > - Debian/ARM Squeeze 6.0.6 emulated armvtejl, compiler: gcc (Debian 4.4.5-8) > 4.4.5 >Reporter: Elias Karakoulakis > > These compilation tests fail when compiling for ARM: > 1) BinaryProtocolAccelerated it should behave like a binary protocol should > read a byte > Failure/Error: @prot.read_byte.should == i >{*}expected: -128{*} > {*}got: 128 (using ==){*} > Shared Example Group: "a binary protocol" called from > ./spec/binary_protocol_accelerated_spec.rb:28 > # ./spec/binary_protocol_spec_shared.rb:291:in `block (3 levels) in (required)>' > # ./spec/binary_protocol_spec_shared.rb:289:in `each' > # ./spec/binary_protocol_spec_shared.rb:289:in `block (2 levels) in (required)>' > 2) BinaryProtocolAccelerated it should behave like a binary protocol should > perform a complete rpc with a struct return type > Failure/Error: result.should == Fixtures::COMPACT_PROTOCOL_TEST_STRUCT >expected: 127]{*}, > got: 127]{*}, ... (using ==) > (***) only byte_list gets corrupted > Shared Example Group: "a binary protocol" called from > ./spec/binary_protocol_accelerated_spec.rb:28 > # ./spec/binary_protocol_spec_shared.rb:375:in `block (3 levels) in (required)>' > # ./spec/binary_protocol_spec_shared.rb:406:in `call' > # ./spec/binary_protocol_spec_shared.rb:406:in `srv_test' > # ./spec/binary_protocol_spec_shared.rb:370:in `block (2 levels) in (required)>' > 3) Thrift::CompactProtocol should encode and decode naked primitives > correctly > Failure/Error: read_back.should == value >{*}expected: -127{*} > {*}got: 129 (using ==){*} > # ./spec/compact_protocol_spec.rb:45:in `block (4 levels) in (required)>' > # ./spec/compact_protocol_spec.rb:37:in `each' > # ./spec/compact_protocol_spec.rb:37:in `block (3 levels) in (required)>' > # ./spec/compact_protocol_spec.rb:36:in `each_pair' > # ./spec/compact_protocol_spec.rb:36:in `block (2 levels) in (required)>' > 4) Thrift::CompactProtocol should encode and decode primitives in fields > correctly > Failure/Error: read_back.should == value >{*}expected: -127{*} > {*}got: 129 (using ==){*} > # ./spec/compact_protocol_spec.rb:68:in `block (4 levels) in (required)>' > # ./spec/compact_protocol_spec.rb:55:in `each' > # ./spec/compact_protocol_spec.rb:55:in `block (3 levels) in (required)>' > # ./spec/compact_protocol_spec.rb:51:in `each_pair' > # ./spec/compact_protocol_spec.rb:51:in `block (2 levels) in (required)>' > Finished in 5.87 seconds > 364 examples, 4 failures, 1 pending -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1766) [Ruby] Provide support for binary types
[ https://issues.apache.org/jira/browse/THRIFT-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539732#comment-13539732 ] Roger Meier commented on THRIFT-1766: - I think we should create a dedicated base type *binary* instead of adding such fields. see http://thrift.apache.org/docs/types/ > [Ruby] Provide support for binary types > --- > > Key: THRIFT-1766 > URL: https://issues.apache.org/jira/browse/THRIFT-1766 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 >Reporter: Nathan Beyer > Attachments: THRIFT-1766-provide-support-for-binary-types.patch > > > The Ruby library didn't provide explicit support for 'binary' types, which > sort of worked on Ruby 1.8.7 and with Thrift 0.8, but it doesn't work with > Ruby 1.9.3 and the encoding changes that were included with Thrift 0.9. > This issue is intended to provide first class support for the 'binary' type. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1766) [Ruby] Provide support for binary types
[ https://issues.apache.org/jira/browse/THRIFT-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539730#comment-13539730 ] Roger Meier commented on THRIFT-1766: - Could you provide some patches to integrate ruby into the cross language test suite(THRIFT-847)? We use test/test.sh to test across languages such as cpp+java+py+js+nodejs. > [Ruby] Provide support for binary types > --- > > Key: THRIFT-1766 > URL: https://issues.apache.org/jira/browse/THRIFT-1766 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 >Reporter: Nathan Beyer > Attachments: THRIFT-1766-provide-support-for-binary-types.patch > > > The Ruby library didn't provide explicit support for 'binary' types, which > sort of worked on Ruby 1.8.7 and with Thrift 0.8, but it doesn't work with > Ruby 1.9.3 and the encoding changes that were included with Thrift 0.9. > This issue is intended to provide first class support for the 'binary' type. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1797) Python implementation of TSimpleJSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539692#comment-13539692 ] Roger Meier commented on THRIFT-1797: - Thanks Avi! I committed this. Could you please have a look at this issue within cross language test suite? {noformat} $ cd test $ sh test.sh . Apache Thrift - integration test suite Wed Dec 26 21:59:07 CET 2012 == client-server: protocol: transport:result: ... cpp-py binary buffered-ip failure === server message === Traceback (most recent call last): File "py/../../lib/py/build/lib.linux-x86_64-2.6/thrift/server/TServer.py", line 84, in serve self.processor.process(iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1006, in process self._processMap[name](self, seqid, iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1170, in process_testMapMap result.write(oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 3054, in write oprot.writeMapBegin(TType.I32, TType.MAP, len(self.success)) TypeError: object of type 'int' has no len() === client message === testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6} testSet({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testEnum(ONE) = 1 testEnum(TWO) = 2 testEnum(THREE) = 3 testEnum(FIVE) = 5 testEnum(EIGHT) = 8 testTypedef(309858235082523) = 309858235082523 testMapMap(1)Aborted == client-server: protocol: transport:result: cpp-py jsonbuffered-ip failure === server message === Traceback (most recent call last): File "py/../../lib/py/build/lib.linux-x86_64-2.6/thrift/server/TServer.py", line 84, in serve self.processor.process(iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1006, in process self._processMap[name](self, seqid, iprot, oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 1170, in process_testMapMap result.write(oprot) File "py/gen-py/ThriftTest/ThriftTest.py", line 3054, in write oprot.writeMapBegin(TType.I32, TType.MAP, len(self.success)) TypeError: object of type 'int' has no len() === client message === testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6} testSet({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2} testEnum(ONE) = 1 testEnum(TWO) = 2 testEnum(THREE) = 3 testEnum(FIVE) = 5 testEnum(EIGHT) = 8 testTypedef(309858235082523) = 309858235082523 testMapMap(1)Aborted == {noformat} > Python implementation of TSimpleJSONProtocol > - > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library >Affects Versions: 1.2 > Environment: Ubuntu >Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (THRIFT-1809) NEWS, DISCLAIMER and CONTRIBUTORS is out of date => remove them
Roger Meier created THRIFT-1809: --- Summary: NEWS, DISCLAIMER and CONTRIBUTORS is out of date => remove them Key: THRIFT-1809 URL: https://issues.apache.org/jira/browse/THRIFT-1809 Project: Thrift Issue Type: Bug Reporter: Roger Meier I suggest to remove these files. NEWS sould be removed as long as it is outdated. Remove the DISCLAIMER file, we are a tlp project now. CONTRIBUTORS file is updated and can be generated from jira if required. Do you agree? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1797) Python implementation of TSimpleJSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539668#comment-13539668 ] Avi Flamholz commented on THRIFT-1797: -- Roger -- I uploaded a new patch wherein the test passes even if you are using Python 2.6 or earlier (assertDictEqual was added in 2.7, I discovered). Avi > Python implementation of TSimpleJSONProtocol > - > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library >Affects Versions: 1.2 > Environment: Ubuntu >Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1797) Python implementation of TSimpleJSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Avi Flamholz updated THRIFT-1797: - Attachment: (was: python_simple_json_protocol.patch) > Python implementation of TSimpleJSONProtocol > - > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library >Affects Versions: 1.2 > Environment: Ubuntu >Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1797) Python implementation of TSimpleJSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Avi Flamholz updated THRIFT-1797: - Attachment: python_simple_json_protocol.patch Updated patch where TSimpleJSONProtocolTest passes in Python versions 2.6 and earlier (where TestCase.assertDictEqual is not yet defined). > Python implementation of TSimpleJSONProtocol > - > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library >Affects Versions: 1.2 > Environment: Ubuntu >Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1797) Python implementation of TSimpleJSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Avi Flamholz updated THRIFT-1797: - Attachment: (was: python_simple_json_protocol.patch) > Python implementation of TSimpleJSONProtocol > - > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library >Affects Versions: 1.2 > Environment: Ubuntu >Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1708) Add event handlers for processor events
[ https://issues.apache.org/jira/browse/THRIFT-1708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539666#comment-13539666 ] Roger Meier commented on THRIFT-1708: - Andrew, this is a nice feature we should merge. I have one question on the processor api, where you did this change: {noformat} - processor.process(inProtocol, outProtocol); + TProcessorContext context = new TProcessorContext(inProtocol, outProtocol); + processor.process(context, inProtocol, outProtocol); {noformat} Why do we need to add protocol parameters to process function again? I would prefer something like this: {noformat} - processor.process(inProtocol, outProtocol); + TProcessorContext context = new TProcessorContext(inProtocol, outProtocol); + processor.process(context); {noformat} Or did I miss something here? roger ;-r > Add event handlers for processor events > --- > > Key: THRIFT-1708 > URL: https://issues.apache.org/jira/browse/THRIFT-1708 > Project: Thrift > Issue Type: New Feature > Components: Java - Library >Affects Versions: 0.9 > Environment: all >Reporter: Andrew Cox >Assignee: Andrew Cox >Priority: Minor > Fix For: 1.0 > > Attachments: thrift-1708-processor-event-handlers.patch > > > Integrates some code we've been using (here at facebook) to add event > handlers that can handle processor events with the server event handlers in > apache thrift. > Processor events include: preRead (before reading arguments), postRead (after > reading arguments), preWrite (before writing results), postWrite (after > writing results), and processorError (when a non-IDL exception is thrown as a > result of an error handling the request). The processor handler is given the > method name and input and output protocol that will be used to process the > request, and can inspect arguments on postRead, and results on pre/postWrite > events. > This change also enables event handlers for non-blocking servers. > Some unit tests are included to exercise the new processor event handlers, > and demonstrate how they can connect with server event handlers. > It also fixes a minor bug I found while testing, where FrameBuffers on > non-blocking servers could have been close()'d more than once. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1803) Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes
[ https://issues.apache.org/jira/browse/THRIFT-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539647#comment-13539647 ] Tony Spataro commented on THRIFT-1803: -- Thank you for pointer to the related issue; THRIFT-1766 seems like the core issue here. The Cassandra Ruby library isn't yet aware of String encodings. In this particular case, I don't think it would make a difference because the cassandra library *does* grok that UUID objects must be converted to a String, and the encoding of the resulting String objects is correct (BINARY, aka ASCII-8BIT) -- so the Cassandra library is doing the right thing for an IDL element whose type is "binary." > Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes > -- > > Key: THRIFT-1803 > URL: https://issues.apache.org/jira/browse/THRIFT-1803 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 > Environment: $ uname -a > Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux > (Debian 7 testing) > Cassandra 1.0.12 > rvm 1.17.2 (stable) > ruby-1.9.2-p290 > $ bundle list > Gems included by the bundle: > * bundler (1.2.3) > * cassandra (0.17.0) > * json (1.7.5) > * rake (10.0.3) > * simple_uuid (0.2.0) > * thrift (0.9.0) > * thrift_client (0.8.3) >Reporter: Aliaksei Kruk > > Cassandra supports UUID comparator type and thrift 0.8 works with UUID > without problems. > cassandra-cli: > create column family test_uuid with comparator = 'TimeUUIDType'; > ruby: > require 'cassandra' > cassandra = Cassandra.new('test', '127.0.0.1:9160') > cassandra.insert('test_uuid', '1', {SimpleUUID::UUID.new(Time.now.utc) => > 'ok' }) > execution: > $ bundle exec ruby lib/test.rb > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `encode': "\xA2" from ASCII-8BIT to UTF-8 > (Encoding::UndefinedConversionError) > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `convert_to_utf8_byte_buffer' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write_string' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `send_message' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:247:in > `send_batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:242:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `block in handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:140:in > `ensure_socket_alignment' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:53:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/protocol.rb:7:in > `_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/cassandra.rb:463:in > `insert' > from lib/test.rb:4:in `' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1803) Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes
[ https://issues.apache.org/jira/browse/THRIFT-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539617#comment-13539617 ] Nathan Beyer commented on THRIFT-1803: -- There may be an issue with the Cassandra Ruby library too. Has it been fully uplifted to support Ruby 1.9's m17n features (string encodings)? > Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes > -- > > Key: THRIFT-1803 > URL: https://issues.apache.org/jira/browse/THRIFT-1803 > Project: Thrift > Issue Type: Bug > Components: Ruby - Compiler >Affects Versions: 0.9 > Environment: $ uname -a > Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux > (Debian 7 testing) > Cassandra 1.0.12 > rvm 1.17.2 (stable) > ruby-1.9.2-p290 > $ bundle list > Gems included by the bundle: > * bundler (1.2.3) > * cassandra (0.17.0) > * json (1.7.5) > * rake (10.0.3) > * simple_uuid (0.2.0) > * thrift (0.9.0) > * thrift_client (0.8.3) >Reporter: Aliaksei Kruk > > Cassandra supports UUID comparator type and thrift 0.8 works with UUID > without problems. > cassandra-cli: > create column family test_uuid with comparator = 'TimeUUIDType'; > ruby: > require 'cassandra' > cassandra = Cassandra.new('test', '127.0.0.1:9160') > cassandra.insert('test_uuid', '1', {SimpleUUID::UUID.new(Time.now.utc) => > 'ok' }) > execution: > $ bundle exec ruby lib/test.rb > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `encode': "\xA2" from ASCII-8BIT to UTF-8 > (Encoding::UndefinedConversionError) > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `convert_to_utf8_byte_buffer' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write_string' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `send_message' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:247:in > `send_batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:242:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `block in handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:140:in > `ensure_socket_alignment' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:53:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/protocol.rb:7:in > `_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/cassandra.rb:463:in > `insert' > from lib/test.rb:4:in `' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1803) Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes
[ https://issues.apache.org/jira/browse/THRIFT-1803?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Beyer updated THRIFT-1803: - Component/s: (was: Ruby - Compiler) Ruby - Library > Ruby Thrift 0.9.0 tries to encode UUID to UTF8 and crashes > -- > > Key: THRIFT-1803 > URL: https://issues.apache.org/jira/browse/THRIFT-1803 > Project: Thrift > Issue Type: Bug > Components: Ruby - Library >Affects Versions: 0.9 > Environment: $ uname -a > Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.32-1 x86_64 GNU/Linux > (Debian 7 testing) > Cassandra 1.0.12 > rvm 1.17.2 (stable) > ruby-1.9.2-p290 > $ bundle list > Gems included by the bundle: > * bundler (1.2.3) > * cassandra (0.17.0) > * json (1.7.5) > * rake (10.0.3) > * simple_uuid (0.2.0) > * thrift (0.9.0) > * thrift_client (0.8.3) >Reporter: Aliaksei Kruk > > Cassandra supports UUID comparator type and thrift 0.8 works with UUID > without problems. > cassandra-cli: > create column family test_uuid with comparator = 'TimeUUIDType'; > ruby: > require 'cassandra' > cassandra = Cassandra.new('test', '127.0.0.1:9160') > cassandra.insert('test_uuid', '1', {SimpleUUID::UUID.new(Time.now.utc) => > 'ok' }) > execution: > $ bundle exec ruby lib/test.rb > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `encode': "\xA2" from ASCII-8BIT to UTF-8 > (Encoding::UndefinedConversionError) > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/bytes.rb:81:in > `convert_to_utf8_byte_buffer' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write_string' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `write' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift-0.9.0/lib/thrift/client.rb:35:in > `send_message' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:247:in > `send_batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/vendor/0.8/gen-rb/cassandra.rb:242:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `block in handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:140:in > `ensure_socket_alignment' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:159:in > `handled_proxy' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/thrift_client-0.8.3/lib/thrift_client/abstract_thrift_client.rb:53:in > `batch_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/protocol.rb:7:in > `_mutate' > from > /home/lioxa/.rvm/gems/ruby-1.9.2-p290@test/gems/cassandra-0.17.0/lib/cassandra/cassandra.rb:463:in > `insert' > from lib/test.rb:4:in `' -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1797) Python implementation of TSimpleJSONProtocol
[ https://issues.apache.org/jira/browse/THRIFT-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539537#comment-13539537 ] Roger Meier commented on THRIFT-1797: - Hi Avi, thanks for the patch! I would prefer to have a dedicated file for the TSimpleJSONProtocol, e.g. lib/py/src/protocol/TSimpleJSONProtocol.py however, I'm fine with this as long as TSimpleJSONProtocol is adding just a few lines of code the reason for not committing this is the following: {noformat} Testing script: /usr/bin/python ./TSimpleJSONProtocolTest.py --genpydir=gen-py-default EE. E== ERROR: testComplicated (__main__.SimpleJSONProtocolTest) -- Traceback (most recent call last): File "./TSimpleJSONProtocolTest.py", line 102, in testComplicated self.assertDictEqual(expected, actual) AttributeError: 'SimpleJSONProtocolTest' object has no attribute 'assertDictEqual' == ERROR: testSimpleMessage (__main__.SimpleJSONProtocolTest) -- Traceback (most recent call last): File "./TSimpleJSONProtocolTest.py", line 69, in testSimpleMessage self.assertDictEqual(expected, actual) AttributeError: 'SimpleJSONProtocolTest' object has no attribute 'assertDictEqual' -- Ran 3 tests in 0.001s FAILED (errors=2) E. == ERROR: testComplicated (__main__.SimpleJSONProtocolTest) -- Traceback (most recent call last): File "./TSimpleJSONProtocolTest.py", line 102, in testComplicated self.assertDictEqual(expected, actual) AttributeError: 'SimpleJSONProtocolTest' object has no attribute 'assertDictEqual' == ERROR: testSimpleMessage (__main__.SimpleJSONProtocolTest) -- Traceback (most recent call last): File "./TSimpleJSONProtocolTest.py", line 69, in testSimpleMessage self.assertDictEqual(expected, actual) AttributeError: 'SimpleJSONProtocolTest' object has no attribute 'assertDictEqual' -- Ran 3 tests in 0.001s FAILED (errors=2) Traceback (most recent call last): File "./RunClientServer.py", line 168, in runScriptTest(genpydir, script) File "./RunClientServer.py", line 108, in runScriptTest raise Exception("Script subprocess failed, retcode=%d, args: %s" % (ret, ' '.join(script_args))) Exception: Script subprocess failed, retcode=1, args: /usr/bin/python ./TSimpleJSONProtocolTest.py --genpydir=gen-py-default FAIL: RunClientServer.py == 1 of 1 test failed == make[1]: *** [check-TESTS] Error 1 {noformat} could you please have a look on this and resend a patch? regards roger ps: you can fork directly from the mirror at https://github.com/apache/thrift > Python implementation of TSimpleJSONProtocol > - > > Key: THRIFT-1797 > URL: https://issues.apache.org/jira/browse/THRIFT-1797 > Project: Thrift > Issue Type: New Feature > Components: Python - Library >Affects Versions: 1.2 > Environment: Ubuntu >Reporter: Avi Flamholz > Attachments: python_simple_json_protocol.patch, > python_simple_json_protocol.patch > > > I've attached a patch with a Python implementation of TSimpleJSONProtocol. > This protocol is write-only like the Java implementation. It also fixes a bug > in TJSONProtocol where the context stack was not being popped correctly. This > bug triggered a number of errors in the serialization and deserialization of > Thrift structures to JSON. > The patch also includes a test of TSimpleJSONProtocol. The test checks that > it returns sensible results, but does not check that the wire-format is > equivalent to the Java wire format. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (THRIFT-1808) The Thrift struct should be considered self-contained?
[ https://issues.apache.org/jira/browse/THRIFT-1808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] vivus.zhong updated THRIFT-1808: Summary: The Thrift struct should be considered self-contained? (was: The Thrift struct should be considered self-contain?) > The Thrift struct should be considered self-contained? > -- > > Key: THRIFT-1808 > URL: https://issues.apache.org/jira/browse/THRIFT-1808 > Project: Thrift > Issue Type: Improvement >Affects Versions: 0.9 >Reporter: vivus.zhong > > As the Summary. > Example: > struct Entity { > Entity entity; > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira