common/thrift.git
14 years agoTHRIFT-929. cpp: Add unit test for transport functionality
David Reiss [Wed, 6 Oct 2010 17:10:19 +0000 (17:10 +0000)] 
THRIFT-929. cpp: Add unit test for transport functionality

Tests various transport types by writing data, and verifying it can be
read back successfully.  Tests both virtual calls (accessed as
TTransport*) and non-virtual calls (accessed as the appropriate pointer
type, or as TBufferBase* when appropriate).

This is similar to some of the tests already performed in
TMemoryBufferTest and ZlibTest.cpp.  However, this tests a few more
transport types, and it interleaves read and write calls more heavily.
(It currently exposes some bugs in flush() in a couple transports.) It
also exercises both the virtual and non-virtual code paths, now that
read() and write() only result in virtual calls when invoked on a
TTransport*.

TFileTransport currently has several race condition bugs, so most of the
TFileTransport tests ususally fail.  It also has some performance bugs,
causing the TFileTransport tests to take a long time.  Will fix those
issues separately.

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

14 years agoTHRIFT-928. cpp: TNonblockingServer: use TSocket and support TClientInfo
David Reiss [Wed, 6 Oct 2010 17:10:17 +0000 (17:10 +0000)] 
THRIFT-928. cpp: TNonblockingServer: use TSocket and support TClientInfo

Modify TNonblockingServer to use TSocket for I/O and support server
event handlers; this enables TClientInfo to function with a minor change
to the processing loop.

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

14 years agoTHRIFT-926. cpp: Remove TServerSocket as a friend class of TSocket
David Reiss [Wed, 6 Oct 2010 17:10:16 +0000 (17:10 +0000)] 
THRIFT-926. cpp: Remove TServerSocket as a friend class of TSocket

This is no longer necessary now that TSocket::TSocket(int) is public.

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

14 years agoTHRIFT-925. cpp: Add _VALUES_TO_NAMES enum map
David Reiss [Wed, 6 Oct 2010 17:10:15 +0000 (17:10 +0000)] 
THRIFT-925. cpp: Add _VALUES_TO_NAMES enum map

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

14 years agoTHRIFT-924. php: Fix missing comma in generated PHP struct constants
David Reiss [Wed, 6 Oct 2010 17:10:13 +0000 (17:10 +0000)] 
THRIFT-924. php: Fix missing comma in generated PHP struct constants

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

14 years agoTHRIFT-926. cpp: Fix an errant argument to a debug statement
David Reiss [Wed, 6 Oct 2010 17:10:11 +0000 (17:10 +0000)] 
THRIFT-926. cpp: Fix an errant argument to a debug statement

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

14 years agoTHRIFT-922. cpp: Add profiling code to help conversion to C++ templates
David Reiss [Wed, 6 Oct 2010 17:10:10 +0000 (17:10 +0000)] 
THRIFT-922. cpp: Add profiling code to help conversion to C++ templates

Add some profiling code to track when potentially unnecessary virtual
calls are made in the thrift C++ serialization and deserialization code.
This can be used to help service implementors determine which places in
their code should be updated to use an appropriate thrift template
class.

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

14 years agoTHRIFT-928. cpp: Thrift Server Client Stats
David Reiss [Wed, 6 Oct 2010 17:10:08 +0000 (17:10 +0000)] 
THRIFT-928. cpp: Thrift Server Client Stats

Add the ability for Thrift servers to monitor client connections.  It is
activated by #including server/TClientInfo.h and creating 1) a
TClientInfoCallHandler passed to the processor with setEventHandler()
and 2) a TClientInforServerHandler passed to the server with
setServerEventHandler().

The result vector, showing active connections, provides client address
and the thrift call it is executing (or last executed), the time
connected, and the number of calls made since connection.

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

14 years agoTHRIFT-922. cpp: Update C++ generator to emit templatized code
David Reiss [Wed, 6 Oct 2010 17:10:00 +0000 (17:10 +0000)] 
THRIFT-922. cpp: Update C++ generator to emit templatized code

When the "templates" option is passed to the C++ generator, it now emits
templatized versions of the client and processor.  Generated types emit
templatized read() and write() functions.

This allows the generated code to invoke the correct non-virtual
TTransport and TProtocol implementations, resulting in faster
serialization and deserialization.

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

14 years agoTHRIFT-922. cpp: Fix C++ compilation when using list<bool>
David Reiss [Wed, 6 Oct 2010 17:09:58 +0000 (17:09 +0000)] 
THRIFT-922. cpp: Fix C++ compilation when using list<bool>

The STL specializes vector<bool> to store the values as individual bits, rather
than bools.  Therefore, when using a Thrift list<bool>, readBool() gets invoked
not with a bool&, but with a std::vector<bool>::reference.

TProtocol does provide a readBool(std::vector<bool>::reference) implementation.
However, almost all TProtocol subclasses defined only readBool(bool&), which
hides the other overloaded versions of readBool().  As a result, the code
worked only when accessing TProtocol objects via a "TProtocol*", and not
directly via the subclass type.  When using C++ templates, protocol objects do
get invoked via pointers to the subclass type, causing compile failures when
std::vector<bool> is used.

This change updates the various TProtocol implementations to also provide
readBool(std::vector<bool>::reference).

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

14 years agoTHRIFT-922. cpp: Templatize binary and compact protocol
David Reiss [Wed, 6 Oct 2010 17:09:56 +0000 (17:09 +0000)] 
THRIFT-922. cpp: Templatize binary and compact protocol

Convert TBinaryProtocol and TCompactProtocol to template classes, taking
the transport class as a template parameter.  This allows them to make
non-virtual calls when using the template, improving serialization
performance.

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

14 years agoTHRIFT-922. cpp: Convert protocol classes to use non-virtual functions
David Reiss [Wed, 6 Oct 2010 17:09:52 +0000 (17:09 +0000)] 
THRIFT-922. cpp: Convert protocol classes to use non-virtual functions

Updated the thrift protocol classes to use non-virtual calls for most
functions.  The correct implementation is determined at compile time via
templates now.  Only the base TProtocol class falls back to using
virtual function calls.

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

14 years agoTHRIFT-922. cpp: Convert transport classes to use non-virtual calls
David Reiss [Wed, 6 Oct 2010 17:09:50 +0000 (17:09 +0000)] 
THRIFT-922. cpp: Convert transport classes to use non-virtual calls

Update the thrift transport classes to use non-virtual calls for most
functions.  The correct implementation is determined at compile time via
templates now.  Only the base TTransport class falls back to using
virtual function calls.

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

14 years agoTHRIFT-922. cpp: Add shortcutted version of readAll() in TBufferBase
David Reiss [Wed, 6 Oct 2010 17:09:47 +0000 (17:09 +0000)] 
THRIFT-922. cpp: Add shortcutted version of readAll() in TBufferBase

Just perform a memcpy() if all of the requested data is available in the
buffer.  This improves performance a little in the common case.  It has
a bigger impact with the upcoming template changes.

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

14 years agoTHRIFT-922. cpp: When reading strings, borrow first
David Reiss [Wed, 6 Oct 2010 17:09:46 +0000 (17:09 +0000)] 
THRIFT-922. cpp: When reading strings, borrow first

Attempt to get a pointer to the internal transport buffer before copying
onto the heap.  This improves performance TFramedTransport and
TMemoryBuffer, and with TBufferedTransport if the string fits within the
buffer.

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

14 years agoTHRIFT-923. cpp: Add completion notification to async clients
David Reiss [Wed, 6 Oct 2010 17:09:45 +0000 (17:09 +0000)] 
THRIFT-923. cpp: Add completion notification to async clients

Add a virtual function "completed__(bool)" to xxxCobClient that is
called by recv_xxx() after reception of a response (arg = true) or an
exception (arg = false). This allows the TAsyncClient to intercede at
that point, permitting, e.g., the load-balancing of persistent
connections that would otherwise remain bound to a single server.

A new "no_client_completion" flag inhibits generation of this mechanism.

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

14 years agoTHRIFT-928. cpp: Prefix function name with service name
David Reiss [Wed, 6 Oct 2010 17:09:43 +0000 (17:09 +0000)] 
THRIFT-928. cpp: Prefix function name with service name

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

14 years agoTHRIFT-928. cpp: Include request/response size in processor callbacks
David Reiss [Wed, 6 Oct 2010 17:09:42 +0000 (17:09 +0000)] 
THRIFT-928. cpp: Include request/response size in processor callbacks

Required updating transport interface.

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

14 years agoTHRIFT-928. cpp: Make clients call writeEnd on their transports before flush
David Reiss [Wed, 6 Oct 2010 17:09:39 +0000 (17:09 +0000)] 
THRIFT-928. cpp: Make clients call writeEnd on their transports before flush

Changing the order of these calls makes more sense from the perspective
of logical operations.  It also simplifies the upcoming stats collection
code.  No clients should be affected.

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

14 years agoTHRIFT-923. cpp: Implement a fully nonblocking server and client
David Reiss [Wed, 6 Oct 2010 17:09:37 +0000 (17:09 +0000)] 
THRIFT-923. cpp: Implement a fully nonblocking server and client

There are three major parts of this:
1/ New callback-style interfaces for for a few key Thrift components:
   TAsyncProcessor for servers and TAsyncChannel for clients.
2/ Concrete implementations of TAsyncChannel and a server for
   TAsyncProcessor based on evhttp.
3/ Async-style code generation for C++

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

14 years agoTHRIFT-928. cpp: Processor-level event callbacks
David Reiss [Wed, 6 Oct 2010 17:09:33 +0000 (17:09 +0000)] 
THRIFT-928. cpp: Processor-level event callbacks

- Add a TProcessorEventHandler callback interface.
- Add methods to TProcessor to hold an instance of the interface.
- Add code to the compiler to make the processor call callbacks at key points.
- Add an optional processor event handler to the test server.

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

14 years agoTHRIFT-922. cpp: Revert the BufferBase part of r750585
David Reiss [Wed, 6 Oct 2010 17:09:31 +0000 (17:09 +0000)] 
THRIFT-922. cpp: Revert the BufferBase part of r750585

r750585 included two logically distinct changes, one of which was not
referenced in the commit message and was not reviewed by a C++
maintainer.  It was committed more-or-less by accident.  This patch
reverts that part of the change since it conflicts with the template
code in some complicated ways.

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

14 years agoTHRIFT-945. java: TAsyncClient class's currentMethod is never set, hence a second...
Bryan Duxbury [Wed, 6 Oct 2010 00:28:10 +0000 (00:28 +0000)] 
THRIFT-945. java: TAsyncClient class's currentMethod is never set, hence a second call on the same client will fail if a previous call is ongoing.

This patch adds a test for the problem and fixes the issue by setting the current method after a call has been started.

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

14 years agoTHRIFT-941. php: Make PHP C Extension use the defined Protocol writeMessageBegin...
Bryan Duxbury [Wed, 6 Oct 2010 00:23:30 +0000 (00:23 +0000)] 
THRIFT-941. php:  Make PHP C Extension use the defined Protocol writeMessageBegin function

This patch causes the C extension to call into user-land to get the correct writeMessageBegin function.

Patch: Chris Goffinet

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

14 years agoTHRIFT-932. hs: Haskell tests need to be run through 'make check' (and probably ...
Bryan Duxbury [Wed, 6 Oct 2010 00:12:33 +0000 (00:12 +0000)] 
THRIFT-932. hs: Haskell tests need to be run through 'make check' (and probably 'cabal check') too

Tests are now self-contained and correctly exit after running. There's a single run script which has improved error messages and defaults to the thrift binary compiled in the current source directory instead of those in PATH. And as a bonus hooks both cabal check and running the tests to make check.

Patch: Christian Lavoie

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

14 years agoTHRIFT-944. hs: Support all version-4s of base
Bryan Duxbury [Wed, 6 Oct 2010 00:01:43 +0000 (00:01 +0000)] 
THRIFT-944. hs: Support all version-4s of base

Patch: Christian Lavoie

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

14 years agoTHRIFT-933 : looks fine, and cabal check looks good as well
Anthony F. Molinaro [Tue, 5 Oct 2010 17:08:08 +0000 (17:08 +0000)] 
THRIFT-933 : looks fine, and cabal check looks good as well

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

14 years agoTHRIFT-943: fix typo
Anthony F. Molinaro [Tue, 5 Oct 2010 16:47:52 +0000 (16:47 +0000)] 
THRIFT-943: fix typo

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

14 years agodisable php extension if php-config is missing
Anthony F. Molinaro [Tue, 5 Oct 2010 16:45:50 +0000 (16:45 +0000)] 
disable php extension if php-config is missing

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

14 years agoTHRIFT-868. Make const values work properly with typdefs
David Reiss [Tue, 5 Oct 2010 16:39:29 +0000 (16:39 +0000)] 
THRIFT-868. Make const values work properly with typdefs

Just requires calling get_true_type in the right spot.  Because "the
right spot" is under src/parse, get_true_type had to be moed from
t_generator to t_type.

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

14 years agocompiler: Move t_type::generate_fingerprint to a .cc file
David Reiss [Tue, 5 Oct 2010 16:39:27 +0000 (16:39 +0000)] 
compiler: Move t_type::generate_fingerprint to a .cc file

Forcing all of the functions under src/parse to be defined in header
files is silly and sometimes painful.  Createa a "parse.cc" file for
functions that don't belong in header files.  To start, move
generate_fingerprint there, because it requires including md5.h.

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

14 years agoerlang: Use Automake SUBDIRS instead of a manual forwarding rule
David Reiss [Tue, 5 Oct 2010 02:38:59 +0000 (02:38 +0000)] 
erlang: Use Automake SUBDIRS instead of a manual forwarding rule

Previously, lib/erl/Makefile.am would forward rules like "all" and
"clean" to the src subdir by manually invoking a submake.  However,
specifying src as a SUBDIR accomplishes this more easily and also
ensures that other rules like "distclean" work.

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

14 years agoTHRIFT-841. Exclude generated php and erlang Makefiles from "make dist"
David Reiss [Tue, 5 Oct 2010 02:38:58 +0000 (02:38 +0000)] 
THRIFT-841. Exclude generated php and erlang Makefiles from "make dist"

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

14 years agoTHRIFT-940 use BOOST_LDFLAGS for unit tests, required to build on Mac OS X
Roger Meier [Mon, 4 Oct 2010 21:13:36 +0000 (21:13 +0000)] 
THRIFT-940 use BOOST_LDFLAGS for unit tests, required to build on Mac OS X

Patch: Christian Lavoie

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

14 years agoTHRIFT-939. java: optional binary fields throw NPE on default byte[] getters
Bryan Duxbury [Thu, 30 Sep 2010 19:36:05 +0000 (19:36 +0000)] 
THRIFT-939. java: optional binary fields throw NPE on default byte[] getters

This patch deals with null ByteBuffers correctly.

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

14 years agobump versions to 0.6.0
Bryan Duxbury [Tue, 28 Sep 2010 17:44:45 +0000 (17:44 +0000)] 
bump versions to 0.6.0

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

14 years agoupdate the CHANGES file
Bryan Duxbury [Tue, 28 Sep 2010 15:06:38 +0000 (15:06 +0000)] 
update the CHANGES file

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

14 years agoTHRIFT-900. cpp: Unix domain socket
Bryan Duxbury [Tue, 28 Sep 2010 14:36:07 +0000 (14:36 +0000)] 
THRIFT-900. cpp: Unix domain socket

This patch adds a new Unix Socket transport.

Patch: Roger Meier

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

14 years agocontrib/fb303: use pure_enums in C++ for compatibility
David Reiss [Tue, 28 Sep 2010 03:30:17 +0000 (03:30 +0000)] 
contrib/fb303: use pure_enums in C++ for compatibility

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

14 years agoTHRIFT-912. java: Fix some bugs in SASL implementation, update protocol spec slightly
Todd Lipcon [Tue, 28 Sep 2010 00:11:01 +0000 (00:11 +0000)] 
THRIFT-912. java: Fix some bugs in SASL implementation, update protocol spec slightly

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

14 years agoTHRIFT-931. java: Add log4j.properties missing from previous commit
Todd Lipcon [Tue, 28 Sep 2010 00:02:53 +0000 (00:02 +0000)] 
THRIFT-931. java: Add log4j.properties missing from previous commit

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

14 years agoTHRIFT-890. java: Add README missing from previous commit
Todd Lipcon [Tue, 28 Sep 2010 00:01:31 +0000 (00:01 +0000)] 
THRIFT-890. java: Add README missing from previous commit

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

14 years agoTHRIFT-931. java: Use log4j for Java tests
Todd Lipcon [Mon, 27 Sep 2010 23:51:22 +0000 (23:51 +0000)] 
THRIFT-931. java: Use log4j for Java tests

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

14 years agoTHRIFT-787. compiler: Enums are not read correctly
Bryan Duxbury [Mon, 27 Sep 2010 23:37:44 +0000 (23:37 +0000)] 
THRIFT-787. compiler: Enums are not read correctly

This patch removes unnecessary enum value resolution code from all the individual generators. It's been unnecessary since forever ago when we made the compiler force the global resolution of values.

Patch: Christian Lavoie

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

14 years agoTHRIFT-918 : better haskell tests
Anthony F. Molinaro [Mon, 27 Sep 2010 19:27:40 +0000 (19:27 +0000)] 
THRIFT-918 : better haskell tests

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

14 years agoTHRIFT-890. java: Fix tutorial to build and run in trunk
Todd Lipcon [Mon, 27 Sep 2010 18:26:07 +0000 (18:26 +0000)] 
THRIFT-890. java: Fix tutorial to build and run in trunk

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

14 years agoTHRIFT-919 : updated haskell README
Anthony F. Molinaro [Mon, 27 Sep 2010 17:33:47 +0000 (17:33 +0000)] 
THRIFT-919 : updated haskell README

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

14 years agoTHRIFT-335. python: Initial implementation of TCompactProtocol
David Reiss [Mon, 27 Sep 2010 17:28:15 +0000 (17:28 +0000)] 
THRIFT-335. python: Initial implementation of TCompactProtocol

Seems to work.  No interoperability testing with other languages yet.

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

14 years agoTHRIFT-920. cpp: C++ Test and Tutorial does not compile anymore due to the change...
Bryan Duxbury [Mon, 27 Sep 2010 17:26:02 +0000 (17:26 +0000)] 
THRIFT-920. cpp: C++ Test and Tutorial does not compile anymore due to the change within Enum handling

Patch: Roger Meier and Christian Lavoie

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

14 years agoTHRIFT-905: hook haskell into autoconf
Anthony F. Molinaro [Mon, 27 Sep 2010 17:22:17 +0000 (17:22 +0000)] 
THRIFT-905: hook haskell into autoconf

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

14 years agoTHRIFT-917. java: THsHaServer should not accept an ExecutorService without catching...
Bryan Duxbury [Mon, 27 Sep 2010 17:12:36 +0000 (17:12 +0000)] 
THRIFT-917. java: THsHaServer should not accept an ExecutorService without catching RejectedExecutionException

This patch catches RejectedExecutionException from requestInvoke and closes the client connection when that occurs.

Patch: Ed Ceaser

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

14 years agomake check wasn't working because python namespace was incorrect
Anthony F. Molinaro [Mon, 27 Sep 2010 04:43:39 +0000 (04:43 +0000)] 
make check wasn't working because python namespace was incorrect

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

14 years agoTHRIFT-743: seems to compile and doesn't break other tests, so seems fine for now
Anthony F. Molinaro [Sun, 26 Sep 2010 04:25:36 +0000 (04:25 +0000)] 
THRIFT-743: seems to compile and doesn't break other tests, so seems fine for now

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

14 years agoignore generated artifacts
Anthony F. Molinaro [Sun, 26 Sep 2010 04:22:24 +0000 (04:22 +0000)] 
ignore generated artifacts

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

14 years agoignore generated directory
Anthony F. Molinaro [Sun, 26 Sep 2010 04:21:08 +0000 (04:21 +0000)] 
ignore generated directory

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

14 years agoignore test artifacts
Anthony F. Molinaro [Sun, 26 Sep 2010 04:20:23 +0000 (04:20 +0000)] 
ignore test artifacts

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

14 years agoTHRIFT-881. csharp: add csharp to the tutorial
Bryan Duxbury [Fri, 24 Sep 2010 16:47:59 +0000 (16:47 +0000)] 
THRIFT-881. csharp: add csharp to the tutorial

This patch adds a tutorial for CSharp. It also moves the 'test' client and server into the tutorial, because they were not being used by the tests.

Patch: Roger Meier

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

14 years agoTHRIFT-914 : haskell bindings compile easier
Anthony F. Molinaro [Thu, 23 Sep 2010 22:28:09 +0000 (22:28 +0000)] 
THRIFT-914 : haskell bindings compile easier

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

14 years agoTHRIFT-911: fix for trailing commas in sets, lists, maps, consts
T Jake Luciani [Wed, 22 Sep 2010 02:33:06 +0000 (02:33 +0000)] 
THRIFT-911: fix for trailing commas in sets, lists, maps, consts

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

14 years agoTHRIFT-906. hs: Improve type mappings
Bryan Duxbury [Wed, 22 Sep 2010 00:48:56 +0000 (00:48 +0000)] 
THRIFT-906. hs: Improve type mappings

This patch fixes the type mappings to be more sane. It *will* break existing code, but the breakages should be well worth it.

Patch: Christian Lavoie

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

14 years agoTHRIFT-910. Update .gitignore
David Reiss [Tue, 21 Sep 2010 18:35:43 +0000 (18:35 +0000)] 
THRIFT-910. Update .gitignore

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

14 years agoTHRIFT-907. java: update fb303 to compile on trunk
Todd Lipcon [Tue, 21 Sep 2010 18:01:43 +0000 (18:01 +0000)] 
THRIFT-907. java: update fb303 to compile on trunk

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

14 years agoTHRIFT-909. rb: allow block argument to struct constructor
Bryan Duxbury [Tue, 21 Sep 2010 16:30:58 +0000 (16:30 +0000)] 
THRIFT-909. rb: allow block argument to struct constructor

This patch allows the user to pass a block to generated structs' constructors. The block will receive and instance of the new object.

Patch: Michael Stockton

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

14 years agoTHRIFT-880. javame: JavaME code generator and runtime library
Bryan Duxbury [Mon, 20 Sep 2010 17:49:09 +0000 (17:49 +0000)] 
THRIFT-880. javame: JavaME code generator and runtime library

This patch adds a new generator and library that produces code suitable for use in JavaME environments.

Patch: David Engberg

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

14 years agoTHRIFT-901. hs: Allow the bindings to compile without -fglasgow-exts and with -Wall...
Bryan Duxbury [Mon, 20 Sep 2010 17:41:40 +0000 (17:41 +0000)] 
THRIFT-901. hs: Allow the bindings to compile without -fglasgow-exts and with -Wall -Werror

Forgot a small chunk of the previous patch.

Patch: Christian Lavoie

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

14 years agoTHRIFT-901. hs: Allow the bindings to compile without -fglasgow-exts and with -Wall...
Bryan Duxbury [Mon, 20 Sep 2010 15:21:37 +0000 (15:21 +0000)] 
THRIFT-901. hs: Allow the bindings to compile without -fglasgow-exts and with -Wall -Werror

This patch makes the bindings compile with pedantic warning levels, and individually declares each required language extension.

Patch: Christian Lavoie

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

14 years agoTHRIFT-323. csharp: TJSONProtocol
Bryan Duxbury [Sat, 18 Sep 2010 20:51:25 +0000 (20:51 +0000)] 
THRIFT-323. csharp: TJSONProtocol

This patch adds support for the JSON Protocol to the csharp library.

Patch: Roger Meier

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

14 years agoTHRIFT-885: fix string encoding
T Jake Luciani [Fri, 17 Sep 2010 23:38:25 +0000 (23:38 +0000)] 
THRIFT-885: fix string encoding

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

14 years agoTHRIFT-899. rb: Ruby read timeouts can sometimes be 2x what they should be
Bryan Duxbury [Fri, 17 Sep 2010 20:17:21 +0000 (20:17 +0000)] 
THRIFT-899. rb: Ruby read timeouts can sometimes be 2x what they should be

This patch makes sure that we don't wait longer than necessary for timeouts.

Patch: Ryan King

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

14 years agoTHRIFT-882. java: deep copy of binary fields does not copy ByteBuffer characteristics...
Bryan Duxbury [Fri, 17 Sep 2010 19:27:36 +0000 (19:27 +0000)] 
THRIFT-882. java: deep copy of binary fields does not copy ByteBuffer characteristics (arrayOffset, position)

This patch ensures that binary fields are copied correctly.

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

14 years agoFix enum value lookups in C++
David Reiss [Mon, 13 Sep 2010 17:32:14 +0000 (17:32 +0000)] 
Fix enum value lookups in C++

The recent enum change was causing enums to break if used as constant
values by the C++ generator.  The problem was that we were searching for
the fully-qualified constant name (enum_name.VALUE_NAME) in the enum
values.  This didn't affect Java because it just uses symbolic names in
the generated code.  Fix it by grabbing the base name before doing the
search.

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

14 years agoDon't segfault if t_enum::get_constant_by_name fails
David Reiss [Mon, 13 Sep 2010 17:32:13 +0000 (17:32 +0000)] 
Don't segfault if t_enum::get_constant_by_name fails

The recent enum change was causing t_enum::get_constant_by_name to fail
in t_const_value::get_integer.  This was causing a difficult-to-debug
segfault.  Check for failure and throw an exeception.

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

14 years agoTHRIFT-870. java: Java constants don't get Javadoc comments
Bryan Duxbury [Mon, 13 Sep 2010 16:28:53 +0000 (16:28 +0000)] 
THRIFT-870. java: Java constants don't get Javadoc comments

Fix a trivial oversight.

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

14 years agoTHRIFT-894. java: Make default accessors for binary fields return byte[]; provide...
Bryan Duxbury [Mon, 13 Sep 2010 15:42:36 +0000 (15:42 +0000)] 
THRIFT-894. java: Make default accessors for binary fields return byte[]; provide new accessors to get ByteBuffer version

This patch causes the underlying ByteBuffer that backs a binary field to be hidden behind a default accessor that provides a byte[] interface. This should allow users who skipped 0.4 to update their generated code without breaking any of their other code. A new accessor has been added that allows a way down to the underlying ByteBuffer for those experts who want to take advantage.

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

14 years agojava: tiny improvement to async client manager test, for real this time
Bryan Duxbury [Sun, 12 Sep 2010 15:31:50 +0000 (15:31 +0000)] 
java: tiny improvement to async client manager test, for real this time

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

14 years agojava: tiny improvement to async client manager test
Bryan Duxbury [Sun, 12 Sep 2010 15:30:06 +0000 (15:30 +0000)] 
java: tiny improvement to async client manager test

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

14 years agoTHRIFT-897. compiler: Don't allow unqualified enum constant access
Bryan Duxbury [Sun, 12 Sep 2010 15:29:38 +0000 (15:29 +0000)] 
THRIFT-897. compiler: Don't allow unqualified enum constant access

Fix some confusion in the java generator about adding the class name.

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

14 years agoTHRIFT-897. compiler: Don't allow unqualified enum constant references
Bryan Duxbury [Sun, 12 Sep 2010 15:22:49 +0000 (15:22 +0000)] 
THRIFT-897. compiler: Don't allow unqualified enum constant references

Missed a spot.

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

14 years agoTHRIFT-897. compiler: Don't allow unqualified enum constant references
Bryan Duxbury [Sun, 12 Sep 2010 15:22:21 +0000 (15:22 +0000)] 
THRIFT-897. compiler: Don't allow unqualified enum constant references

Missed a spot.

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

14 years agoTHRIFT-897. compiler: Don't allow unqualified constant access to enum values
Bryan Duxbury [Sun, 12 Sep 2010 14:38:36 +0000 (14:38 +0000)] 
THRIFT-897. compiler: Don't allow unqualified constant access to enum values

This patch makes it illegal to refer to enum values by just their names in the IDL. Now, you must also provide the enum type's name as well.

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

14 years agoTHRIFT-895. cpp: By default, generate enums as class-scoped enums
David Reiss [Fri, 10 Sep 2010 23:00:40 +0000 (23:00 +0000)] 
THRIFT-895. cpp: By default, generate enums as class-scoped enums

Most of the other Thrift languages either have enum values that are
scoped to the type or emulate enums in that way.  Now C++ does the same
by default.  "enum Foo" in a .thrift file will be generated as Foo::type
so the values can be called Foo::value1, etc.  The "pure_enums" compiler
option restores the old behavior.

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

14 years agoTHRIFT-896. java: TNonblockingSocket.isOpen() returns true even after close()
Bryan Duxbury [Fri, 10 Sep 2010 19:08:00 +0000 (19:08 +0000)] 
THRIFT-896. java: TNonblockingSocket.isOpen() returns true even after close()

This patch makes TNonblockingSocket.isOpen() have more expected behavior.

Patch: Eric Jensen

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

14 years agoTHRIFT-544. erl: multiple enums with the same key generate invalid code
Bryan Duxbury [Fri, 10 Sep 2010 18:49:53 +0000 (18:49 +0000)] 
THRIFT-544. erl: multiple enums with the same key generate invalid code

This adds the enum name to the generated constants to avoid collisions.

Patch: Ben Taitelbaum

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

14 years agoTHRIFT-250. java: ExecutorService as a constructor parameter for TServer
Bryan Duxbury [Fri, 10 Sep 2010 16:16:01 +0000 (16:16 +0000)] 
THRIFT-250. java: ExecutorService as a constructor parameter for TServer

This patch adds a new constructor that accepts an ExecutorService.

Patch: Ed Ceaser

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

14 years agoTHRIFT-888. java: async client should also have nonblocking connect
Bryan Duxbury [Wed, 8 Sep 2010 21:47:45 +0000 (21:47 +0000)] 
THRIFT-888. java: async client should also have nonblocking connect

This patch adds optional nonblocking connect behavior.

Patch: Eric Jensen

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

14 years agoTHRIFT-876. java: Add SASL support
Bryan Duxbury [Wed, 8 Sep 2010 00:06:35 +0000 (00:06 +0000)] 
THRIFT-876. java: Add SASL support

This patch adds support for a SASL-secured transport to the Java library. In its current form, it only works for the blocking-IO servers.

Patch: Aaron T Meyers

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

14 years agoTHRIFT-698 - fix .app file, remove unused parts of build system, updated LICENSE...
Anthony F. Molinaro [Tue, 7 Sep 2010 03:35:30 +0000 (03:35 +0000)] 
THRIFT-698 - fix .app file, remove unused parts of build system, updated LICENSE to reflect changes

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

14 years agosvn ignore and remove php artifacts left by phpize in bootstrap.sh
Anthony F. Molinaro [Tue, 7 Sep 2010 03:25:02 +0000 (03:25 +0000)] 
svn ignore and remove php artifacts left by phpize in bootstrap.sh

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

14 years agoFix to the catch-all namespace commit
Bryan Duxbury [Fri, 3 Sep 2010 20:36:02 +0000 (20:36 +0000)] 
Fix to the catch-all namespace commit

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

14 years agoTHRIFT-856. cpp: Building cpp library fails on OS X with malloc and free not being...
Bryan Duxbury [Thu, 2 Sep 2010 16:42:18 +0000 (16:42 +0000)] 
THRIFT-856. cpp: Building cpp library fails on OS X with malloc and free not being declared in scope

This patch adds include which seems to fix the problem for some people.

Patch: James Clarke

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

14 years agoAllow "*" as a catch-all namespace.
David Reiss [Thu, 2 Sep 2010 16:41:45 +0000 (16:41 +0000)] 
Allow "*" as a catch-all namespace.

In an IDL file, you can can now declare "namespace * foo",
which will apply to any language not explicitly specified.

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

14 years agoadd some generatd artifacts from lib/cpp/test and lib/php/src/ext/thrift_protocol...
Bryan Duxbury [Thu, 2 Sep 2010 16:33:42 +0000 (16:33 +0000)] 
add some generatd artifacts from lib/cpp/test and lib/php/src/ext/thrift_protocol to svn:ignore

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

14 years agoTHRIFT-257. py: Support validation of required fields
Bryan Duxbury [Thu, 2 Sep 2010 15:37:19 +0000 (15:37 +0000)] 
THRIFT-257. py: Support validation of required fields

Patch: Esteve Fernandez

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

14 years agoTHRIFT-666. python: Allow THttpServer's responses to be overridden
David Reiss [Thu, 2 Sep 2010 15:36:03 +0000 (15:36 +0000)] 
THRIFT-666. python: Allow THttpServer's responses to be overridden

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

14 years agoTHRIFT-596. python: Make the TBufferedTransport read buffer size configurable
David Reiss [Thu, 2 Sep 2010 15:36:00 +0000 (15:36 +0000)] 
THRIFT-596. python: Make the TBufferedTransport read buffer size configurable

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

14 years agoTHRIFT-798. cpp: Reduce resource leakage by TNonblockingServer destructor
David Reiss [Thu, 2 Sep 2010 15:26:28 +0000 (15:26 +0000)] 
THRIFT-798. cpp: Reduce resource leakage by TNonblockingServer destructor

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

14 years agoTHRIFT-567. cpp: Can't immediately stop a TSimpleServer thread that is idle
Bryan Duxbury [Thu, 2 Sep 2010 15:16:56 +0000 (15:16 +0000)] 
THRIFT-567. cpp: Can't immediately stop a TSimpleServer thread that is idle

This interrupts the server in addition to setting the stop flag.

Patch: Rush Manbert

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

14 years agoTHRIFT-597. py: Python THttpServer performance improvements
Bryan Duxbury [Thu, 2 Sep 2010 15:14:27 +0000 (15:14 +0000)] 
THRIFT-597. py: Python THttpServer performance improvements

This enables buffered I/O and ThreadingMixin.

Patch: David Reiss

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

14 years agoTHRIFT-598. py: Allow Python's threading servers to use daemon threads
Bryan Duxbury [Thu, 2 Sep 2010 15:12:06 +0000 (15:12 +0000)] 
THRIFT-598. py: Allow Python's threading servers to use daemon threads

Patch: David Reiss

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

14 years agoTHRIFT-629. cocoa: Unused Field In TSocketServer Appears To Break iPhone Build
Bryan Duxbury [Thu, 2 Sep 2010 15:02:06 +0000 (15:02 +0000)] 
THRIFT-629. cocoa: Unused Field In TSocketServer Appears To Break iPhone Build

Remove the unused field.

Patch: Jon S Akhtar

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