Commit Graph

1382 Commits

Author SHA1 Message Date
David Reiss
18cd0f0334 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
2010-10-06 17:09:39 +00:00
David Reiss
5ddabb8e3f 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
2010-10-06 17:09:37 +00:00
David Reiss
d7192063e1 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
2010-10-06 17:09:33 +00:00
David Reiss
8c535ab87c 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
2010-10-06 17:09:31 +00:00
Bryan Duxbury
1df96ce22f 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
2010-10-06 00:28:10 +00:00
Bryan Duxbury
ded25bbe0d 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
2010-10-06 00:23:30 +00:00
Bryan Duxbury
c657447e0e 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
2010-10-06 00:12:33 +00:00
Bryan Duxbury
ffca7e1720 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
2010-10-06 00:01:43 +00:00
Anthony F. Molinaro
371372e832 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
2010-10-05 17:08:08 +00:00
Anthony F. Molinaro
687c412c10 THRIFT-943: fix typo
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1004709 13f79535-47bb-0310-9956-ffa450edef68
2010-10-05 16:47:52 +00:00
David Reiss
3e07a8f233 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
2010-10-05 02:38:59 +00:00
David Reiss
653eadab2f 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
2010-10-05 02:38:58 +00:00
Roger Meier
8a441a46ad 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
2010-10-04 21:13:36 +00:00
Bryan Duxbury
5bb525ccf9 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
2010-09-30 19:36:05 +00:00
Bryan Duxbury
e1ae6b45d5 bump versions to 0.6.0
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1002294 13f79535-47bb-0310-9956-ffa450edef68
2010-09-28 17:44:45 +00:00
Bryan Duxbury
a18364ac88 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
2010-09-28 14:36:07 +00:00
Todd Lipcon
b1a283f11e 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
2010-09-28 00:11:01 +00:00
Todd Lipcon
84a7c2a901 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
2010-09-28 00:02:53 +00:00
Todd Lipcon
fcaa8f5364 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
2010-09-27 23:51:22 +00:00
Anthony F. Molinaro
fa6eaca762 THRIFT-919 : updated haskell README
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001830 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 17:33:47 +00:00
David Reiss
abafd79aee 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
2010-09-27 17:28:15 +00:00
Anthony F. Molinaro
a5df7c7b0e THRIFT-905: hook haskell into autoconf
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001823 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 17:22:17 +00:00
Bryan Duxbury
3a3686fd51 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
2010-09-27 17:12:36 +00:00
Anthony F. Molinaro
daef1c8ed0 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
2010-09-26 04:25:36 +00:00
Anthony F. Molinaro
7466bcd5d7 THRIFT-914 : haskell bindings compile easier
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1000653 13f79535-47bb-0310-9956-ffa450edef68
2010-09-23 22:28:09 +00:00
Bryan Duxbury
75a33e858f 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
2010-09-22 00:48:56 +00:00
Bryan Duxbury
6a1fb17a25 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
2010-09-21 16:30:58 +00:00
Bryan Duxbury
1237dcb099 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
2010-09-20 17:49:09 +00:00
Bryan Duxbury
e59a80fbf9 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
2010-09-20 15:21:37 +00:00
Bryan Duxbury
fd32d79afa 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
2010-09-18 20:51:25 +00:00
T Jake Luciani
416eea9802 THRIFT-885: fix string encoding
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@998371 13f79535-47bb-0310-9956-ffa450edef68
2010-09-17 23:38:25 +00:00
Bryan Duxbury
83c4795870 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
2010-09-17 20:17:21 +00:00
Bryan Duxbury
d920765c66 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
2010-09-17 19:27:36 +00:00
Bryan Duxbury
a7420b6593 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
2010-09-13 15:42:36 +00:00
Bryan Duxbury
a4c6d64e80 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
2010-09-12 15:31:50 +00:00
Bryan Duxbury
a97414674c 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
2010-09-12 15:30:06 +00:00
Bryan Duxbury
13ad873d18 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
2010-09-10 19:08:00 +00:00
Bryan Duxbury
34628f3e7a 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
2010-09-10 16:16:01 +00:00
Bryan Duxbury
855294b213 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
2010-09-08 21:47:45 +00:00
Bryan Duxbury
d483712972 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
2010-09-08 00:06:35 +00:00
Anthony F. Molinaro
ef16420d54 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
2010-09-07 03:35:30 +00:00
Bryan Duxbury
7a0825c34d 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
2010-09-02 16:42:18 +00:00
David Reiss
a9ca25a81e 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
2010-09-02 15:36:03 +00:00
David Reiss
c564fa5692 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
2010-09-02 15:36:00 +00:00
David Reiss
8ede81860c 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
2010-09-02 15:26:28 +00:00
Bryan Duxbury
383e949566 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
2010-09-02 15:16:56 +00:00
Bryan Duxbury
d6a02ff99b 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
2010-09-02 15:14:27 +00:00
Bryan Duxbury
f2ef59ffbf 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
2010-09-02 15:12:06 +00:00
Bryan Duxbury
472eb3c94c 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
2010-09-02 15:02:06 +00:00
Anthony F. Molinaro
7112c0712e THRIFT-875 : missing dist file
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991813 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 05:09:05 +00:00
Bryan Duxbury
727d67dcfa THRIFT-721. py: THttpClient ignores url parameters
Respect query string in THttpClient and generated remotes. Also, add an error message on unknown methods.

Patch: Thomas Kho

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991786 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 01:00:19 +00:00
Bryan Duxbury
010f1e09d0 THRIFT-756. cpp: Exposing TSocket(int) constructor to public
This patch changes the raw socket handle constructor from protected to public.

Patch: Rajat Goel

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991785 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 00:56:53 +00:00
Bryan Duxbury
ee8255d086 THRIFT-758. perl: incorrect deference in exception handling
Patch: Yann Kerherve

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991784 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 00:52:46 +00:00
Bryan Duxbury
686d92ce66 THRIFT-824. py: TApplicationException.__str__() refers to class constants as globals
Refer to constants via 'self'.

Patch: Peter Schuller

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991781 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 00:36:18 +00:00
Bryan Duxbury
a55f51d870 THRIFT-840. perl: Perl protocol handler could be more robust against unrecognised types
This patch causes the protocol to throw an exception when it sees an unrecognized type instead of silently doing nothing.

Patch: Conrad Hughes

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991778 13f79535-47bb-0310-9956-ffa450edef68
2010-09-02 00:24:50 +00:00
David Reiss
38104c8234 THRIFT-886. erlang: Fix dialyzer warning in thrift_http_transport
This spec should have been updated in r990996

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991603 13f79535-47bb-0310-9956-ffa450edef68
2010-09-01 16:54:05 +00:00
David Reiss
ea4c9816fc THRIFT-506. Allow Thrift to be built without the C++ library
Currently, this is only possible by explicitly passing --without-cpp.
It might be better to name it --without-cxx, but it is probably more
important to keep consistency with the "cpp" generator and "lib/cpp".

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991248 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 16:51:21 +00:00
David Reiss
351e22b52a THRIFT-503. cpp: Move the tests built by "make check" under lib/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991246 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 16:51:19 +00:00
David Reiss
2b45589aa3 THRIFT-500. Remove unnecessary "ACLOCAL_AMFLAGS" line from lib/cpp/Makefile.am
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991242 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 16:51:11 +00:00
David Reiss
5f11084c06 THRIFT-785. erlang: Eliminate log spew with framed transport
If we get an error when reading from the underlying transport, propagate
it out instead of dying and generating error logs.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991005 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:11:58 +00:00
David Reiss
f4494ee3a9 erlang: Un-revert r988722
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991003 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:06:03 +00:00
David Reiss
c549f7b086 erlang: Eliminate "behaviour undefined" warnings
Build behaviour modules first and include the ebin directory in
the Erlang code path during the rest of the build.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991002 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:06:01 +00:00
David Reiss
df2047e4b1 erlang: Parse multiple options properly in disk_log_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991001 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:06:00 +00:00
David Reiss
b4ab008476 erlang: Verify elt/key/val when reading list/set/map
For now, exit on a badmatch if one is wrong.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991000 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:58 +00:00
David Reiss
5ed313d998 erlang: Fix several compilation warnings
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990999 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:57 +00:00
David Reiss
cf7f3973bb erlang: Rename _impl headers to _behaviour
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990998 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:55 +00:00
David Reiss
a9c5283329 erlang: Fix a few spelling errors
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990997 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:53 +00:00
David Reiss
3a292b4441 erlang: Don't use a separate process for http_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990996 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:51 +00:00
David Reiss
48539bc960 erlang: Don't use a separate process memory_buffer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990995 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:50 +00:00
David Reiss
bc1b3fdb77 erlang: Don't use a separate process for framed_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990992 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:47 +00:00
David Reiss
0127af242f erlang: Don't use a separate process for buffered_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990991 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:46 +00:00
David Reiss
9b170ebf10 erlang: Add a state-propagation-testing transport
Add a transport implementation that forwards all read and write (and
flush and close) requests directly to a wrapped transport.  In addition,
it keeps a small amount of state: a version number that is incremented
on each operation and the PID of a process that stores another copy of
the version number.  Every operation compares the version numbers and
increments both.  If some part of the Thrift stack doesn't propagate
state updates properly, the two versions will not match.

Also add some (compiled-off by default) code to thrift_transport to
auto-wrap every transport in a state checker.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990990 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:44 +00:00
David Reiss
639e1cfe2b erlang: Refactor thrift_transport and all transport implementations
Note that the buffering transports still use a separate process to
maintain their state.  This change just changes them to use a
"return-the-new-version"-style API.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990989 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:43 +00:00
David Reiss
035979ff80 erlang: Refactor the processor
Now the server works.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990986 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:38 +00:00
David Reiss
4b0534a662 erlang: Get rid of after_reply from thrift_processor
We are always flushing the response after we write it.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990985 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:37 +00:00
David Reiss
b9561c83f5 erlang: Don't catch exits in thrift_processor
They are not handled properly, so the exit backtrace gets lost.
Just ignore them and let them kill the process naturally.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990984 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:36 +00:00
David Reiss
63f6126e97 erlang: Refactor the binary protocol
At this point, everything passes dialyzer except for the processor,
and the client works.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990983 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:34 +00:00
David Reiss
6c1875340a erlang: Refactor the read path of the protocol
TODO: squash this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990982 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:33 +00:00
David Reiss
82862950f6 erlang: Refactor the read path of the client
TODO: squash this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990981 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:32 +00:00
David Reiss
c465799c1b erlang: Refactor the write paths of the client and protocol
TODO: squash this

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990980 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:31 +00:00
David Reiss
3f660a4266 erlang: Client refactor, part 1
- Client is no longer a separate process.
- Simplified constructors moved into another module.
- All functions and exceptions return the new client,
  to allow for future statefulness in the client.

NOTE: With the new library and old gen-code, attempting to call a
nonexistent function will result in an exit.

TODO: fix docs and tests (tether test is not meaningful)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990979 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:29 +00:00
David Reiss
480d5ab62b erlang: Separate out thrift_protocol:read_specific
By giving a different name to the function that reads from the
protocol implementation, we can get a slightly more enforcible spec.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990977 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:26 +00:00
David Reiss
1cb979b3d0 erlang: Add a more detailed spec for thrift_protocol:read
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990976 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:25 +00:00
David Reiss
48b8124e32 erlang: Separate out thrift_binary_protocol:read_data
By giving a different name to the function that reads bytes from the
transport, we can get a slightly more detailed spec.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990975 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:23 +00:00
David Reiss
ee93398ccc erlang: Add some more detailed specs for protocol implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990974 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:22 +00:00
David Reiss
9b7fbe3743 erlang: Add some initial specs for thrift_transport and its implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990973 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:20 +00:00
David Reiss
5e6637b0ff erlang: Add some initial specs to thrift_client and thrift_protocol
Also add a special header for use in thrift_protocol implementations
that gives specs for the callbacks.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990972 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:18 +00:00
David Reiss
7772d931a1 erlang: Make framed_transport not write out its buffer when closed
This complicates the code, and users can be expected to call flush
when they want to write data to the underlying transport.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990969 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:15 +00:00
David Reiss
5db982cdf2 erlang: Make buffered_transport not write out its buffer when closed
This complicates the code, and users can be expected to call flush
when they want to write data to the underlying transport.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990968 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:13 +00:00
David Reiss
c0e4b5b246 erlang: Don't print a warning for application-defined exceptions
Application-defined exceptions are a normal occurrence as far as the
Thrift infrastructure is concerned, so we should not print a warning.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990967 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:12 +00:00
David Reiss
3e81fff832 erlang: Be a little more formal
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990966 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:11 +00:00
David Reiss
6d0be7235c erlang: Spell behaviour properly
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990965 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:09 +00:00
David Reiss
d172a887ff erlang: Export cast/3 from thrift_client (dialyzer warning)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990964 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:08 +00:00
David Reiss
ba5a984271 erlang: Fix a dialyzer warning in thrift_disk_log_transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990963 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:07 +00:00
David Reiss
14da1daf67 erlang: Fix a compiler warning in the disk_log transport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990962 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:06 +00:00
David Reiss
58d312d516 erlang: Remove some unused modules
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990961 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:05 +00:00
David Reiss
fb2c1ae594 erlang: Enable compiler warnings for the library
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990959 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:02 +00:00
David Reiss
f32d0fb900 Rollback a few recent Erlang changes to fix blame data
My combined patch for THRIFT-599 was committed, but it is preferable
commit the individual patches to preserve the more detailed log and
blame data.  I'll recommit r987018 as a sequence of patches and r988722
as its own rev.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990957 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 22:05:00 +00:00
David Reiss
73af3b7c4c THRIFT-869. python: Disguise ECONNRESET as EOF on BSD
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990955 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 21:57:07 +00:00
Bryan Duxbury
bcfb72a60b THRIFT-879. java: Remove @Override from TUnion.clear
Removes the unnecessary annotation.

Patch: Dave Engberg

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990931 13f79535-47bb-0310-9956-ffa450edef68
2010-08-30 20:27:32 +00:00