common/thrift.git
17 years agoUse interfaces, not classes for Java gen
Mark Slee [Sat, 9 Feb 2008 00:18:32 +0000 (00:18 +0000)] 
Use interfaces, not classes for Java gen

Summary: Not AbstractMap or HashSet, etc. use Map, List, Set

Reviewed By: dreiss

Test Plan: Generate Java code and build java tests

Other Notes: Submitted by Seth Falcon

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

17 years agoPatch from Ross McFarland to compile with strict warnings
Mark Slee [Sat, 9 Feb 2008 00:02:26 +0000 (00:02 +0000)] 
Patch from Ross McFarland to compile with strict warnings

Summary: Use comment trick in params that are unused to prevent warnings

Reviewed By: dreiss

Test Plan: Generate C++ code and compile -W -Wall

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

17 years agoThrift: Fix a bug in local reflection generation.
David Reiss [Fri, 8 Feb 2008 21:58:06 +0000 (21:58 +0000)] 
Thrift: Fix a bug in local reflection generation.

Summary:
The problem was that in generate_local_reflection, we refused to
generate reflections for types defined in another program, including enums.
But in local_reflection_name, we treated enums like base types,
assuming that their reflections were always defined in this program.
One solution would be to treat enums like base types everywhere, and always
generate their reflections in the program where they were being used.
But this change takes the opposite approach.  We now always
generate fingerprints for enums in the program in which they are defined,
even if they are not used there.

Reviewed By: mcslee

Test Plan:
Got the following files to build and link correctly with -dense.

dreiss@dreiss-vmware:reflection:thrift/test$ tail test[12].thrift
==> test1.thrift <==
enum foo { bar }

==> test2.thrift <==
include "test1.thrift"
struct baz {
  1: test1.foo qux
}

Revert Plan: ok

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

17 years agoThrift: Whitespace cleanup.
David Reiss [Wed, 6 Feb 2008 22:18:40 +0000 (22:18 +0000)] 
Thrift: Whitespace cleanup.

Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok

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

17 years agoThrift: Update some makefiles to make "make dist" work.
David Reiss [Wed, 6 Feb 2008 22:10:26 +0000 (22:10 +0000)] 
Thrift: Update some makefiles to make "make dist" work.

Reviewed By: mcslee

Test Plan: Ran "make dist" and did a diff.

Revert Plan: ok

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

17 years agoThrift: Add a Makefile to build the C# library with Mono.
David Reiss [Wed, 6 Feb 2008 22:10:12 +0000 (22:10 +0000)] 
Thrift: Add a Makefile to build the C# library with Mono.

Reviewed By: mcslee

Test Plan: Installed Mono and built it.

Revert Plan: ok

Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.

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

17 years agoThrift: Miscellaneous optimizations for C#.
David Reiss [Wed, 6 Feb 2008 22:09:58 +0000 (22:09 +0000)] 
Thrift: Miscellaneous optimizations for C#.

Reviewed By: mcslee

Test Plan: Built it after a future revision.

Revert Plan: ok

Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.

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

17 years agoThrift: String/Binary distinction for C#.
David Reiss [Wed, 6 Feb 2008 22:09:44 +0000 (22:09 +0000)] 
Thrift: String/Binary distinction for C#.

Reviewed By: mcslee

Test Plan: Built it after a future revision.

Revert Plan: ok

Other Notes:
Submitted by Ben Maurer.
Actually reviewed by Todd Berman.

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

17 years agoThrift/Ruby: Bug fix.
David Reiss [Wed, 6 Feb 2008 18:22:39 +0000 (18:22 +0000)] 
Thrift/Ruby: Bug fix.

Summary:
Some member variables were actually being treated as local variables.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

Other Notes:
Actually reviewed by Kevin Clark.

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

17 years agoThrift: Revamp TMemoryBuffer constructors.
David Reiss [Mon, 4 Feb 2008 21:56:27 +0000 (21:56 +0000)] 
Thrift: Revamp TMemoryBuffer constructors.

Summary:
There were some weird cases where the implicit conversion from
const char* to std::string was causing the wrong constructor to be called.
There wasn't really a clean workaround, so we're dropping the string
constructors.

Reviewed By: mcslee

Test Plan:
Ran the test.
Grepped around the /projects tree for uses that had to fixed,
and fixed them.

Revert Plan: ok

Other Notes:
This risk was pointed out by Ben Maurer.

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

17 years agoMake inner Isset classes implement serializable
Mark Slee [Mon, 4 Feb 2008 21:34:22 +0000 (21:34 +0000)] 
Make inner Isset classes implement serializable

Summary: Since the outer class is serializable, you'll want it on the inner member too. Though in general you shouldn't be using Java to serialize Thrift objects, as that misses the point and tosses version compatibility out the window.

Reviewed By: dreiss

Test Plan: Generate Java code

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

17 years agoThrift: Update CONTRIBUTORS.
David Reiss [Mon, 4 Feb 2008 21:28:20 +0000 (21:28 +0000)] 
Thrift: Update CONTRIBUTORS.

Summary:
Forgot to mention in my last commit that the bulk of the change was
submitted by Nitay.  Updating the CONTRIBUTORS file while I'm at it.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

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

17 years agoThrift: "make check" support.
David Reiss [Mon, 4 Feb 2008 21:14:14 +0000 (21:14 +0000)] 
Thrift: "make check" support.

Summary:
Add a Makefile.am in the test directory that runs some of the test programs
when "make check" is executed.  Also removed some obsolete comments.

Reviewed By: mcslee

Test Plan:
Ran make check, saw all tests pass.
Ran make install, saw no test programs installed.
Ran ./cleanup.sh, saw a pristine workspace.

Revert Plan: ok

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

17 years agoThrift: Forgot to dereference a pointer.
David Reiss [Mon, 4 Feb 2008 19:24:00 +0000 (19:24 +0000)] 
Thrift: Forgot to dereference a pointer.

Summary:
This didn't get updated when the interface changed,
and the cast silenced the warning message.  Stupid C.

Reviewed By: mcslee

Test Plan: Trust Chad Walters.

Revert Plan: ok

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

17 years agoThrift: Fix a bug in a test program.
David Reiss [Mon, 4 Feb 2008 19:23:57 +0000 (19:23 +0000)] 
Thrift: Fix a bug in a test program.

Summary:
This didn't get updated when the class was renamed.

Reviewed By: mcslee

Test Plan: Trust Chad Walters.

Revert Plan: ok

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

17 years agoThrift: Make borrow (almost) always succeed for TBufferedTransport.
David Reiss [Sat, 2 Feb 2008 00:54:55 +0000 (00:54 +0000)] 
Thrift: Make borrow (almost) always succeed for TBufferedTransport.

Chad Walters is writing a JSON protocol for Thrift, but he wants
borrow to always succeed.  That would be a pain to implement,
but here is a first step: borrow will almost always work with
TBufferedTransport.

Reviewed by: mcslee

Test Plan: Ran the DenseProtocol test and Zlib test, but more needs to be done.

Other Notes:
Also reviewed by Chad Walters, and maybe Ben Maurer.

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

17 years agoThrift: Update the interface for TTransport's "borrow" method.
David Reiss [Sat, 2 Feb 2008 00:54:48 +0000 (00:54 +0000)] 
Thrift: Update the interface for TTransport's "borrow" method.

Summary:
I don't know what I was thinking when I first wrote this.
It makes sense that the transport might not want to allocate its own memory,
so the protocol is expected to provide a buffer for the data.
However, if the transport already has the data buffered,
there is no need to memcpy it; it can just return a pointer into its buffer.
The new interface still requires the protocol to provide a buffer,
but allows the transport to return a pointer to an interal buffer.
In addition, I made len a pass-by-pointer parameter so that
the transport can return more than the requested data if it has it
available in its buffers.

Reviewed By: mcslee

Test Plan: Ran the DenseProtocol test and the Zlib test.

Revert Plan: ok

Other Notes:
Also got this reviewed by Chad Walters from Powerset.
Ben Maurer suggested making len a reference parameter.

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

17 years ago[thrift] Fix generated T_LIST push_back() for cpptype override
dweatherford [Fri, 1 Feb 2008 20:42:56 +0000 (20:42 +0000)] 
[thrift] Fix generated T_LIST push_back() for cpptype override

Summary: Thrift compiler emitting code missing a closing paren:
  "this->extras.push_back(_elem18;"
Reviewed by: eletuchy
Test plan: rebuild some feed code that uses cpptype overrides
Revert: ok

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

17 years agoFix to the throws clause validation
Mark Slee [Fri, 1 Feb 2008 01:36:26 +0000 (01:36 +0000)] 
Fix to the throws clause validation

Summary: Types from external files are not resolved until the program parse pass, not the include one. Therefore, only do full type validation once after all includes have been parsed and external type pointers resolved.

Reviewed By: aditya

Test Plan: build ServiceManager.thrift

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

17 years agoIf a list has a custom CPP type, use push_back
Mark Slee [Thu, 31 Jan 2008 22:02:26 +0000 (22:02 +0000)] 
If a list has a custom CPP type, use push_back

Summary: Can't deserialize by reference into std::list, for example

Reviewed By: dweatherford

Test Plan: Build feed

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

17 years agoValidate that throws clauses in Thrift contain only exceptions
Mark Slee [Thu, 31 Jan 2008 01:49:16 +0000 (01:49 +0000)] 
Validate that throws clauses in Thrift contain only exceptions

Summary: Throwing non-exceptions, though allowed in some languages, is a weird concept and causes problems in many places. Disallow it in the Thrift compiler and throw an informative error.

Reviewed By: dreiss

Test Plan: Generate a file with an int or something in a throws clause. Peep the nice informative compiler error.

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

17 years agoImprove C++ vector deserialization
Mark Slee [Thu, 31 Jan 2008 00:06:29 +0000 (00:06 +0000)] 
Improve C++ vector deserialization

Summary: Use std::vector::resize() method to default construct placeholder elements. Then grab references via operator[] to deserialize directly into the vector, instead of copy-constructing elements in.

Reviewed By: hzhao

Test Plan: test/cpp contains list serialization/deserialization checks

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

17 years agoImprove Thrift map deserialization code
Mark Slee [Wed, 30 Jan 2008 23:23:15 +0000 (23:23 +0000)] 
Improve Thrift map deserialization code

Summary: Instead of copy-constructing map values into the map, alter the code such that we insert default-constructed elements into the map and then deserialize them by reference.

Reviewed By: hzhao

Test Plan: Ran the test in test/cpp which include serialization and deserialization of nested maps.

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

17 years ago[thrift] iolists and binaries in Erlang
Christopher Piro [Wed, 30 Jan 2008 01:39:01 +0000 (01:39 +0000)] 
[thrift] iolists and binaries in Erlang

Summary: three related changes:
 * for numeric types in tBinaryProtocol call effectful_write with binary(), not [char()]
 * tBinaryProtocol:writeString now takes either [char()], iolist(), or binary() ... now you can use any of the three where a Thrift string is required
 * tBufferedTransport now buffers by building an iolist() rather than Buffer++Data.  zomg.

Reviewed By: eletuchy

Test Plan: everything seems to work as usual, and binary() works as expected

Revert Plan: ok

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

17 years agoThrift/Ruby: Generate nicer constructors for Thrift structs.
David Reiss [Mon, 28 Jan 2008 20:47:00 +0000 (20:47 +0000)] 
Thrift/Ruby: Generate nicer constructors for Thrift structs.

Submitted by William Morgan.
Approved by Kevin Clark.

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

17 years agoThrift/Ruby: Allow some thrift exceptions to use standard Ruby syntax.
David Reiss [Mon, 28 Jan 2008 20:46:57 +0000 (20:46 +0000)] 
Thrift/Ruby: Allow some thrift exceptions to use standard Ruby syntax.

Submitted by William Morgan.
Approved by Kevin Clark.

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

17 years agoThrift/Ruby: TSimpleServer closes its listen socket on an uncaught exception.
David Reiss [Mon, 28 Jan 2008 20:46:53 +0000 (20:46 +0000)] 
Thrift/Ruby: TSimpleServer closes its listen socket on an uncaught exception.

Submitted by William Morgan.
Approved by Kevin Clark.

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

17 years agoThrift/Ruby: Remove a debugging message.
David Reiss [Mon, 28 Jan 2008 20:46:50 +0000 (20:46 +0000)] 
Thrift/Ruby: Remove a debugging message.

Submitted by William Morgan.
Approved by Kevin Clark.

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

17 years agoThrift: Better exception handling in Ruby.
David Reiss [Fri, 25 Jan 2008 20:12:26 +0000 (20:12 +0000)] 
Thrift: Better exception handling in Ruby.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

Other Notes:
Submitted by William Morgan.
Approved by Kevin Clark.

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

17 years agoThrift: Some sort of Ruby performance fix.
David Reiss [Fri, 25 Jan 2008 20:05:50 +0000 (20:05 +0000)] 
Thrift: Some sort of Ruby performance fix.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

Other Notes:
Submitted by Dave Simpson.
Approved by Kevin Clark.

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

17 years agoThrift: Allow a custom User-Agent with the Cocoa THttpClient.
David Reiss [Wed, 23 Jan 2008 20:35:39 +0000 (20:35 +0000)] 
Thrift: Allow a custom User-Agent with the Cocoa THttpClient.

Reviewed By: mcslee

Test Plan: None.

Other Notes:
Submitted by Andrew McGeachie, the author of the Cocoa bindings.

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

17 years agoThrift CSharp build to check compiler return code
Mark Slee [Tue, 22 Jan 2008 04:04:30 +0000 (04:04 +0000)] 
Thrift CSharp build to check compiler return code

Summary: If non-zero, toss an error to the log

Reviewed By: dreiss

Other Notes: Submitted by Will Palmeri

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

17 years ago[thrift] Ruby TThreadedServer and TThreadPoolServer
Christopher Piro [Fri, 18 Jan 2008 21:35:34 +0000 (21:35 +0000)] 
[thrift] Ruby TThreadedServer and TThreadPoolServer

Summary: They both use the same handler for all connections and thus assume the handler is thread-safe. The TThreadPoolServer preserves threads, so it wouldn't be too hard to make a variant that used a separate handler for each thread and thus didn't require thread safety.

Reviewed By: mcslee

Test Plan: loads without error

Revert Plan: ok

Other Notes: contributed by William Morgan (w@adap.tv)

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

17 years agoThrift: Change the way constants are initialized to avoid segfaults.
David Reiss [Fri, 18 Jan 2008 07:39:36 +0000 (07:39 +0000)] 
Thrift: Change the way constants are initialized to avoid segfaults.

Reviewed By: mcslee

Test Plan: Looked at the patch carefully.

Other Notes:
Patch submitted by Dave Simpson.

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

17 years agotest trigger
mvaradachari [Fri, 18 Jan 2008 01:54:55 +0000 (01:54 +0000)] 
test trigger

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

17 years agotest triggers
mvaradachari [Fri, 18 Jan 2008 01:00:18 +0000 (01:00 +0000)] 
test triggers

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

17 years agoFix set_name compiler method signature
Mark Slee [Fri, 18 Jan 2008 00:57:59 +0000 (00:57 +0000)] 
Fix set_name compiler method signature

Reviewed By: kholst

Other Notes: Follow up from 78130

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

17 years agoFix typo of current
Mark Slee [Wed, 16 Jan 2008 21:29:45 +0000 (21:29 +0000)] 
Fix typo of current

Summary: Whoops.

Reviewed By: dreiss

Other Notes: Submitted by Patrick Collison

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

17 years agoThrift: Improve cleanup.sh.
David Reiss [Wed, 16 Jan 2008 06:32:19 +0000 (06:32 +0000)] 
Thrift: Improve cleanup.sh.

Reviewed By: mcslee

Test Plan:
dreiss@dreiss-vmware:cleanup:thrift$ ./bootstrap.sh && ./configure && make -j2 && ./cleanup.sh && git status
# Shows no untracked files.

Revert Plan: ok

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

17 years agothrift: Add -cpp_use_include_prefix flag to compiler
kholst [Wed, 16 Jan 2008 02:47:41 +0000 (02:47 +0000)] 
thrift: Add -cpp_use_include_prefix flag to compiler

Summary: Adds a new flag to allow for a mode where #include statements in generated c++ will include path context information.  For example, if my .thrift file includes "foo/bar/baz.thrift", the generated source files will contain #include statements like:

         #include "foo/bar/gen-cpp/baz_types.h"

         instead of just:

         #include "baz_types.h"

         -cpp_use_include_prefix is OFF by default.

Reviewed By: dreiss

Test Plan: Tested against multiple thrift input files both with and without the new flag.

Revert: OK

DiffCamp Revision: 5522

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

17 years agoMake sure exceptinos in servers are caught
Mark Slee [Wed, 16 Jan 2008 00:38:20 +0000 (00:38 +0000)] 
Make sure exceptinos in servers are caught

Summary: There was potential for a write exception in close() because it might call flush() internally

Reviewed By: dreiss

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

17 years agoThrift: Fix formatting of the CONTRIBUTORS file.
David Reiss [Tue, 15 Jan 2008 19:45:02 +0000 (19:45 +0000)] 
Thrift: Fix formatting of the CONTRIBUTORS file.

Reviewed By: mcslee

Test Plan: no

Revert Plan: ok

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

17 years ago[thrift] flesh out thrift Erlang tutorial client
Christopher Piro [Tue, 15 Jan 2008 12:52:51 +0000 (12:52 +0000)] 
[thrift] flesh out thrift Erlang tutorial client

Summary: Added examples for all examples except inheritance and application exception handling (divide by zero); looks like both are currently broken.  Weak.

Reviewed By: eletuchy

Test Plan: works just like RubyClient.rb (modulo the commented out bits)

Revert Plan: ok

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

17 years ago[thrift] preliminary tthrift tutorial client for Erlang
Christopher Piro [Tue, 15 Jan 2008 12:04:15 +0000 (12:04 +0000)] 
[thrift] preliminary tthrift tutorial client for Erlang

Summary: we haven't had a client tutorial for the longest time -- added one that basically works.  will iron the bugs out in due order.

Reviewed By: eletuchy

Test Plan: works when launched like server.sh

Revert Plan: ok

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

17 years ago[thrift] add a configuration file to the Erlang server tutorial
Christopher Piro [Tue, 15 Jan 2008 12:04:12 +0000 (12:04 +0000)] 
[thrift] add a configuration file to the Erlang server tutorial

Summary: Logger configuration (and all Thrift config in Erlang) now uses application:get_env/2 via thrift:config/2.  Defaults can be provided on the erl command line with ``-config <filename>''.  It may also be helpful to cascade config files; {key, value} pairs provided in subsequent files will override previous ones -- e.g. in our applications we use ``-config base.config -config cpiro.config''.

server.config was added as an example and server.sh was updated to invoke erl with ``-config server.config''.

Reviewed By: eletuchy

Test Plan: the tutorial server now outputs a reasonable set of messages

Revert Plan: ok

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

17 years ago[thrift] update thrift_logger bits in Erlang server tutorial
Christopher Piro [Tue, 15 Jan 2008 12:04:09 +0000 (12:04 +0000)] 
[thrift] update thrift_logger bits in Erlang server tutorial

Summary: thrift_logger changed a while back but the tutorial didn't keep up.  fixed.

Reviewed By: eletuchy

Test Plan: compiles now :p

Revert Plan: ok

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

17 years agoAdd some more TThreadPoolServer constructors
Mark Slee [Tue, 15 Jan 2008 02:59:12 +0000 (02:59 +0000)] 
Add some more TThreadPoolServer constructors

Summary: Change the default to Executors.newCachedThreadPool() which is a good default and basically what we should always want.

Reviewed By: dreiss

Test Plan: Run a Java server with default args

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

17 years agoGenerate structs/exceptions in declared order
Mark Slee [Mon, 14 Jan 2008 23:04:43 +0000 (23:04 +0000)] 
Generate structs/exceptions in declared order

Summary: Otherwise you're liable to get forward declaration problems in the generated C++ code.

Reviewed By: dreiss

Test Plan: Generate some code that mixes exceptions/structs and has methods potentially return a list of exceptions

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

17 years ago[thrift] fix thrift_logger.erl when show_pid option is enabled
Christopher Piro [Mon, 14 Jan 2008 05:54:50 +0000 (05:54 +0000)] 
[thrift] fix thrift_logger.erl when show_pid option is enabled

Summary: this gets rid of a lot of messy useless output every time the error logger prints something

Reviewed By: eletuchy

Test Plan: works as expected

Revert Plan: ok

Other Notes: contributed by Todd Lipcon (todd@amiestreet.com)

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

17 years agoThrift: C# Bindings.
David Reiss [Fri, 11 Jan 2008 20:59:12 +0000 (20:59 +0000)] 
Thrift: C# Bindings.

Summary:
C# generator, library, and MS Build task contributed by imeem.

Reviewed By: mcslee

Test Plan:
Built the Thrift compiler and generated some C# code.
I'd love to say I installed Mono or Portable.NET and built the C# code,
but I did not.

Revert Plan: ok

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

17 years agoThrift: MinGW port.
David Reiss [Fri, 11 Jan 2008 20:59:03 +0000 (20:59 +0000)] 
Thrift: MinGW port.

Summary:
Todd Berman from imeem has contributed a patch that allows
the Thrift compiler to be built with MinGW and run on Windows.

Reviewed By: mcslee

Test Plan:
Built the compiler from scratch on Linux.
If my changes messed up the MinGW build, I'm sure Todd will yell at me.

Revert Plan: ok

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

17 years agoChagnge TThreadPoolServer in Java to use SynchronousQueue by default
Mark Slee [Thu, 10 Jan 2008 19:57:47 +0000 (19:57 +0000)] 
Chagnge TThreadPoolServer in Java to use SynchronousQueue by default

Summary: Read the documentation on ThreadPoolExecutor. It's very confusing. Basically, what we want is a queue that always defers to the threadpool and will always create a new thread to do work. We never want the queue to take priority over the thread pool by default.

Reviewed By: dreiss

Test Plan: Run a Java Thrift server

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

17 years agoRuby default values patch
Mark Slee [Thu, 10 Jan 2008 00:53:08 +0000 (00:53 +0000)] 
Ruby default values patch

Summary: Submitted by Dan Sully, reviewed by Kevin Clark

Reviewed By: dreiss

Test Plan: New ruby generated code with default vals, and new test scripts

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

17 years agoFix generation for Byte/byte while we're at it
Mark Slee [Wed, 9 Jan 2008 19:51:24 +0000 (19:51 +0000)] 
Fix generation for Byte/byte while we're at it

Summary: If in a container, use Byte not byte

Reviewed By: dreiss

Test Plan: Generate a list of bytes

Other Notes: based upon Kyle's submission

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

17 years agoThrift: Java generator bugfix.
David Reiss [Wed, 9 Jan 2008 19:20:20 +0000 (19:20 +0000)] 
Thrift: Java generator bugfix.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

Other Notes:
Reported by Kyle Shank.

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

17 years ago[thrift] in erlang add {nodelay, true} and {reuseaddr, true} to gen_tcp socket options
Christopher Piro [Tue, 8 Jan 2008 03:14:19 +0000 (03:14 +0000)] 
[thrift] in erlang add {nodelay, true} and {reuseaddr, true} to gen_tcp socket options

Summary: for parity with the C++ implementation

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

Other Notes: contributed by Todd Lipcon (todd@amiestreet.com)

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

17 years ago[thrift] py: TApplicationException.__str__
dweatherford [Mon, 7 Jan 2008 22:23:07 +0000 (22:23 +0000)] 
[thrift] py: TApplicationException.__str__

Summary: Now infinitely more printable than ever before!
Reviewed by: mcslee
Test Plan: except TApplicationException, inst: \n\t\t print inst
Revert: ok

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

17 years agoRemove bogus Iface inclusion from Ruby tutorial
Mark Slee [Mon, 7 Jan 2008 21:50:30 +0000 (21:50 +0000)] 
Remove bogus Iface inclusion from Ruby tutorial

Reviewed By: mcslee

Test Plan: The Ruby tutorial is runnable with this fix

Other Notes: Submitted by Eric Wong

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

17 years ago[Thrift] disabling catching general type exceptions in Tthreadpoolserver
pfung [Sat, 5 Jan 2008 23:23:53 +0000 (23:23 +0000)] 
[Thrift] disabling catching general type exceptions in Tthreadpoolserver

the threadpoolserver should just crash if an unknown exception type is thrown.

This should probably be true for all server types, will put this on the TODO list.

reviewed by jwang
test plan: network selector servers in production

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

17 years ago[thrift] add show_pid option to thrift.app.src (Erlang)
Christopher Piro [Fri, 4 Jan 2008 00:21:18 +0000 (00:21 +0000)] 
[thrift] add show_pid option to thrift.app.src (Erlang)

Summary: we've been using this option in our apps but we never added it to thrift's own config

Reviewed By: eletuchy

Test Plan: ok

Other Notes: contributed by Jason Ganetsky (jason@amiestreet.com)

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

17 years agoremoved exit status checking for autoconf in bootstrap.sh -- new changes break builds
mvaradachari [Tue, 1 Jan 2008 04:51:24 +0000 (04:51 +0000)] 
removed exit status checking for autoconf in bootstrap.sh -- new changes break builds

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

17 years agoThrift: Revamp build to use a single configure.ac.
David Reiss [Fri, 28 Dec 2007 18:25:33 +0000 (18:25 +0000)] 
Thrift: Revamp build to use a single configure.ac.

Summary:
Ben Maurer suggested that it would make sense for Thrift to build as
a single project, with one configure.ac and multiple Makefile.am.
He was also kind enough to do the heavy lifting, and this commit
is the application of his patch (with minor modifications).
The most significant visible change from this diff is that
in order to buidl one of the thrift sub-projects (i.e.: the compiler,
the C++ library, or the Python library) you must run bootstrap.sh
and configure in the Thrift root, then make in the specific project.
Users who want to build and install the Python library but
can't run configure because they don't have Boost can simply
run setup.py directly.

Reviewed By: mcslee

Test Plan: Built Thrift from scratch.

Revert Plan: ok

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

17 years ago[thrift] service functions that begin with a Capital now work for Erlang ...
eletuchy [Thu, 27 Dec 2007 15:20:14 +0000 (15:20 +0000)] 
[thrift] service functions that begin with a Capital now work for Erlang ...

Summary: ... The main interface function has the same name, but as an escaped atom
         (ie 'CapitalizedFun'(Arg1, Arg2) -> is the function sig)

Reviewed by: dweatherford

Test Plan: tested with the following thrift
     service foo {
         Struct1 CapitalizedFun(1: list<Struct2> param);
     }

     Generated erlang code now compiles

Revert Plan: sure

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

17 years agoThrift: Wide string support for Perl.
David Reiss [Wed, 26 Dec 2007 20:23:03 +0000 (20:23 +0000)] 
Thrift: Wide string support for Perl.

Summary:
This patch allows the TBinaryProtocol to encode wide character strings
as UTF-8 before serializing.  It does not support decoding when receiving.

Reviewed By: mcslee

Test Plan: None.

Revert Plan: ok

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

17 years ago-- Allow ThreadPoolManager tp return immediately from addTask
Aditya Agarwal [Tue, 25 Dec 2007 22:58:50 +0000 (22:58 +0000)] 
-- Allow ThreadPoolManager tp return immediately from addTask

Summary:
- it should be possible to specify a zero timeout if the pendingTaskQueue
  is already full

Reviewed By: marc

Test Plan:
- Tested in search

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

17 years agoMake base set_name take const std:string& instead of std:string
Mark Slee [Fri, 21 Dec 2007 23:53:10 +0000 (23:53 +0000)] 
Make base set_name take const std:string& instead of std:string

Summary: All the subclasses do that so it causes warnings not to and is dumb because copy constructing std::string is dumb

Reviewed By: kholst

Test Plan: Generate some codes, compile with -Werror

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

17 years agoMake "args" reserved in thrift
Mark Slee [Fri, 21 Dec 2007 23:52:19 +0000 (23:52 +0000)] 
Make "args" reserved in thrift

Summary: Breaks the generated python code

Reviewed By: dcorson

Test Plan: Get an error if you use "args" as a variable name in Thrift.

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

17 years ago[thrift] Make TTransportException::getType const throw()
dweatherford [Fri, 21 Dec 2007 07:07:31 +0000 (07:07 +0000)] 
[thrift] Make TTransportException::getType const throw()

Summary: const so that catching via "catch (const TTransportException& e)" works
  properly, and throw() for good convention.
Reviewed By: mcslee
Test Plan: still compiles
Revert: ok

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

17 years agoThrift: A hack to prevent incorrect usage of Mutex Guards.
David Reiss [Thu, 20 Dec 2007 21:42:05 +0000 (21:42 +0000)] 
Thrift: A hack to prevent incorrect usage of Mutex Guards.

Reviewed By: boz

Test Plan:
dreiss@dreiss-vmware:safe_concurrency:thrift/test$ nl -ba guard_test.cc
     1  #include "../lib/cpp/src/concurrency/Mutex.h"
     2  using facebook::thrift::concurrency::Guard;
     3  void test() {
     4    facebook::thrift::concurrency::Mutex m;
     5    Guard(m);
     6    Guard g1(m);
     7
     8    facebook::thrift::concurrency::ReadWriteMutex rwm;
     9    facebook::thrift::concurrency::RWGuard(m);
    10    facebook::thrift::concurrency::RWGuard g2(rwm);
    11  }
dreiss@dreiss-vmware:safe_concurrency:thrift/test$ g++ -c guard_test.cc
guard_test.cc: In function ‘void test()’:
guard_test.cc:5: error: ‘incorrect_use_of_Guard’ was not declared in this scope
guard_test.cc:9: error: ‘incorrect_use_of_RWGuard’ is not a member of ‘facebook::thrift::concurrency’
dreiss@dreiss-vmware:safe_concurrency:thrift/test$

Revert Plan: ok

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

17 years agois_a is deprecated, instanceof only takes vars or constants
Mark Slee [Thu, 20 Dec 2007 03:23:27 +0000 (03:23 +0000)] 
is_a is deprecated, instanceof only takes vars or constants

Summary: Solution, dummy static class var to use instanceof

Reviewed By: dweatherford

Test Plan: Regen'd some mobile code in trunk using this

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

17 years ago[thrift] squelch crash reports in Erlang R12B-0
Christopher Piro [Wed, 19 Dec 2007 00:00:39 +0000 (00:00 +0000)] 
[thrift] squelch crash reports in Erlang R12B-0

Summary: there's a new format for errors in R12B-0, so don't echo a crash report if it matches the new one

Reviewed By: eletuchy

Test Plan: completely unnecessary

Revert Plan: ok

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

17 years agoThrift: Optional support for new-style classes.
David Reiss [Tue, 18 Dec 2007 03:37:30 +0000 (03:37 +0000)] 
Thrift: Optional support for new-style classes.

Reviewed By: mcslee

Test Plan: Thrifted ThriftTest.thrift and looked at the output.

Revert Plan: ok

Other Notes:
Based on a patch from Jon Dugan.

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

17 years agoThrift: Make default values for base types work in Java.
David Reiss [Tue, 18 Dec 2007 02:54:06 +0000 (02:54 +0000)] 
Thrift: Make default values for base types work in Java.

Summary:
The Java generator wasn't setting default values for base types
in the zero argument constructor.  This check was probably brought over
from the C++ generator, where base types are given their default values
in the member variable initializer list (or whatever that thing is called).

Blame Rev: Somewhere in the mysterious past.  I tried to find it, but failed.

Reviewed By: mcslee

Test Plan: Recompiled Thrift and thrifted a file that showed the bug.

Revert Plan: ok

Other Notes:
Bug reported by Jake Luciani.

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

17 years agoPrivate methods called not via self.
Mark Slee [Tue, 18 Dec 2007 02:06:44 +0000 (02:06 +0000)] 
Private methods called not via self.

Summary: Because self. puts you in public scope

Reviewed By: mcslee

Test Plan: Use Ruby framed transport

Other Notes: Submitted by Jake Luciani

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

17 years agoThrift: Fix a bug in the Java runtime.
David Reiss [Mon, 17 Dec 2007 09:49:10 +0000 (09:49 +0000)] 
Thrift: Fix a bug in the Java runtime.

Reviewed By: mcslee

Test Plan: Looked at the C++ version side-by-side.

Revert Plan: ok

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

17 years agoThrift: Set an svn property and updated the CONTRIBUTORS file.
David Reiss [Sat, 15 Dec 2007 00:09:54 +0000 (00:09 +0000)] 
Thrift: Set an svn property and updated the CONTRIBUTORS file.

Reviewed By: mcslee

Test Plan: none

Revert Plan: ok

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

17 years agoThrift: Python support for Unix-domain sockets, and eager timeout setting.
David Reiss [Fri, 14 Dec 2007 23:46:47 +0000 (23:46 +0000)] 
Thrift: Python support for Unix-domain sockets, and eager timeout setting.

Reviewed By: mcslee

Test Plan: Ran the test script.

Revert Plan: ok

Other Notes:
Contributed by Ben Maurer.

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

17 years agoThrift: Maximum read length for Java.
David Reiss [Fri, 14 Dec 2007 22:14:47 +0000 (22:14 +0000)] 
Thrift: Maximum read length for Java.

Summary:
A feature to improve handling of invalid wire data by the Java Thrift library.

Reviewed By: mcslee

Test Plan: I trust Dave Engberg.

Revert Plan: ok

Other Notes:
Submitted by Dave Engberg.

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

17 years agoThrift: Fix dangling pointer errors and make messages a bit more uniform.
David Reiss [Fri, 14 Dec 2007 20:56:04 +0000 (20:56 +0000)] 
Thrift: Fix dangling pointer errors and make messages a bit more uniform.

Reviewed By: mcslee

Test Plan: Honestly, just built the library.

Revert Plan: ok

Other Notes:
Thanks to Ben Maurer.

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

17 years agoThrift: Smalltalk prefix support.
David Reiss [Fri, 14 Dec 2007 07:03:03 +0000 (07:03 +0000)] 
Thrift: Smalltalk prefix support.

Reviewed By: mcslee

Test Plan: Built the compiler.

Revert Plan: ok

Other Notes:
Contributed by Ben Matasar.
Signed off by Patrick Collison.

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

17 years agoUse HAVE_SYS_TIME_H instead of HAVE_CLOCK_GETTIME
Mark Slee [Thu, 13 Dec 2007 22:47:33 +0000 (22:47 +0000)] 
Use HAVE_SYS_TIME_H instead of HAVE_CLOCK_GETTIME

Summary: Still need the right include here

Reviewed By: mcslee

Test Plan: Paul Saab used this fix to build on Leopard

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

17 years ago[Thrift] message debugging for std::exceptions
pfung [Thu, 13 Dec 2007 22:30:47 +0000 (22:30 +0000)] 
[Thrift] message debugging for std::exceptions

std::exceptions did not have debug messages printed

reviewed by dreiss
test plan: compiles

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

17 years agoFix to TThriftTransport corruption detection
James Wang [Thu, 13 Dec 2007 19:46:27 +0000 (19:46 +0000)] 
Fix to TThriftTransport corruption detection

Summary: O_APPEND means that even if the file pointer is in the middle of the file, the next write will go to the end of the file. So when initializing the TThriftTransport to be written to, we need to truncate the file after the last good event.  I'm pretty sure this was what was causing queuemap log corruption when the multiplexer is restarted.

         The corruption doesn't necessarily go away at the next chunk boundary because of the offset being recalculated.  I think it's good to have the offset recalculated, but then we shouldn't use the old chunk boundary data there, but rather use the newly calculated offset to determine the padding (could be an entire chunk, but that's okay -- way better than corruption)

Reviewed By: mcslee

Test Plan: Wrote to a ThriftFile using local scribe instance. Printed it. Then cat'd garbage to it from the command line. Then wrote to it again. Then printed it again.  Seems to work fine, whereas with old scribe binary the later entries were corrupted.

Revert: OK

DiffCamp Revision: 4683

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

17 years ago-- better error checking for setRecvTimeout and setSendTimeout
Aditya Agarwal [Tue, 11 Dec 2007 22:23:51 +0000 (22:23 +0000)] 
-- better error checking for setRecvTimeout and setSendTimeout

Summary:
- could help prevent a 2.6.13 kernel bug

Reviewed By: mcslee, dreiss

Test Plan:
- Testing kernel crashes

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

17 years agoFailing to init eventBase_ to NULL in one constructor
Mark Slee [Wed, 5 Dec 2007 23:20:54 +0000 (23:20 +0000)] 
Failing to init eventBase_ to NULL in one constructor

Reviewed By: dreiss

Test Plan: See if scribe works for powerset

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

17 years agoMerge Ruby framed transport
Mark Slee [Wed, 5 Dec 2007 23:13:11 +0000 (23:13 +0000)] 
Merge Ruby framed transport

Summary: Submitted by Jake Luciani

Reviewed By: mcslee

Test Plan: Test code included in this commit

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

17 years agoRemove unnecessary mutex from C++ socket code
Mark Slee [Wed, 5 Dec 2007 23:03:37 +0000 (23:03 +0000)] 
Remove unnecessary mutex from C++ socket code

Summary: This is a threadsafe syscall, as it turns out.

Reviewed By: hzhao

Test Plan: Thrift Client C++ sockets don't lock

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

17 years ago[thrift] Better default TApplicationException messages
dweatherford [Wed, 5 Dec 2007 03:40:19 +0000 (03:40 +0000)] 
[thrift] Better default TApplicationException messages

Summary: "Default TApplicationException" is pretty meaningless; if we have this
  extra type information, we might as well present it.

Reviewed By: mcslee
Test Plan: caught a couple of INVALID_MESSAGE_TYPE tapplicationexceptions
Revert: ok

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

17 years agoThrift: Make some server methods public.
David Reiss [Fri, 30 Nov 2007 20:38:49 +0000 (20:38 +0000)] 
Thrift: Make some server methods public.

Reviewed By: mcslee

Test Plan: Compiles.

Revert Plan: ok

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

17 years agoFix bug that double-initializes list objects in deserialization.
Mark Slee [Fri, 30 Nov 2007 01:43:36 +0000 (01:43 +0000)] 
Fix bug that double-initializes list objects in deserialization.

Reviewed By: jssarma

Test Plan: Regenerate Java code, check list deserializer for no double-object instantiation

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

17 years agoCustom HTTP headers patch from Dave Engberg
Mark Slee [Thu, 29 Nov 2007 02:57:34 +0000 (02:57 +0000)] 
Custom HTTP headers patch from Dave Engberg

Reviewed By: mcslee

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

17 years agoThrift compiler now enforces uniqueness of field identifiers
Mark Slee [Wed, 28 Nov 2007 22:28:13 +0000 (22:28 +0000)] 
Thrift compiler now enforces uniqueness of field identifiers

Summary: The code would either not generate, or generate code with errors, if you did this beforehand. Now it's a die-fast stop hard error since this is absolultely always a wrong thing to do.

Reviewed By: dreiss

Test Plan: Test compiling a .thrift file with a repeated field identifier in a struct or arglist.

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

17 years agoThrift: Fix a backwards change.
David Reiss [Wed, 28 Nov 2007 20:15:11 +0000 (20:15 +0000)] 
Thrift: Fix a backwards change.

Summary:
Got it right in trunk, but wrong in thrift.

Blame Rev: 69504

Reviewed By: mcslee

Test Plan:
Tested in trunk AND did a diff with trunk.

Revert Plan: ok

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

17 years agoAdd pkgconfig to Thrift C++ libraries
Mark Slee [Wed, 28 Nov 2007 05:54:33 +0000 (05:54 +0000)] 
Add pkgconfig to Thrift C++ libraries

Reviewed By: mcslee

Other Notes: Submitted by Ben Maurer

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

17 years agoFix typo in Thrift trunk
Mark Slee [Wed, 28 Nov 2007 04:29:25 +0000 (04:29 +0000)] 
Fix typo in Thrift trunk

Summary: $classl => $class

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

17 years agoLowercase autoload strings
Mark Slee [Wed, 28 Nov 2007 04:17:49 +0000 (04:17 +0000)] 
Lowercase autoload strings

Summary: PHP is undebatably the worst programming language in the world. Class names are case insensitive, so new $tHiNg = new $THing. Garbase. Now autoload has to deal with the fallout.

Reviewed By: dreiss

Test Plan: autoload enabled falcon code

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

17 years agoKill fast binary compliance in TBase, it doesn't work
Mark Slee [Wed, 28 Nov 2007 02:46:24 +0000 (02:46 +0000)] 
Kill fast binary compliance in TBase, it doesn't work

Reviewed By: akhil

Test Plan: Regenerate code

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

17 years agoComplete the proper handling of all special characters in JSON strings for TJSONProtocol
Mark Slee [Wed, 28 Nov 2007 02:45:13 +0000 (02:45 +0000)] 
Complete the proper handling of all special characters in JSON strings for TJSONProtocol

Reviewed By: dreiss

Test Plan: test/java/TestClient

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

17 years agoMake inheriting from TBase and using inherited read method optional in generated...
Mark Slee [Wed, 28 Nov 2007 02:39:59 +0000 (02:39 +0000)] 
Make inheriting from TBase and using inherited read method optional in generated Thrift PHP code

Reviewed By: dreiss, akhil

Test Plan: Generate falcon etc. without -phpo and check it out

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

17 years agoCreate a TServerEventHandler interface in TServer
Mark Slee [Wed, 28 Nov 2007 01:51:43 +0000 (01:51 +0000)] 
Create a TServerEventHandler interface in TServer

Summary: Such that users can supply an event handler to a server that will be used to signal various events that take place inside the server core.

Reviewed By: dreiss

Test Plan: Rebuilt all servers, work by default

Other Notes: Partially submitted and also reviewed by Dave Simpson at Powerset

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