common/thrift.git
16 years agoTHRIFT-100. java: Set __isset better in beans style
David Reiss [Wed, 1 Oct 2008 03:24:50 +0000 (03:24 +0000)] 
THRIFT-100. java: Set __isset better in beans style

When setX(null) is called on a structure, set __isset.x to false.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@700667 13f79535-47bb-0310-9956-ffa450edef68

16 years agoPython generator exception namespacing, THRIFT-150
Mark Slee [Mon, 29 Sep 2008 22:01:30 +0000 (22:01 +0000)] 
Python generator exception namespacing, THRIFT-150

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@700277 13f79535-47bb-0310-9956-ffa450edef68

16 years agocontrib/fb303: Some changes to the build for the Scribe release
David Reiss [Sat, 20 Sep 2008 00:14:01 +0000 (00:14 +0000)] 
contrib/fb303: Some changes to the build for the Scribe release

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@697294 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-130. java: Eliminate frame{Read,Write} from TFramedTransport
David Reiss [Thu, 4 Sep 2008 18:23:29 +0000 (18:23 +0000)] 
THRIFT-130. java: Eliminate frame{Read,Write} from TFramedTransport

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@692185 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add pretty inspect, optional field hint for Thrift::Struct
Kevin Clark [Tue, 26 Aug 2008 20:02:07 +0000 (20:02 +0000)] 
rb: Add pretty inspect, optional field hint for Thrift::Struct

Author: Bryan Duxbury

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@689193 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add FramedTransport#borrow/consume! [THRIFT-117]
Kevin Clark [Mon, 25 Aug 2008 22:16:45 +0000 (22:16 +0000)] 
rb: Add FramedTransport#borrow/consume! [THRIFT-117]

This addition makes FramedTransport BinaryProtocolAccelerated ready.

Author: Bryan Duxbury

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@688901 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Speed up Struct#initialize for optional fields [THRFIT-112]
Kevin Clark [Mon, 25 Aug 2008 21:34:19 +0000 (21:34 +0000)] 
rb: Speed up Struct#initialize for optional fields [THRFIT-112]

Struct#initialize previously walked over every field and checked for
default values before assigning nil. The new approach assigns defaults
only to fields that have defaults, and lets Ruby handle nil ivars.

Author: Bryan Duxbury

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@688891 13f79535-47bb-0310-9956-ffa450edef68

16 years agoMerge branch 'THRIFT-103'
Kevin Clark [Mon, 4 Aug 2008 18:46:19 +0000 (18:46 +0000)] 
Merge branch 'THRIFT-103'

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@682458 13f79535-47bb-0310-9956-ffa450edef68

16 years agojava: Specify in build.xml that we are using Java 1.5
David Reiss [Mon, 4 Aug 2008 18:38:36 +0000 (18:38 +0000)] 
java: Specify in build.xml that we are using Java 1.5

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@682453 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Check container elements when Thrift.type_checking = true [THRIFT-104]
Kevin Clark [Fri, 1 Aug 2008 22:04:09 +0000 (22:04 +0000)] 
rb: Check container elements when Thrift.type_checking = true [THRIFT-104]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@681863 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-48. python: Make TServerSocket work with Unix-domain sockets
David Reiss [Thu, 31 Jul 2008 20:15:17 +0000 (20:15 +0000)] 
THRIFT-48. python: Make TServerSocket work with Unix-domain sockets

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@681467 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Support `raise Xception, message` for Structs that inherit from ::Exception ...
Kevin Clark [Mon, 28 Jul 2008 22:20:36 +0000 (22:20 +0000)] 
rb: Support `raise Xception, message` for Structs that inherit from ::Exception [THRIFT-58]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680542 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add ext/ to loadpath so BinaryProtocolAccelerated specs pass
Kevin Clark [Mon, 28 Jul 2008 22:16:34 +0000 (22:16 +0000)] 
rb: Add ext/ to loadpath so BinaryProtocolAccelerated specs pass

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680539 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Ensure the transport is closed if an exception is raised serializing data in...
Kevin Clark [Mon, 28 Jul 2008 22:16:28 +0000 (22:16 +0000)] 
rb: Ensure the transport is closed if an exception is raised serializing data in Client.send_message [THRIFT-75]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680538 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-99. php: Add scheme (http[s], etc.) support to THttpClient
David Reiss [Sun, 27 Jul 2008 23:41:13 +0000 (23:41 +0000)] 
THRIFT-99. php: Add scheme (http[s], etc.) support to THttpClient

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@680211 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Teach BinaryProtocolAccelerated to encode strings with NULs [THRIFT-97]
David Reiss [Fri, 25 Jul 2008 21:06:06 +0000 (21:06 +0000)] 
rb: Teach BinaryProtocolAccelerated to encode strings with NULs [THRIFT-97]

This patch adds a spec and fixes the behavior to properly treat strings as binary
blobs of data instead of as C strings when writing to the transport.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679899 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Spec out Thrift::BinaryProtocolAccelerated [THRIFT-90]
David Reiss [Fri, 25 Jul 2008 21:06:03 +0000 (21:06 +0000)] 
rb: Spec out Thrift::BinaryProtocolAccelerated [THRIFT-90]

Convert most of the BinaryProtocol spec into shared examples and
add specific specs for encode_binary/decode_binary.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679898 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]
David Reiss [Fri, 25 Jul 2008 21:05:59 +0000 (21:05 +0000)] 
rb: BinaryProtocolAccelerated should use Thrift::ProtocolException [THRIFT-89]

BinaryProtocolAccelerated references the deprecated name TProtocolException,
when it should be using Thrift::ProtocolException.
It also uses rb_raise() instead of rb_exc_raise().

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679897 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-91. cpp: Fix compilation on Fedora Core 9
David Reiss [Fri, 25 Jul 2008 19:48:39 +0000 (19:48 +0000)] 
THRIFT-91. cpp: Fix compilation on Fedora Core 9

It turns out that __STDC_LIMIT_MACROS is not portable.
Include limits.h at least until cstdint becomes mainstream.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679885 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-64. java: Allow TServerSocket to bind to a specific IP address
David Reiss [Thu, 24 Jul 2008 19:20:32 +0000 (19:20 +0000)] 
THRIFT-64. java: Allow TServerSocket to bind to a specific IP address

Add a new constructor to TServerSocket that accepts an InetSocketAddress
and binds to that address.  Define the old constructor (which just takes
a port) in terms of the new one.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679505 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-85. Include an example of an optional field in tutorial.thrift
David Reiss [Thu, 24 Jul 2008 19:13:54 +0000 (19:13 +0000)] 
THRIFT-85. Include an example of an optional field in tutorial.thrift

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679501 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-95. cpp: Fix write buffer initialization in TBufferedTransport
David Reiss [Thu, 24 Jul 2008 19:10:16 +0000 (19:10 +0000)] 
THRIFT-95. cpp: Fix write buffer initialization in TBufferedTransport

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@679500 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-94. erlang: Fix a syntax error
David Reiss [Tue, 22 Jul 2008 06:57:41 +0000 (06:57 +0000)] 
THRIFT-94. erlang: Fix a syntax error

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678659 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-92. Remove the shebang line from reflection_limited.thrift
David Reiss [Mon, 21 Jul 2008 19:03:31 +0000 (19:03 +0000)] 
THRIFT-92. Remove the shebang line from reflection_limited.thrift

We have tentatively decided to nix the shebang notation for Thrift files.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678530 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-93. Remove unnecessary shebang lines from Python libraries
David Reiss [Mon, 21 Jul 2008 19:03:11 +0000 (19:03 +0000)] 
THRIFT-93. Remove unnecessary shebang lines from Python libraries

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678529 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Improve IOStreamTransport to behave more like a real transport [THRIFT-76]
Kevin Clark [Fri, 18 Jul 2008 22:27:03 +0000 (22:27 +0000)] 
rb: Improve IOStreamTransport to behave more like a real transport [THRIFT-76]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678065 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Display field name in type-checking error [THRIFT-78]
Kevin Clark [Fri, 18 Jul 2008 22:03:48 +0000 (22:03 +0000)] 
rb: Display field name in type-checking error [THRIFT-78]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678059 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add TProtocolException to the backwards_compatibility_spec [THRIFT-88]
Kevin Clark [Fri, 18 Jul 2008 21:57:07 +0000 (21:57 +0000)] 
rb: Add TProtocolException to the backwards_compatibility_spec [THRIFT-88]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678055 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add optional timeout argument to Thrift::Socket [THRIFT-74]
Kevin Clark [Fri, 18 Jul 2008 21:49:50 +0000 (21:49 +0000)] 
rb: Add optional timeout argument to Thrift::Socket [THRIFT-74]

Socket.new and UNIXSocket.new both now have a new optional argument: timeout.
There's also a timeout field accessor. This timeout is used when reading or
writing.

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678053 13f79535-47bb-0310-9956-ffa450edef68

16 years agophp: Fix an undefined variasble in an error message
David Reiss [Thu, 17 Jul 2008 19:36:34 +0000 (19:36 +0000)] 
php: Fix an undefined variasble in an error message

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@677698 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-83. erlang: Don't flush an empty buffer in the http transport.
David Reiss [Wed, 16 Jul 2008 05:13:30 +0000 (05:13 +0000)] 
THRIFT-83. erlang: Don't flush an empty buffer in the http transport.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@677157 13f79535-47bb-0310-9956-ffa450edef68

16 years agojava: Add nocamel option to not CamelCase field accessors [THRIFT-42]
David Reiss [Mon, 14 Jul 2008 19:35:50 +0000 (19:35 +0000)] 
java: Add nocamel option to not CamelCase field accessors [THRIFT-42]

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676699 13f79535-47bb-0310-9956-ffa450edef68

16 years agojava: Close broken connections [THRIFT-73]
David Reiss [Sun, 13 Jul 2008 23:15:55 +0000 (23:15 +0000)] 
java: Close broken connections [THRIFT-73]

Fixes a bug where TNonblockingServer (and by extension THsHaServer) could
permanently lose track of client connections if the message on-wire was
malformed. If the client sends a bad message now, the server will close the
transport at its earliest convenience.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676456 13f79535-47bb-0310-9956-ffa450edef68

16 years agocpp: Eliminate the use of fprintf [THRIFT-77]
David Reiss [Sun, 13 Jul 2008 22:18:51 +0000 (22:18 +0000)] 
cpp: Eliminate the use of fprintf [THRIFT-77]

Add printf and perror methods to TOutput and use them to
replace uses of fprintf in the C++ library.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676448 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-37) Add some missing newlines to fprintfs.
David Reiss [Fri, 11 Jul 2008 21:39:58 +0000 (21:39 +0000)] 
(THRIFT-37) Add some missing newlines to fprintfs.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@676087 13f79535-47bb-0310-9956-ffa450edef68

16 years agos/ENABLE_RUBY/WITH_RUBY/ for consistency.
David Reiss [Fri, 11 Jul 2008 08:04:12 +0000 (08:04 +0000)] 
s/ENABLE_RUBY/WITH_RUBY/ for consistency.

This didn't happen in r666490 because the Ruby stuff was developed
in a separate branch.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675857 13f79535-47bb-0310-9956-ffa450edef68

16 years agoAdd erl back to EXTRA_DIST because it doesn't use Automake.
David Reiss [Fri, 11 Jul 2008 08:02:29 +0000 (08:02 +0000)] 
Add erl back to EXTRA_DIST because it doesn't use Automake.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675855 13f79535-47bb-0310-9956-ffa450edef68

16 years ago[THRIFT-70] Allow the Java install prefix to be configured.
David Reiss [Fri, 11 Jul 2008 01:26:16 +0000 (01:26 +0000)] 
[THRIFT-70] Allow the Java install prefix to be configured.

Systems like Debian expect the thrift jar to be in /usr/share/java, not
the default /usr/local/lib This patch allows configure to be passed a
JAVA_PREFIX= flag.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675821 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-69) Fix Util::currentTime for use in applications.
David Reiss [Fri, 11 Jul 2008 00:45:29 +0000 (00:45 +0000)] 
(THRIFT-69) Fix Util::currentTime for use in applications.

This function didn't work properly when used outside of the Thrift library
because config.h isn't available.  This patch fixes the issue by moving
the function definition into the library.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675819 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Check Thrift.type_checking earlier for a performance boost [THRIFT-55]
Kevin Clark [Tue, 8 Jul 2008 23:30:13 +0000 (23:30 +0000)] 
rb: Check Thrift.type_checking earlier for a performance boost [THRIFT-55]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675053 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Buffer the slice!s in MemoryBuffer for a significant performance increase [THRIFT-63]
Kevin Clark [Tue, 8 Jul 2008 23:20:15 +0000 (23:20 +0000)] 
rb: Buffer the slice!s in MemoryBuffer for a significant performance increase [THRIFT-63]

Author: Kevin Ballard <kevin@rapleaf.com>

Currently it buffers up to 4kB before throwing away the data.
Tests with 1MB shows the exact same performance characteristics.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@675049 13f79535-47bb-0310-9956-ffa450edef68

16 years agoMerge branch 'fastbinary'
Kevin Clark [Tue, 8 Jul 2008 00:47:49 +0000 (00:47 +0000)] 
Merge branch 'fastbinary'

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@674688 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-54) Remove "frameResponses" from TNonblockingServer
David Reiss [Thu, 3 Jul 2008 20:29:34 +0000 (20:29 +0000)] 
(THRIFT-54) Remove "frameResponses" from TNonblockingServer

TNonblockingServer and TFramedTransport used to have the option to only
frame messages on one side of the communication.  This capability was
removed from TFramedTransport because it was poorly implemented and not
useful.  This change removes it from TNonblockingServer as well, and
removes references to it in some of the C++ test code.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673791 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-5) A TNonblockingServers (single-threaded and thread-pool) for Java
David Reiss [Wed, 2 Jul 2008 23:55:04 +0000 (23:55 +0000)] 
(THRIFT-5) A TNonblockingServers (single-threaded and thread-pool) for Java

This patch adds two Thrift servers for Java that both use non-blocking I/O
to avoid locking up worker threads for idle connections.  The two classes are
- TNonblockingServer, which supports single-threaded serving
- THsHaServer, which performs I/O in one thread and method invocations in
  a configurable thread pool.
To support these servers, TNonblockingServerSocket and TNonblockingSocket
have been added.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673550 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-40) Remove stray \n's from the generated version.h
David Reiss [Mon, 30 Jun 2008 22:27:29 +0000 (22:27 +0000)] 
(THRIFT-40) Remove stray \n's from the generated version.h

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672945 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-40) Fix compilation and version string on OS X.
David Reiss [Mon, 30 Jun 2008 21:55:52 +0000 (21:55 +0000)] 
(THRIFT-40) Fix compilation and version string on OS X.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672943 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-45) TNonblockingServer (C++): only do one write in responses.
David Reiss [Mon, 30 Jun 2008 21:40:35 +0000 (21:40 +0000)] 
(THRIFT-45) TNonblockingServer (C++): only do one write in responses.

Instead of doing one 4-byte write for the frame length before the write
of the actual message, prepend the frame length to the message buffer
so we can send them both at once.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672937 13f79535-47bb-0310-9956-ffa450edef68

16 years agoPartial handlling of 64-bit integer constants.
David Reiss [Mon, 30 Jun 2008 20:45:47 +0000 (20:45 +0000)] 
Partial handlling of 64-bit integer constants.

- Parse integer constants in Thrift files as 64-bit ints.
- Die if an overflow occurs.
- Warn if an enum value cannot fit in 32 bits.
- Add a simple test for the above.

I ran all of the generators over BrokenConstants.thrift before adding the
overflow, and they appeared to work.  However, the code generated was not
always valid (for example, the 64-bit constant must have an LL suffix in C++).

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672907 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-40) Add -version switch to the compiler to show the Thrift version
David Reiss [Mon, 30 Jun 2008 20:24:24 +0000 (20:24 +0000)] 
(THRIFT-40) Add -version switch to the compiler to show the Thrift version

The version is determined by configure.ac. After this version is shown the
revision. For subversion, it is simply the current revision as given by
`svnversion`. For git, the latest svn revision that HEAD includes is shown,
followed by the offset of HEAD from that commit, followed by a truncated sha1
for HEAD. If the offset is 0, the offset and sha1 are omitted.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672900 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-61) Fix "make check" for the C++ library by not doing empty flushes.
David Reiss [Mon, 30 Jun 2008 19:48:04 +0000 (19:48 +0000)] 
(THRIFT-61) Fix "make check" for the C++ library by not doing empty flushes.

I changed the behavior of TFramedTransport when flush is called without
writing any data to the transport.  This broke the unit test, which was
relying on a weird corner of TFramedTransport's behavior in order to do
some stricter checking.  I altered the unit test to never flush without
writing and added a new test to verfy the "empty flush" behavior.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672881 13f79535-47bb-0310-9956-ffa450edef68

16 years ago(THRIFT-12) Make the Java library use java.util.logging instead of stdout.
David Reiss [Mon, 30 Jun 2008 19:13:23 +0000 (19:13 +0000)] 
(THRIFT-12) Make the Java library use java.util.logging instead of stdout.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@672868 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Ensure the specs that expect deprecation warnings actually get them [THRIFT-56]
Kevin Clark [Thu, 26 Jun 2008 18:45:29 +0000 (18:45 +0000)] 
rb: Ensure the specs that expect deprecation warnings actually get them [THRIFT-56]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671985 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: The deprecation stuff should skip thrift library code when showing caller [THRIFT-56]
Kevin Clark [Thu, 26 Jun 2008 18:45:19 +0000 (18:45 +0000)] 
rb: The deprecation stuff should skip thrift library code when showing caller [THRIFT-56]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671984 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add some additional error handling to Thrift::Socket [THRIFT-53]
Kevin Clark [Thu, 26 Jun 2008 18:35:15 +0000 (18:35 +0000)] 
rb: Add some additional error handling to Thrift::Socket [THRIFT-53]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671979 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add stubs for rake install/package when Echoe not present [THRIFT-52]
Kevin Clark [Thu, 26 Jun 2008 18:14:25 +0000 (18:14 +0000)] 
rb: Add stubs for rake install/package when Echoe not present [THRIFT-52]

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671971 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: BufferedTransport should flush on close [THRIFT-49]
Kevin Clark [Thu, 26 Jun 2008 18:10:56 +0000 (18:10 +0000)] 
rb: BufferedTransport should flush on close [THRIFT-49]

This also adds code and spec so nothing will be written to the transport
if there's nothing in the write buffer.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671967 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Use File.dirname(__FILE__) in generated requires [THRIFT-57]
Kevin Clark [Thu, 26 Jun 2008 17:49:49 +0000 (17:49 +0000)] 
rb: Use File.dirname(__FILE__) in generated requires [THRIFT-57]

This means you no longer have to put the gen-rb folder in $:

Author: Kevin Ballard <kevin@rapleaf.com>

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671963 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Make TServer.py Python 2.4 compatible [THRIFT-44]
Kevin Clark [Tue, 24 Jun 2008 20:46:32 +0000 (20:46 +0000)] 
rb: Make TServer.py Python 2.4 compatible [THRIFT-44]

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@671337 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: When passing unknown keys to Thrift::Struct.new, report those keys in the excepti...
Kevin Clark [Tue, 24 Jun 2008 01:32:03 +0000 (01:32 +0000)] 
rb: When passing unknown keys to Thrift::Struct.new, report those keys in the exception [THRIFT-51]

Author: kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670989 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Delete setup.rb [THRIFT-38]
Kevin Clark [Tue, 24 Jun 2008 01:06:10 +0000 (01:06 +0000)] 
rb: Delete setup.rb [THRIFT-38]

From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670985 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: rewrite the README [THRIFT-38]
Kevin Clark [Tue, 24 Jun 2008 01:06:08 +0000 (01:06 +0000)] 
rb: rewrite the README [THRIFT-38]

From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670984 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Change the license from Thrift Software License to Apache Software License [THRIF...
Kevin Clark [Tue, 24 Jun 2008 01:06:06 +0000 (01:06 +0000)] 
rb: Change the license from Thrift Software License to Apache Software License [THRIFT-38]

From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670983 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Use Echoe to manage the gem [THRIFT-38]
Kevin Clark [Tue, 24 Jun 2008 01:06:00 +0000 (01:06 +0000)] 
rb: Use Echoe to manage the gem [THRIFT-38]

From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670982 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Reorganize the Rakefile a bit [THRIFT-38]
Kevin Clark [Tue, 24 Jun 2008 01:05:57 +0000 (01:05 +0000)] 
rb: Reorganize the Rakefile a bit [THRIFT-38]

From kevin@rapleaf.com

Also add a guard to ensure `rake test` is only run if we're in a full thrift checkout

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670981 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Use defined? JRUBY_VERSION to detect JRuby [THRIFT-38]
Kevin Clark [Tue, 24 Jun 2008 01:05:55 +0000 (01:05 +0000)] 
rb: Use defined? JRUBY_VERSION to detect JRuby [THRIFT-38]

From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670980 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: require 'thrift' first in generated service definitions [THRIFT-38]
Kevin Clark [Tue, 24 Jun 2008 01:05:51 +0000 (01:05 +0000)] 
rb: require 'thrift' first in generated service definitions [THRIFT-38]

From kevin@rapleaf.com

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670979 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Bugfix for deprecation code [kevin@rapleaf.com][THRIFT-50]
Kevin Clark [Tue, 24 Jun 2008 00:33:00 +0000 (00:33 +0000)] 
rb: Bugfix for deprecation code [kevin@rapleaf.com][THRIFT-50]

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670976 13f79535-47bb-0310-9956-ffa450edef68

16 years agoTHRIFT-43. Ignore build-generated files.
Doug Cutting [Fri, 20 Jun 2008 22:21:19 +0000 (22:21 +0000)] 
THRIFT-43.  Ignore build-generated files.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@670083 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Switch NonblockingServer spec from Queue to sleep
Kevin Clark [Wed, 18 Jun 2008 01:20:25 +0000 (01:20 +0000)] 
rb: Switch NonblockingServer spec from Queue to sleep

Using sleep instead of Queue#pop means the thread is killable under JRuby

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669043 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: NonblockingServer: Use a select() loop in the acceptor thread
Kevin Clark [Wed, 18 Jun 2008 01:20:22 +0000 (01:20 +0000)] 
rb: NonblockingServer: Use a select() loop in the acceptor thread

Using a select() loop with a timeout allows the acceptor thread to be shut down
cleanly under JRuby.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669042 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Set default host for benchmark to 127.0.0.1
Kevin Clark [Wed, 18 Jun 2008 01:20:16 +0000 (01:20 +0000)] 
rb: Set default host for benchmark to 127.0.0.1

MRI resolves localhost to ::1 (on OS X) whereas JRuby resolves it to 127.0.0.1. This means using
MRI for server and JRuby for client doesn't work.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669041 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Fix the timeout used for joining threads when calling shutdown(timeout) on Nonblo...
Kevin Clark [Wed, 18 Jun 2008 01:20:13 +0000 (01:20 +0000)] 
rb: Fix the timeout used for joining threads when calling shutdown(timeout) on NonblockingServer

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669040 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add hooks for THRIFT_HOST and THRIFT_PORT in the benchmark
Kevin Clark [Wed, 18 Jun 2008 01:20:10 +0000 (01:20 +0000)] 
rb: Add hooks for THRIFT_HOST and THRIFT_PORT in the benchmark

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669039 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add control for the number of client processes in the benchmark
Kevin Clark [Wed, 18 Jun 2008 01:20:06 +0000 (01:20 +0000)] 
rb: Add control for the number of client processes in the benchmark

You control this with THRIFT_NUM_PROCESSES, the default is 40

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669038 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add debug logger message for processing frames
Kevin Clark [Wed, 18 Jun 2008 01:20:02 +0000 (01:20 +0000)] 
rb: Add debug logger message for processing frames

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669037 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Make a few of the NonblockingServer specs pass under jruby
Kevin Clark [Wed, 18 Jun 2008 01:19:59 +0000 (01:19 +0000)] 
rb: Make a few of the NonblockingServer specs pass under jruby

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669036 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Fix up the deprecation spec for JRuby
Kevin Clark [Wed, 18 Jun 2008 01:19:54 +0000 (01:19 +0000)] 
rb: Fix up the deprecation spec for JRuby

JRuby has different behavior regarding #method_added and #included, so the deprecation spec has to handle this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669035 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Fix the binaryprotocol spec to run under jruby
Kevin Clark [Wed, 18 Jun 2008 01:19:51 +0000 (01:19 +0000)] 
rb: Fix the binaryprotocol spec to run under jruby

Stop testing for RangeErrors with bignums in i64, that was just an artifact of the MRI interpreter that has different behavior under jruby.
JRuby uses a different Float::MIN/MAX so stop hard-coding the binary representation

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669034 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Increase the benchmark startup time and add more hooks
Kevin Clark [Wed, 18 Jun 2008 01:19:46 +0000 (01:19 +0000)] 
rb: Increase the benchmark startup time and add more hooks

You can now control the number of clients per proc and calls per client with THRIFT_NUM_CALLS and THRIFT_NUM_CLIENTS.
You can also instruct the clients to log exceptions with THRIFT_LOG_EXCEPTIONS=yes

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669033 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Drop the benchmark worker spawn delay to 0.01
Kevin Clark [Wed, 18 Jun 2008 01:19:41 +0000 (01:19 +0000)] 
rb: Drop the benchmark worker spawn delay to 0.01

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669032 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Catch TransportException errors during the benchmark and report them
Kevin Clark [Wed, 18 Jun 2008 01:19:37 +0000 (01:19 +0000)] 
rb: Catch TransportException errors during the benchmark and report them

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669031 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: flush STDOUT after starting the benchmark server to properly kickstart the benchmark
Kevin Clark [Wed, 18 Jun 2008 01:19:33 +0000 (01:19 +0000)] 
rb: flush STDOUT after starting the benchmark server to properly kickstart the benchmark

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669030 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Give the benchmark server more time to start up
Kevin Clark [Wed, 18 Jun 2008 01:19:28 +0000 (01:19 +0000)] 
rb: Give the benchmark server more time to start up

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669029 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Turn off debug logging in benchmark/thin_server.rb
Kevin Clark [Wed, 18 Jun 2008 01:19:23 +0000 (01:19 +0000)] 
rb: Turn off debug logging in benchmark/thin_server.rb

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669028 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Fix some incorrect reporting by the benchmark.
Kevin Clark [Wed, 18 Jun 2008 01:19:18 +0000 (01:19 +0000)] 
rb: Fix some incorrect reporting by the benchmark.

Also make it use -J-server when jruby is the server interpreter

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669027 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Enhance the output of the benchmark
Kevin Clark [Wed, 18 Jun 2008 01:19:14 +0000 (01:19 +0000)] 
rb: Enhance the output of the benchmark

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669026 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: split up benchmark into separate server/client files and distinct interpreters
Kevin Clark [Wed, 18 Jun 2008 01:19:09 +0000 (01:19 +0000)] 
rb: split up benchmark into separate server/client files and distinct interpreters

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669025 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Switch from read_nonblock to readpartial to make jruby happy
Kevin Clark [Wed, 18 Jun 2008 01:19:04 +0000 (01:19 +0000)] 
rb: Switch from read_nonblock to readpartial to make jruby happy

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669024 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add spec to ensure UNIXServerSocket deletes the socket when closing
Kevin Clark [Wed, 18 Jun 2008 01:18:57 +0000 (01:18 +0000)] 
rb: Add spec to ensure UNIXServerSocket deletes the socket when closing

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669023 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Enable logging debug info in benchmark/thin_server.rb
Kevin Clark [Wed, 18 Jun 2008 01:18:52 +0000 (01:18 +0000)] 
rb: Enable logging debug info in benchmark/thin_server.rb

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669022 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Tweak the benchmark to allow running the server in a separate process
Kevin Clark [Wed, 18 Jun 2008 01:18:47 +0000 (01:18 +0000)] 
rb: Tweak the benchmark to allow running the server in a separate process

Add a thin server library that can be run by hand

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669021 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Wrap a semaphore around @serverTransport.close in NonblockingServer.shutdown
Kevin Clark [Wed, 18 Jun 2008 01:18:41 +0000 (01:18 +0000)] 
rb: Wrap a semaphore around @serverTransport.close in NonblockingServer.shutdown

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669020 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Implement Thrift::UNIXSocket and Thrift::UNIXServerSocket
Kevin Clark [Wed, 18 Jun 2008 01:18:35 +0000 (01:18 +0000)] 
rb: Implement Thrift::UNIXSocket and Thrift::UNIXServerSocket

In benchmarking it turns out these don't give any noticeable performance boost,
but as I've already written them, somebody may want them for something.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669019 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Implement Thrift::Serializer and Thrift::Deserializer
Kevin Clark [Wed, 18 Jun 2008 01:18:28 +0000 (01:18 +0000)] 
rb: Implement Thrift::Serializer and Thrift::Deserializer

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669018 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add the path to gen-rb to $: in spec_helper instead of in multiple different...
Kevin Clark [Wed, 18 Jun 2008 01:18:21 +0000 (01:18 +0000)] 
rb: Add the path to gen-rb to $: in spec_helper instead of in multiple different specs

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669017 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Don't type-check when given a nil value.
Kevin Clark [Wed, 18 Jun 2008 01:18:14 +0000 (01:18 +0000)] 
rb: Don't type-check when given a nil value.

Turn on type-checking for all specs

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669016 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Implement type-checking in Thrift::Struct.new and field accessors
Kevin Clark [Wed, 18 Jun 2008 01:18:07 +0000 (01:18 +0000)] 
rb: Implement type-checking in Thrift::Struct.new and field accessors

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669015 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Fix struct_spec to use a proper description
Kevin Clark [Wed, 18 Jun 2008 01:17:57 +0000 (01:17 +0000)] 
rb: Fix struct_spec to use a proper description

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669014 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Add helpers for optional type-checking
Kevin Clark [Wed, 18 Jun 2008 01:17:51 +0000 (01:17 +0000)] 
rb: Add helpers for optional type-checking

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669013 13f79535-47bb-0310-9956-ffa450edef68

16 years agorb: Completely rewrite Thrift::NonblockingServer
Kevin Clark [Wed, 18 Jun 2008 01:17:44 +0000 (01:17 +0000)] 
rb: Completely rewrite Thrift::NonblockingServer

It now has a much better and cleaner architecture, a proper persistent thread pool,
a dedicated acceptor thread, and no concurrency issues

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669012 13f79535-47bb-0310-9956-ffa450edef68