David Reiss [Wed, 29 Oct 2008 22:50:34 +0000 (22:50 +0000)]
THRIFT-168. cpp: Clear transport buffers before a flush
Previously, TBufferedTransport and TFramedTransport could
leave data in their buffers if a flush threw an exception.
This patch makes them reset their internal pointers before
flushing to the underlying transport.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@709037
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 29 Oct 2008 00:07:49 +0000 (00:07 +0000)]
THRIFT-179. java: Include per-field docstrings in generated code
This also involves refactoring a bit of the functionality into
t_oop_generator.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@708737
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 29 Oct 2008 00:07:45 +0000 (00:07 +0000)]
Make t_field inherit from t_doc instead of reimplementing it
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@708736
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Mon, 27 Oct 2008 22:45:26 +0000 (22:45 +0000)]
THRIFT-183 let non-root issues run fb303 status commands
Reviewed By: mcslee
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@708364
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 22 Oct 2008 22:07:03 +0000 (22:07 +0000)]
Make a pointer const to fix a warning
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@707213
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 22 Oct 2008 22:07:00 +0000 (22:07 +0000)]
Add a missing include to fix compilation on Ubuntu 8.10
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@707212
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 22 Oct 2008 21:59:15 +0000 (21:59 +0000)]
Add more files to .gitignore
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@707211
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 22 Oct 2008 21:59:12 +0000 (21:59 +0000)]
Make .gitignore more specific
The leading slashes prevent it from matching similar-looking paths
in subdirectories.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@707210
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 21 Oct 2008 00:09:23 +0000 (00:09 +0000)]
THRIFT-173. Commit the html generator
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@706466
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Mon, 20 Oct 2008 21:29:07 +0000 (21:29 +0000)]
THRIFT-177. cpp: Add a missing "std::"
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@706418
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Fri, 17 Oct 2008 19:30:35 +0000 (19:30 +0000)]
THRIFT-109. python: Use self.assert* instead of assert in tests
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705734
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 16 Oct 2008 19:15:20 +0000 (19:15 +0000)]
rb: Create constants for field ids in generated structs [THRIFT-165]
Author: Bryan Duxbury
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705330
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Thu, 16 Oct 2008 19:14:47 +0000 (19:14 +0000)]
rb: Update HTTPClientSpec for THRIFT-156
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@705329
13f79535-47bb-0310-9956-
ffa450edef68
Kevin Clark [Wed, 15 Oct 2008 19:06:18 +0000 (19:06 +0000)]
rb: Support SSL and correct Content-Type in HTTPClient [THRIFT-156]
Author: Dave Engberg
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704994
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Tue, 14 Oct 2008 22:05:11 +0000 (22:05 +0000)]
THRIFT-170: Buffered transports leave data in write buffer on failed flush
Reviewed By: mcslee
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704714
13f79535-47bb-0310-9956-
ffa450edef68
Mark Slee [Tue, 14 Oct 2008 22:00:36 +0000 (22:00 +0000)]
THRIFT-169: Fixes framed/buffered transport state on underlying flush failure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@704710
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Thu, 9 Oct 2008 00:08:46 +0000 (00:08 +0000)]
THRIFT-139. java: Expose field ids in more useful ways
- Define constants in each structure class that provide access to the
field ids by name (at compile time). Use them for (de)serialization.
- For beans-mode code, generate a generic getter and setter for accessing
fields by field id.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@703028
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 8 Oct 2008 04:49:25 +0000 (04:49 +0000)]
THRIFT-152. java: Set isset appropriately in structure constructors
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702697
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 7 Oct 2008 23:55:24 +0000 (23:55 +0000)]
Fix a compile bug introduced by r702644
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702672
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 7 Oct 2008 23:03:47 +0000 (23:03 +0000)]
THRIFT-145. java: Make TNonblockingServer more robust against errors
TNonblockingServer was throwing a null pointer exception in certain cases.
We're not really sure what the root cause is, but this change prevents
the exception and also improves logging of certain undesirable conditions.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702661
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 7 Oct 2008 21:39:19 +0000 (21:39 +0000)]
THRIFT-149. cpp: Make TNonblockingServer handle a shut-down ThreadManager
This is a step toward implementing a graceful shutdown.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702644
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Tue, 7 Oct 2008 21:08:10 +0000 (21:08 +0000)]
THRIFT-108. python: Fix call to PyDict_Next in fastbinary.c
The position parameter is supposed to be a Py_ssize_t*, not an int*.
This was probably just an oversight in the original patch, and it
was preventing maps from serializing properly on x86-64.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@702640
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 1 Oct 2008 18:32:47 +0000 (18:32 +0000)]
THRIFT-119. java: structs' toString omits unset optional fields
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@700860
13f79535-47bb-0310-9956-
ffa450edef68
David Reiss [Wed, 1 Oct 2008 03:24:54 +0000 (03:24 +0000)]
THRIFT-120. java: Make the nocamel option work for more methods
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@700668
13f79535-47bb-0310-9956-
ffa450edef68
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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