common/thrift.git
17 years ago[thrift] Erlang Thrift changes, take 3
Christopher Piro [Tue, 2 Oct 2007 01:33:37 +0000 (01:33 +0000)] 
[thrift] Erlang Thrift changes, take 3

Summary: svn ci missed a bunch of paths ... blew away the whole thing and copied from the git repo.  this is getting ridiculous.

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

17 years ago[thrift] otpification and sane configuration for Erlang Thrift
Christopher Piro [Tue, 2 Oct 2007 00:35:12 +0000 (00:35 +0000)] 
[thrift] otpification and sane configuration for Erlang Thrift

Summary: a small victory in the neverending quest of OTPifying this binding -- search for config files in ./conf/ (relative to the cwd of the emulator).  for example, when you start the channel server, ./conf/{channel,thrift}.conf should exist.  better than having to recompile to change a configuration ... reconfig should take care of that in running code.

Test Plan: works with channel server

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

17 years ago[thrift] revert 61883
Christopher Piro [Tue, 2 Oct 2007 00:24:07 +0000 (00:24 +0000)] 
[thrift] revert 61883

Summary: i suck at git/svn ... commited not enough and with no commitlog

Notes: YOU'RE DOING IT WRONG

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

17 years agoMerge branch 'otp'
Christopher Piro [Tue, 2 Oct 2007 00:05:04 +0000 (00:05 +0000)] 
Merge branch 'otp'

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

17 years agoMerging more server support and exception fixes for Cocoa
Mark Slee [Mon, 24 Sep 2007 19:24:53 +0000 (19:24 +0000)] 
Merging more server support and exception fixes for Cocoa

Summary: Submitted by Andrew McGeachie.

Reviewed By: mcslee

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

17 years agoTHRIFT: Make the mutex assignable
boz [Sat, 22 Sep 2007 23:08:11 +0000 (23:08 +0000)] 
THRIFT: Make the mutex assignable

Summary: we need to use a shared_ptr instead of an old fashioned one if we're
going to stick with this PIMPL model

Reviewed By: dreiss, marc

Test Plan: test program didn't fail or leak memory, foreman (fb303 client)
worked without problem

Revert Plan: just make sure you find some other solution to this problem

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

17 years agoTHRIFT: Mutex and ReadWriteMutex leaked memory, now they don't
boz [Thu, 20 Sep 2007 23:24:16 +0000 (23:24 +0000)] 
THRIFT: Mutex and ReadWriteMutex leaked memory, now they don't

Summary: also added myself to CONTRIBUTORS.

Reviewed By: marc

Test Plan: the following program no longer leaks memory (valgrind):

int main(int argc, char **argv){
  Mutex mu;
  mu.lock();
  mu.unlock();
}

Revert Plan: ok

Notes: this is kind of important

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

17 years agoMerging latest minor Cocoa changes
Mark Slee [Wed, 19 Sep 2007 21:12:52 +0000 (21:12 +0000)] 
Merging latest minor Cocoa changes

Summary: BinaryProtocol handling of null strings, destructor, and contributors email fix. Submitted by Andrew McGeachie

Reviewed By: mcslee

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

17 years agoWhoops forgot to actually svn add Andrew's files
Mark Slee [Wed, 19 Sep 2007 21:10:18 +0000 (21:10 +0000)] 
Whoops forgot to actually svn add Andrew's files

Summary: Tricky svn add command will get you every time

Reviewed By: dreiss

Test Plan: test/ tutorial/ Cocoa code

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

17 years agoOO perl accessors for Thrift objects
Mark Slee [Wed, 19 Sep 2007 06:49:30 +0000 (06:49 +0000)] 
OO perl accessors for Thrift objects

Summary: Submitted by Jake Luciani

Reviewed By: cpiro

Test Plan: Supplied in test/tutorial code

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

17 years ago[thrift] checking in generated reflection code into java library
eletuchy [Wed, 19 Sep 2007 01:23:19 +0000 (01:23 +0000)] 
[thrift] checking in generated reflection code into java library

Summary: Generated this code using:
          /usr/local/share/thrift/if/reflection_limited.thrift

Reviewed By: dreiss

Test Plan: compiled chat_importer (a java FacebookService) against this.

Revert Plan: sure

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

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

17 years agoThrift: Prep for release.
David Reiss [Tue, 18 Sep 2007 19:46:00 +0000 (19:46 +0000)] 
Thrift: Prep for release.

Summary:
- make dist is no fun.  Had to add a lot of stuff to Makefile.am to
  make sure stuff got included in the tarball.
- Added a permanent NEWS file with the release notes for this release.
- clean.sh removes ylwrap also.
- Gave it a real version for make dist.
- Added ACLOCAL_AMFLAGS to lib/cpp/Makefile.am to make it easier to
  work on configure.ac.
- Made concurrency_test a non-installed binary because
  no one wants to install it.
- Dropped some symlinks that were annoying make dist.
- Updated README.

Test Plan:
./bootstrap.sh && ./configure && make dist
Compared contents of tarball to source tree.
Did this from a fresh git tree so no gross untracked files would be around.
On devrs: ./bootstrap.sh && ./configure && make install DESTDIR=/tmp/relinst1
Made sure concurrency_test was built but not installed.
Checked zlib URL with firefox.

Reviewed By: mcslee

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

17 years ago[thrift] spruce up Erlang binding for tonight's release
Christopher Piro [Tue, 18 Sep 2007 06:23:33 +0000 (06:23 +0000)] 
[thrift] spruce up Erlang binding for tonight's release

Summary:
 * got rid of most of the otp_base jonx ... save that for a future release unfortunately
 * cleaned up the tutorial server, added -erl to tutorial.thrift's shebang
 * made better README and TODO

Test Plan: checked out a copy, read my directions, built and ran the tutorial, and pretended that it didn't blow

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

17 years ago[thrift] fix _thrift for inheriting services
Christopher Piro [Tue, 18 Sep 2007 02:14:31 +0000 (02:14 +0000)] 
[thrift] fix _thrift for inheriting services

Summary: obviously Iain's fault

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

17 years ago[thrift] give the generated Erlang service file a _thrift
Christopher Piro [Tue, 18 Sep 2007 00:07:42 +0000 (00:07 +0000)] 
[thrift] give the generated Erlang service file a _thrift

Summary: Before they were names Service.erl, but the Service module name should be reserved for more important things.  Namespaces what?

Test Plan: with channel server

Riders: also fixes whitespace, puts -erl in its right place

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

17 years agoThrift: Put today's date as the next Thrift release.
David Reiss [Mon, 17 Sep 2007 23:53:58 +0000 (23:53 +0000)] 
Thrift: Put today's date as the next Thrift release.

Reviewed By: root

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

17 years agoThrift: Re-committing zlib.
David Reiss [Mon, 17 Sep 2007 23:20:38 +0000 (23:20 +0000)] 
Thrift: Re-committing zlib.

Summary:
Same as the last (reverted) zlib patch,
but this time with way more awesome support for building
with no zlib headers installed.

Reviewed By: mcslee

Test Plan:
- Did lots of really pathological stuff in my VMware.
- On devrs004:
  ./bootstrap.sh && ./configure && make && make install DESTDIR=/tmp/tzinst && echo "Yay"

Revert Plan: ok

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

17 years agoThrift: Fix fingerprinting bug.
David Reiss [Mon, 17 Sep 2007 21:16:32 +0000 (21:16 +0000)] 
Thrift: Fix fingerprinting bug.

Summary:
Fingerprints were'nt being initialized properly because I forgot to move
the initialization from t_struct to t_type.  Fixed that.
Also, typedefs weren't generating fingerprints for their true types.

Reviewed By: mcslee

Test Plan:
This didn't work before with -cpp -dense.  Now it does.
typedef list<i32> ilist
struct foo { 1: ilist l }

Revert Plan: ok

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

17 years agoThrift: Compile without libevent.
David Reiss [Mon, 17 Sep 2007 21:15:47 +0000 (21:15 +0000)] 
Thrift: Compile without libevent.

Summary:
- Totally re-did the libevent check.
- Thrift now compiles and instals cleanly without libevent.
- (libevent is still needed to build libthriftnb.)

Reviewed By: mcslee

Test Plan:
- Ran configure and make in various configurations in my VMware.
- Clean build and install of Thrift on devrs004 (into /tmp).

Revert Plan: ok

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

17 years agoUpdating TSCons.py to provide capability of passing additional flags to thrift beside...
mvaradachari [Mon, 17 Sep 2007 20:40:16 +0000 (20:40 +0000)] 
Updating TSCons.py to provide capability of passing additional flags to thrift besides the default flag --cpp. EX: scons_env(env,'--py --php')

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

17 years agoThrift - typo in comment
Martin Kraemer [Mon, 17 Sep 2007 06:58:47 +0000 (06:58 +0000)] 
Thrift - typo in comment

Summary:
Not really worth notice.  Just fixing some stray uppercase chars in a comment block.

Trac Bug: #

Blame Rev:

Reviewed By:

Test Plan:

Revert Plan:

Database Impact:

Memcache Impact:

Other Notes:

EImportant:

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

17 years ago[thrift] C++: Pass std::exception from server to client
dweatherford [Sat, 15 Sep 2007 08:49:48 +0000 (08:49 +0000)] 
[thrift] C++: Pass std::exception from server to client

Summary: Rather than an uncaught exception dropping the connection, catching std::exception (and anything derived from it) and passing its message payload back in the form of a T_EXCEPTION message is a much cleaner response.
Reviewed By: mcslee
Test Plan: compile generated code for Synapse's tablet interface, throw a generic exception at the server, observe the message for the exception arising from the client in the form of a TApplicationException (instead of the previous 'no more data to read' exception)
Revert: ok

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

17 years agoThrift: Reverting TZlibTransport
David Reiss [Sat, 15 Sep 2007 01:54:56 +0000 (01:54 +0000)] 
Thrift: Reverting TZlibTransport

Summary:
Stupid Red Hat.
The dev boxes don't have the development packages for zlib.

Blame Rev: 59856

Reviewed By: mcslee

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

17 years agoThrift: Zlib transport.
David Reiss [Sat, 15 Sep 2007 01:44:47 +0000 (01:44 +0000)] 
Thrift: Zlib transport.

Summary:
Add a new transport to the C++ library: TZLibTransport.
This wraps another transport (just like TBufferedTransport),
compresses the data written to it, and uncompresses the data it reads.

Reviewed By: mcslee

Test Plan:
For ax_lib_zlib.m4
 - Ran ./bootstrap.sh.
 - Looked at configure.
 - Ran ./configure.
 - Looked at config.status
 - Ran ./configure --with-zlib=/usr.
 - Looked at config.status
 - Changed configure.ac to AC_LIB_ZLIB(1.2.4)
 - Ran ./configure.
 - Watched it fail.

For TZlibTransport
 - test/ZlibTest.cpp
 - Code coverage (hotness) report sent with review.
 - 100% line coverage for all the good stuff.

Revert Plan: ok

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

17 years agoAdd missing writeEnd calls
Mark Slee [Fri, 14 Sep 2007 22:18:09 +0000 (22:18 +0000)] 
Add missing writeEnd calls

Summary: When flush is called this also should be

Reviewed By: aditya

Test Plan: Use w/ PipedTransport. Should writeEnd() when an exception is thrown

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

17 years agoUpdate the Thrift CONTRIBUTORS file
Mark Slee [Fri, 14 Sep 2007 19:45:12 +0000 (19:45 +0000)] 
Update the Thrift CONTRIBUTORS file

Summary: A bunch of people belong on this list. So we added them.

Reviewed By: root

Test Plan: This is a text file

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

17 years agoMerge more cocoa changes from Andrew McGeachie
Mark Slee [Fri, 14 Sep 2007 19:44:30 +0000 (19:44 +0000)] 
Merge more cocoa changes from Andrew McGeachie

Reviewed By: dreiss

Test Plan: To be provided later by McGeachie. Compiler builds fine. Does not affect other libraries.

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

17 years agoThrift: Update syntax files for Vim and Emacs.
David Reiss [Wed, 12 Sep 2007 01:45:12 +0000 (01:45 +0000)] 
Thrift: Update syntax files for Vim and Emacs.

Summary:
Add recognition of the new Thrift keyword cocoa_prefix to
thrift.vim and thrift.el.

Reviewed By: mcslee

Test Plan: We don't need no stinkin' test plans!

Revert Plan: ok

Other Notes:
AWESOMESAUCE!  Thrift now supports namespaces, packages, prefixes, and modules.

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

17 years agoThrift: Clean up and test TDenseProtocol
David Reiss [Tue, 11 Sep 2007 22:09:42 +0000 (22:09 +0000)] 
Thrift: Clean up and test TDenseProtocol

Summary:
- TDenseProtocol now includes a part of the struct fingerprint in
  the serialized message, to protect from unserialzing trash.
- A lot of cleanups and commenting for TDenseProtocol.
- A lot of test cases for same.

Reviewed By: mcslee

Test Plan: test/DenseProtoTest.cpp

Revert Plan: ok

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

17 years agoAdd JavaDoc comments to generated Thrift Java code
Mark Slee [Mon, 10 Sep 2007 22:33:05 +0000 (22:33 +0000)] 
Add JavaDoc comments to generated Thrift Java code
         Reviewed By: dreiss
           Test Plan: Generate Java code from .thrift file w/ javadoc comments
              Revert: OK
               Notes: My first backend diffcamp review

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

17 years agoModify Thrift parser to disallow optional/required keywords in argument lists
Mark Slee [Mon, 10 Sep 2007 22:08:49 +0000 (22:08 +0000)] 
Modify Thrift parser to disallow optional/required keywords in argument lists

Reviewed By: dreiss

Test Plan: Toss an optional/required in an arg list, check that it's ignored and compiler spits a warning

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

17 years agoAdding Cocoa generator to Thrift
Mark Slee [Mon, 10 Sep 2007 21:00:23 +0000 (21:00 +0000)] 
Adding Cocoa generator to Thrift

Summary: Thanks to Andrew McGeachie for doing this

Reviewed By: dreiss

Test Plan: No merge/build issues. Will solicit McGeachie for additions to test/cocoa in the future

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

17 years agoMerge Java get/set Size and Iterator changes from Dave Engberg
Mark Slee [Mon, 10 Sep 2007 20:53:23 +0000 (20:53 +0000)] 
Merge Java get/set Size and Iterator changes from Dave Engberg

Reviewed By: dreiss

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

17 years agoThrift: TDenseProtocol using variable-length integers.
David Reiss [Fri, 7 Sep 2007 01:34:12 +0000 (01:34 +0000)] 
Thrift: TDenseProtocol using variable-length integers.

Reviewed By: mcslee

Test Plan:
test/DenseProtoTest.cpp

Still have to test:
- Bounds checking.
- borrow/consume on TBuffered and TFramed.

Revert Plan: ok

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

17 years agoThrift: New methods for C++ transports.
David Reiss [Fri, 7 Sep 2007 01:26:30 +0000 (01:26 +0000)] 
Thrift: New methods for C++ transports.

Summary:
To support the upcoming variable-length encoding of integers in
TDenseProtocol, augment Thrift transports with two new methods:
borrow and consume.  Borrow copies some data out of the transport
without consuming it, and consume... consumes it.

Reviewed By: mcslee

Test Plan:
Thrift compiles.
Should check in variable-length integer code for TDenseProtocol
right after this (git ruulz).

Revert Plan: revert stuff that uses these methods also.

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

17 years agoThrift: Python TBufferedTransport improvements.
David Reiss [Wed, 5 Sep 2007 01:14:09 +0000 (01:14 +0000)] 
Thrift: Python TBufferedTransport improvements.

Summary:
The Python version of TBufferedTransport now uses input buffering.
It is also compatible with the fasbinary module.

Reviewed By: mcslee

Test Plan:
test/FastbinaryTest.py

dreiss@dreiss-vmware:~/gp/thrift/test/py$ strace -f ./TestClient.py 2>&1 | grep recv | wc -l
99
# Install new version in other terminal
dreiss@dreiss-vmware:~/gp/thrift/test/py$ strace -f ./TestClient.py 2>&1 | grep recv | wc -l
14

Revert Plan: ok

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

17 years ago-- adding hostinfo and time to GlobalOutput
Aditya Agarwal [Wed, 5 Sep 2007 01:01:15 +0000 (01:01 +0000)] 
-- adding hostinfo and time to GlobalOutput

Summary:
- makes thrift errors a lot more useful

Reviewed By: jwang, mcslee

Test Plan: tested with search

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

17 years agoThrift: Python installation.
David Reiss [Wed, 5 Sep 2007 00:47:32 +0000 (00:47 +0000)] 
Thrift: Python installation.

Summary:
Added the configure script variable PY_PREFIX which serves the same purpose
for Python as --prefix does for C/C++.  We chose to do this because Python
has different conventions for where to install libraries.

Reviewed By: mcslee

Test Plan:
Full clean builds and installs of Thrift from the Thrift root,
with and without PY_PREFIX.  Watched output of make install.

Ran configure from lib/py without PY_PREFIX, with PY_PREFIX and with
PY_PREFIX in the environment.  Checked config.status for each.

Revert Plan: okay

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

17 years agoThrift: TDenseProtocol.
David Reiss [Tue, 4 Sep 2007 21:49:53 +0000 (21:49 +0000)] 
Thrift: TDenseProtocol.

Summary:
- Made some stuff in TBinaryProtocol protected instead of private.
- Added a preliminary version of TDenseProtocol.  This is still
  super highly experimental and gross, and I wrote a super scary
  comment to explain that to anyone foolish enough to try to use
  this in its current state.

Reviewed By: mcslee

Test Plan: test/DenseProtoTest.cpp

Revert Plan: ok

Memcache Impact:
Save memory if/when people use it.

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

17 years agoThrift: Slight tweaks to local reflection.
David Reiss [Tue, 4 Sep 2007 21:31:04 +0000 (21:31 +0000)] 
Thrift: Slight tweaks to local reflection.

Summary:
Local reflection typespecs for structs now have a dummy T_STOP field at the end
so we don't have to check the size on every iteration.
They also contain information about which fields are optional.
Also put a static pointer to the reflection in each structure.

Reviewed By: mcslee

Test Plan: test/DenseLinkingTest.thrift

Revert Plan: ok

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

17 years agoSummary: Checking in fix to TFileTransport to remove redundant behavior of readEvent...
James Wang [Fri, 31 Aug 2007 23:45:53 +0000 (23:45 +0000)] 
Summary: Checking in fix to TFileTransport to remove redundant behavior of readEvent -- just return NULL or the next event
Also, checking in changes to the php generation code I made awhile ago, but forgot to check in

Reviewed By: aditya, mcslee

Test Plan: Compiled thrift and falcon, and confirmed that falcon's print binary still worked

Revert Plan: revertible

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

17 years agoMerge some java gen fixes from Johan Oskarsson
Mark Slee [Fri, 31 Aug 2007 20:06:36 +0000 (20:06 +0000)] 
Merge some java gen fixes from Johan Oskarsson

Summary: Making Isset inner classes static because they don't need to reference their owner, and killing some unused variables.

Reviewed By: dreiss

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

17 years ago-- cleaning up some Makefile issues
Aditya Agarwal [Fri, 31 Aug 2007 08:03:05 +0000 (08:03 +0000)] 
-- cleaning up some Makefile issues

Reviewed By: jwang

Test Plan: compiled

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

17 years ago-- reset all state when seeking to a chunk
Aditya Agarwal [Fri, 31 Aug 2007 07:54:40 +0000 (07:54 +0000)] 
-- reset all state when seeking to a chunk

Summary:
- this was causing some bizarre issues with seeking to a particular point in the log
- I can't believe we haven't run into this before

Reviewed By: jwang

Test Plan: replayed log file from a partiicular point

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

17 years agoAdd get_true_type call to RB generator
Mark Slee [Fri, 31 Aug 2007 04:30:52 +0000 (04:30 +0000)] 
Add get_true_type call to RB generator

Summary: Issue with typedefs failing, submitted by kevin clark @ powerset

Reviewed By: mcslee

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

17 years agoThrift: Local Reflection for C++.
David Reiss [Fri, 31 Aug 2007 01:42:55 +0000 (01:42 +0000)] 
Thrift: Local Reflection for C++.

Summary:
The compiler now takes a "-dense" flag that will cause it to
generate some extra metadata for C++.  This metadata will be used by
TDenseProtocol.  This should be the last compiler change necessary
to enable that feature.

Reviewed By: mcslee

Test Plan: test/DenseLinkingTest.thrift

Revert Plan: ok

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

17 years agoAdd -javabean option to Thrift
Mark Slee [Fri, 31 Aug 2007 00:55:28 +0000 (00:55 +0000)] 
Add -javabean option to Thrift

Summary: In case you want getters and setters and iterators and magic. Submitted by Dave Engberg

Reviewed By: dreiss

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

17 years agoThrift: Forgot to commit these fixes.
David Reiss [Thu, 30 Aug 2007 23:18:31 +0000 (23:18 +0000)] 
Thrift: Forgot to commit these fixes.

Summary:
Small git error.  These changes should have gone in my last commit.

Reviewed By: mcslee

Test Plan: Same as the last one.

Revert Plan: ok

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

17 years agoThrift: Generate fingerprints for non-structs.
David Reiss [Thu, 30 Aug 2007 23:12:37 +0000 (23:12 +0000)] 
Thrift: Generate fingerprints for non-structs.

Summary:
This is going to be needed to support TDenseProtocol.

Reviewed By: mcslee

Test Plan:
Clean build of Thrift.
Ran if/regen.sh.  No change to generated C++ or Python.
gdb thrift -cpp ThriftTest.thrift.  Made sure they were being generated.

Revert Plan: ok

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

17 years agoThrift: Handle absence of fastbinary.so
David Reiss [Thu, 30 Aug 2007 23:07:45 +0000 (23:07 +0000)] 
Thrift: Handle absence of fastbinary.so

Summary:
- Wrap import of fastbinary in a try/catch, setting it to None if it fails.
- Don't try to fastbinary.encode/decode if fastbinary is None.
- Always generate thrift_spec, even if it is None.
- Don't try to fastbinary.encode/decode if thrift_spec is None.

Reviewed By: mcslee

Test Plan:
test/py/Test{Client,Server}.py
Manually delete my fastbinary.so, they worked fine.
Changed them to use Accelerated protocol.  They still worked fine because
the test falls through to the normal generated code.
Installed fastbinary.so, everything worked fine (eventually).

Revert Plan: ok

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

17 years agoThrift: Pre-generate reflection_limited for Python.
David Reiss [Thu, 30 Aug 2007 03:30:22 +0000 (03:30 +0000)] 
Thrift: Pre-generate reflection_limited for Python.

Summary:
- Give reflection_limited a nice clean Python module.
- if/regen.sh now generates reflection_limited for Python and copies it to src.
- Added the generated Python for reflection_limited to version control.
- lib/py/setup.py installs reflection_limited.
- lib/py/cleanup.sh now removes build (make sure to run as root).
- The C++ version of reflection_limited was also updated by regen.sh.

Reviewed By: mcslee

Test Plan:
- Clean build and install.
- Look at the installed Python files.
- python -c 'from thrift.reflection.limited.ttypes import *'

Revert Plan: ok

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

17 years agoThrift: Support for explicit Python module declaration.
David Reiss [Thu, 30 Aug 2007 00:58:43 +0000 (00:58 +0000)] 
Thrift: Support for explicit Python module declaration.

Summary:
Previously, Thrift used the name of the .thrift file as the python module name.
This wasn't very flexible.  Now the python module can be explicitly declared.
Also, there was no need for t_py_generator to inherit from t_oop_generator.

Reviewed By: mcslee

Test Plan:
cd test/py/explicit_module
./runtest.sh

Revert Plan: ok

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

17 years agoThrift: Python libraries install into /usr, not /usr/local
David Reiss [Wed, 29 Aug 2007 23:17:32 +0000 (23:17 +0000)] 
Thrift: Python libraries install into /usr, not /usr/local

Summary:
It seems like the Python convention is that random janky libraries
are installed in /usr/lib/pythonX.Y/site-packages.  This patch follows
that convention, even though it is pretty gross to ignore --prefix.

Reviewed By: mcslee

Test Plan: make install thrift python libs on my box.

Revert Plan: ok

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

17 years agoAutoconf fixes
Mark Slee [Wed, 29 Aug 2007 04:36:53 +0000 (04:36 +0000)] 
Autoconf fixes

Summary: Need these after some recent changes to rebuild with Engeleman's fix

Reviewed By: aditya

Test Plan: Build compiler

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

17 years agoMerge patch from Dan Engeleman for Java utility constructors
Mark Slee [Wed, 29 Aug 2007 04:36:28 +0000 (04:36 +0000)] 
Merge patch from Dan Engeleman for Java utility constructors

Summary: As well as a packaging fix

Reviewed By: aditya

Test Plan: Generate test files, look at Java obj constructors

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

17 years agoThrift: Install reflection_limited.thrift
David Reiss [Wed, 29 Aug 2007 00:58:14 +0000 (00:58 +0000)] 
Thrift: Install reflection_limited.thrift

Summary:
Building fb303 is hard enough without including limited reflection.
This change will install reflection_limited.thrift into /usr/share/thrift/if
so it will be easier for fb303 to find (we won't have to dig it out of the
thrift source directory).

Reviewed By: mcslee, marc

Test Plan:
./bootstrap.sh && ./configure && make && sudo make install
(on my vmware box).

Revert Plan: ok

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

17 years agoThrift: Fix a compile error.
David Reiss [Tue, 28 Aug 2007 22:18:22 +0000 (22:18 +0000)] 
Thrift: Fix a compile error.

Summary:
The fingerprint code was generating invalid C++ code.

Blame Rev: 57192

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
Thrifted DebugProtoTest with new compiler.
Compiled and rand DebugProtoTest.

Revert Plan: ok

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

17 years agoThrift: Fix untriggerable bug.
David Reiss [Tue, 28 Aug 2007 21:09:06 +0000 (21:09 +0000)] 
Thrift: Fix untriggerable bug.

Reviewed By: mcslee

Test Plan: Compiled the Thrift compiler.

Revert Plan: ok

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

17 years agoThrift: Generate structural fingerprints for thrift structs.
David Reiss [Tue, 28 Aug 2007 20:49:17 +0000 (20:49 +0000)] 
Thrift: Generate structural fingerprints for thrift structs.

Summary:
We are going to write a dense protocol soon that eliminates some metadata.
To prevent version conflicts, we want each structure to have a
structural fingerprint that will change whenever the struct changes
in a way that will affect the dense protocol.
This change computes those fingerprints and puts them in
the generated C++ code.

Reviewed By: aditya, mcslee

Test Plan:
Recompiled thrift.
Thrifted DebugProtoTest with old and new compilers.
Compared output.
Also ran thrift with those "cout"s uncommented,
examined the fingerprint material,
and verified the hashes.

Revert Plan: ok

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

17 years agoThrift: Limited Reflection for C++.
David Reiss [Mon, 27 Aug 2007 19:57:34 +0000 (19:57 +0000)] 
Thrift: Limited Reflection for C++.

Summary:
The Thrift compiler now generates static methods for every service to generate
a reflection of the methods provided by the service.  This reflection is fairly
limited, but should be enough for what we want to do with SMC.

Reviewed By: mcslee

Test Plan: test/ReflectionTest.cpp

Revert Plan: ok

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

17 years agoThrift: Fix fastbinary.c for Python 2.4.
David Reiss [Sun, 26 Aug 2007 02:21:24 +0000 (02:21 +0000)] 
Thrift: Fix fastbinary.c for Python 2.4.

Summary:
The recently committed fastbinary.c doesn't compile with Python 2.4.
This version does.

Blame Rev: 56816

Reviewed By: mcslee

Test Plan: make install on devrs004

Revert Plan: Do 56816 also.

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

17 years agoThrift: Native-code Binary Protocol encoder.
David Reiss [Sat, 25 Aug 2007 18:01:30 +0000 (18:01 +0000)] 
Thrift: Native-code Binary Protocol encoder.

Summary:
Merging a patch from Ben Maurer.
This adds a python extension (i.e., a C module) that
encodes Python thrift structs into the standard binary protocol
much faster than our generated Python code.

Also added by-value equality comparison to thrift structs
(to help with testing).

Cleaned up some trailing whitespace too.

Reviewed By: mcslee, dreiss

Test Plan:
Recompiled Thrift.
Thrifted a bunch of IDLs and compared the generated Python output.
Looked at the extension module a lot.
test/FastBinaryTest.py

Revert Plan: ok

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

17 years agoPossible Thrift memory leak
Mark Slee [Fri, 24 Aug 2007 19:24:10 +0000 (19:24 +0000)] 
Possible Thrift memory leak

Summary: Don't throw new Exception, just throw Exception

Reviewed By: mcslee

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

17 years agoThrift: TMemoryBuffer::getAppendBufferToString fix.
David Reiss [Fri, 24 Aug 2007 00:19:12 +0000 (00:19 +0000)] 
Thrift: TMemoryBuffer::getAppendBufferToString fix.

Summary:
Same fix as getBufferAsString

Blame Rev: 55988

Reviewed By: dreiss

Test Plan: Thrift compiles.

Revert Plan: ok

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

17 years agoTrivial automake fix
Mark Slee [Thu, 23 Aug 2007 23:19:56 +0000 (23:19 +0000)] 
Trivial automake fix

Summary: Apparently needed to fix some install stuff

Reviewed By: mcslee

Test Plan: Build thrift compiler

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

17 years agoThrift: Make use of get_true_type.
David Reiss [Thu, 23 Aug 2007 21:43:25 +0000 (21:43 +0000)] 
Thrift: Make use of get_true_type.

Summary:
We added a helper function for the generators: get_true_type,
which finds the actual type behind a series of typedefs
(though the compiler only supports one layer of typedefs now).
This change uses it everywhere we used to have that loop.
(It was a lot of places.)

Reviewed By: mcslee

Test Plan: test/ManyTypedefs.thrift

Revert Plan: ok

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

17 years agoThrift: TMemoryBuffer::getBufferAsString only returns written portion.
David Reiss [Thu, 23 Aug 2007 17:20:38 +0000 (17:20 +0000)] 
Thrift: TMemoryBuffer::getBufferAsString only returns written portion.
(This change was by Adam, diff sent by email, I'm just checking it in.)

Blame Rev: 55988

Reviewed By: adam

Test Plan: Thrift compiles.

Revert Plan: ok

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

17 years agoThrift: No using namespace.
David Reiss [Thu, 23 Aug 2007 02:37:19 +0000 (02:37 +0000)] 
Thrift: No using namespace.

Summary:
using namespace XXX; is tricky because it imports a lot of crap into your namespace.
Also, if we ever decide to remove boost as a dependency, "using namespace boost"
makes it harder.

This patch removes all using namesapce XXX; with one or more using XXX::YYY;
There are some exceptions, such as test, tutorial, namespace std, and
facebook namespaces.

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
grep --binary-files=without-match -r 'using namespace' . | \
  egrep -v '^[^:]*: *using namespace (std;$|facebook)' | \
  grep -v '<< endl' | \
  grep -v '[^:]*/tutorial/' | \
  grep -v '^./test/'

Revert Plan: ok

Notes: I wouldn't bother, but it is fixathon.

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

17 years agoFix TNonBlockingServer libevent issue in ThreadPool mode
Mark Slee [Thu, 23 Aug 2007 01:43:20 +0000 (01:43 +0000)] 
Fix TNonBlockingServer libevent issue in ThreadPool mode

Summary: If using TNonBlockingServer with a ThreadManager, when you send a task off to the threadmanager you need to cancel the event that you have set on that client socket. Otherwise, when you give control back to libevent, it might trigger more read events if there are more requests coming down the pipe. This is an issue, because the server will be in the wrong state at that point and will have no way of handling reading more data if it is still in the WAIT_TASK state trying to see if it should write something back to the client. So, when we hit that control flow, we must setIdle() on the TConnection so that libevent doesn't trigger it anymore. Later, after the result is written, we'll setRead() and go back to the init state.

Reviewed By: akhil

Test Plan: Akhil's async + TNonBlocking karma server

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

17 years agoThrift: TMemoryBuffer now handles NULLs again.
David Reiss [Thu, 23 Aug 2007 00:14:48 +0000 (00:14 +0000)] 
Thrift: TMemoryBuffer now handles NULLs again.

Summary:
Boz is using TMemoryBuffer by constructing it will a NULL buffer,
then doing a resetBuffer later.  This patch re-enables that.

Blame Rev: 55988

Reviewed By: aditya

Test Plan:
Thrift compiles.
Will test feed after this is comitted.

Revert Plan: ok

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

17 years agoThrift: Better handling of strerror_r.
David Reiss [Wed, 22 Aug 2007 23:20:24 +0000 (23:20 +0000)] 
Thrift: Better handling of strerror_r.

Summary:
Someone thought it would be a good idea to have two different signatures
for strerror_r, with subtly different semantics (strlcpy = smart).
We now work properly with either of them.

Also fixed a test to work on 32-bit, you sloppy <expletive>s.

Reviewed By: mcslee

Test Plan:
Rebuild thrift.
Force one of these errors to be thrown.

Revert Plan: ok

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

17 years agoThrift: Bugfix.
David Reiss [Wed, 22 Aug 2007 02:32:11 +0000 (02:32 +0000)] 
Thrift: Bugfix.

Summary: Missed one.

Blame Rev: 55988

Reviewed By: yunfang

Test Plan: make

Revert Plan: ok

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

17 years agoThrift: Move TStringBuffer functionality into TMemoryBuffer.
David Reiss [Tue, 21 Aug 2007 23:59:34 +0000 (23:59 +0000)] 
Thrift: Move TStringBuffer functionality into TMemoryBuffer.

Summary:
TMemoryBuffer already has the necessary plubming to work with C++ strings.
This revision implements that functionality with a few wrapper methods.
Removed TStringBuffer as it should no longer be required (and it is tricky
to safely inherit from a class that has a non-virtual destructor).
Also refactored the TMemoryBuffer constructors a bit.

Reviewed By: aditya, yunfang

Test Plan:
test/TMemoryBufferTest.cpp

Revert Plan: ok

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

17 years agoNeed sys/types.h includes for FreeBSD
Mark Slee [Tue, 21 Aug 2007 02:39:57 +0000 (02:39 +0000)] 
Need sys/types.h includes for FreeBSD

Reviewed By: dreiss

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

17 years agoFix thread_t cast again
Mark Slee [Tue, 21 Aug 2007 02:39:40 +0000 (02:39 +0000)] 
Fix thread_t cast again

Summary: reinterpret_cast actually breaks on linux, despite working on FreeBSD

Reviewed By: dreiss

Test Plan: Compile on Linux OR FreeBSD

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

17 years agoUse reinterpret_cast instead of static_cast for pthread_t => Thread::id_t
Mark Slee [Tue, 21 Aug 2007 01:54:36 +0000 (01:54 +0000)] 
Use reinterpret_cast instead of static_cast for pthread_t => Thread::id_t

Summary: On FreeBSD pthread_t is a pthread*, not uint64_t, so static_cast gest upset

Reviewed By: dreiss

Test Plan: Compile on FreeBSD

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

17 years ago[adding TStringBuffer for serialization/deserialization from a string]
yunfang [Sun, 19 Aug 2007 22:18:38 +0000 (22:18 +0000)] 
[adding TStringBuffer for serialization/deserialization from a string]
Summary:
/**
 * A string buffer is a tranpsort that simply reads from and writes to a
 * string. Anytime you call write on it, the data is serialized
 * into the underlying buffer, you can call getString() to get the serialized
 * string.  Before you call read, you should call resetString(data) to set the
 * underlying buffer, you can then call read to get the
 * de-serialized data structure.
 *
 * The string buffer is inherited from the memory buffer
 * Thus, buffers are allocated using C constructs malloc,realloc, and the size
 * doubles as necessary.
 */

Reviewed by: aditya

Test Plan:
int main(int argc, char** argv) {
  shared_ptr<TStringBuffer> strBuffer(new TStringBuffer());
  shared_ptr<TBinaryProtocol> binaryProtcol(new TBinaryProtocol(strBuffer));

  testStruct a;
  a.i1 = 10;
  a.i2 = 30;
  a.s1 = string("holla back a");

  a.write(binaryProtcol.get());
  string serialized = strBuffer->getString();

  shared_ptr<TStringBuffer> strBuffer2(new TStringBuffer());
  shared_ptr<TBinaryProtocol> binaryProtcol2(new TBinaryProtocol(strBuffer2));

  strBuffer2->resetString(serialized);
  testStruct a2;
  a2.read(binaryProtcol2.get());

  if (a == a2) {
    printf("serialization working\n");
  } else {
    printf("serialization not working\n");
  }
}

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

17 years agoThrift: OCaml TSocket more helpful exceptions
iproctor [Fri, 17 Aug 2007 21:34:15 +0000 (21:34 +0000)] 
Thrift: OCaml TSocket more helpful exceptions
Summary: On unix error it tells you the cause.
Reviewed by: mcslee
Test plan: Had some unix errors, read the messages.
Revert plan: yes

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

17 years agoPerl pass by reference versioning fix
Mark Slee [Fri, 17 Aug 2007 03:53:13 +0000 (03:53 +0000)] 
Perl pass by reference versioning fix

Summary: I hate Perl the most. Submitted by Jake Luciani.

Reviewed By: mcslee

Test Plan: We don't even use the Perl bindings for Thrift, but we could use Jake's test scripts on this.

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

17 years agoMerging Jake Luciani's latest perl code gen fixes
Mark Slee [Thu, 16 Aug 2007 01:26:31 +0000 (01:26 +0000)] 
Merging Jake Luciani's latest perl code gen fixes

Reviewed By: dreiss

Test Plan: Watch for any weirdness on Thrift code gen, perl specific

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

17 years agoGenerate a -u option for Python Service-remote CLI utility
Mark Slee [Thu, 16 Aug 2007 00:27:21 +0000 (00:27 +0000)] 
Generate a -u option for Python Service-remote CLI utility

Summary: In case you want to hit an HTTP Thrift service

Reviewed By: peter

Test Plan: ServiceClient-remote -u http://dope.vip.facebook.com/intern/smc/smcserver.php getTierByName test

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

17 years agoTHRIFT: mutex trylock support
boz [Wed, 15 Aug 2007 20:55:36 +0000 (20:55 +0000)] 
THRIFT: mutex trylock support

Summary: add trylock support to the Mutex class

Reviewed By: mcslee

Test Plan: added trylock mutexes to foreman, walked through them in gdb
(behaved correctly) and then ran an entire sweep (behaved correctly)

Notes: slee ftw

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

17 years agoThrift: Add a useful helper function (in compiler).
David Reiss [Wed, 15 Aug 2007 00:55:41 +0000 (00:55 +0000)] 
Thrift: Add a useful helper function (in compiler).

Summary:
Add a function to t_generator to traverse the typedef chain.

Reviewed By: mcslee

Test Plan:
Rebuilt thrift.
Re-thrifted ThriftTest.thrift.
Saw that the output was unchanged.

Revert Plan: ok

Notes:
Converting all of the generators to use this will happen later.

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

17 years agoThrift: Merging external patch.
David Reiss [Tue, 14 Aug 2007 19:59:26 +0000 (19:59 +0000)] 
Thrift: Merging external patch.

Summary:
Merging a patch from Andy Lutomirsky.
- Allow fields to be marked "required" or "optional" (only affects C++).
- Thrift structs now have operator ==.

Reviewed By: mcslee

Test Plan: test/OptionalRequiredTest.cpp

Revert Plan: ok

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

17 years agoThrift: docstring revamp step 2.
David Reiss [Tue, 14 Aug 2007 17:12:33 +0000 (17:12 +0000)] 
Thrift: docstring revamp step 2.

Summary:
It was a bad idea to let doxygen comments become a part of the parse tree.
We now get them a totally different way.  The lexer stashes the docsting
contents in a global, and the parser actions (not the rules) pull it out.
This should prevent doxygen comments from ever causing parse errors.

Blame Rev: 52678, 52732

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
Thrifted a bunch of files and saw no parse errors (or C++ compile errors).
Thrifted DocTest.thrift with dump_docs on.

Revert Plan: ok

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

17 years agoThrift: docstring revamp step 1.
David Reiss [Tue, 14 Aug 2007 17:12:31 +0000 (17:12 +0000)] 
Thrift: docstring revamp step 1.

Summary:
Allow constants to be documented.
Now any "Definition" can be documented, so we can move the docstring stuff
up to a a higher node in the parse tree.

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
Checked out DocTest.thrift and a few other thrifts.

Revert Plan: ok

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

17 years ago[thrift] erlang: log more tTransportExceptions
Christopher Piro [Sat, 11 Aug 2007 01:15:57 +0000 (01:15 +0000)] 
[thrift] erlang: log more tTransportExceptions

Summary: all tTEs were being filtered from the logs; now just tTEs that come from connections closing are suppressed

Test Plan: logs my bug in channel server :)

Notes: adds logic to thrift_logger, not removes (bad news bears)

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

17 years agoThrift: OCaml TSocket fix
iproctor [Fri, 10 Aug 2007 20:48:12 +0000 (20:48 +0000)] 
Thrift: OCaml TSocket fix

Summary: Now closes input channel on close. Also, transport exceptions are cleaner.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes

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

17 years agoFix Java test cases
Mark Slee [Thu, 9 Aug 2007 03:40:15 +0000 (03:40 +0000)] 
Fix Java test cases

Summary: Use the default TBinaryProtocol constructors for better example.

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

17 years agoFix C++ enum deserialization
Mark Slee [Thu, 9 Aug 2007 03:39:18 +0000 (03:39 +0000)] 
Fix C++ enum deserialization

Summary: Because we're all about strict aliasing rules in the g++, m'holmbie.

Reviewed By: aditya

Test Plan: Should be NO compiler warnings about (enum&) -> (int32_t&) typecasting

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

17 years agoThrift: OCaml and HS servers more general
iproctor [Wed, 8 Aug 2007 01:43:39 +0000 (01:43 +0000)] 
Thrift: OCaml and HS servers more general

Summary: The library now provides servers that are general like the other languages.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes

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

17 years agoThrift: Fix thrift.vim.
David Reiss [Mon, 6 Aug 2007 20:56:30 +0000 (20:56 +0000)] 
Thrift: Fix thrift.vim.

Summary:
thrift.vim has not been deleting its HiLink command.
This causes you to get a (recoverable) error every time you
open a C++ or PHP file after opening a thrift file.
This change deletes the HiLink command, preventing this error.

Reviewed By: martin

Test Plan:
Opened a thrift file, then opened a C++ file in the same session.
Both were highlighted properly.

Revert Plan: ok

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

17 years agoThrift: More constant enums.
David Reiss [Mon, 6 Aug 2007 20:38:18 +0000 (20:38 +0000)] 
Thrift: More constant enums.

Summary:
Make enum constants as structure defaults work.
Make enum constants as constant map keys work.
Un-break the generated skeleton servers.

Reviewed By: mcslee

Test Plan:
cd test
../compiler/cpp/thrift -cpp ConstantsDemo.thrift
g++ -I../lib/cpp/src -c gen-cpp/*.cpp
Also compared the generated output to the old generated output.

Revert Plan: ok

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

17 years agoThrift: Fixed rookie mistake.
David Reiss [Mon, 6 Aug 2007 20:33:00 +0000 (20:33 +0000)] 
Thrift: Fixed rookie mistake.

Summary:
This test now works on 32-bit.

Reviewed By: mcslee

Test Plan: Ran the comment at the top of the file.

Revert Plan: ok

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

17 years agoThrift: Improved test case.
David Reiss [Mon, 6 Aug 2007 20:32:59 +0000 (20:32 +0000)] 
Thrift: Improved test case.

Summary:
By "improved", I mean that I added a totally awesome self-referential joke
to one of the test cases.  Seriously.  In a few years someone is going to
add UTF-8 support to the Debug Protocol and run this test case on a terminal
with really good fonts and they are going to die laughing.  Seriously, die.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Recompiled everything and ran the test.

Revert Plan:
Take a good, long look in the mirror, then svn revert.

Notes:
I am awesome.

EImportant:

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

17 years ago[thrift] handle timeouts and other errors gracefully (Erlang)
Christopher Piro [Fri, 3 Aug 2007 23:34:55 +0000 (23:34 +0000)] 
[thrift] handle timeouts and other errors gracefully (Erlang)

Reviewed By: iproctor

Test Plan: tutorial, channel

Revert Plan: ok

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

17 years agoTypo and comment fix
Mark Slee [Thu, 2 Aug 2007 06:37:40 +0000 (06:37 +0000)] 
Typo and comment fix

Reviewed By: marc

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

17 years ago-- fix memory leak in TThreadedServer
Aditya Agarwal [Thu, 2 Aug 2007 06:26:11 +0000 (06:26 +0000)] 
-- fix memory leak in TThreadedServer

Summary:
- need detached=true

Reviewed By: mcslee

Test Plan: replayable test case

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

17 years ago[thrift] make Erlang server noisy when handler has error
Christopher Piro [Wed, 1 Aug 2007 23:42:12 +0000 (23:42 +0000)] 
[thrift] make Erlang server noisy when handler has error

Summary: generate an error message at the server ... before only the client got the error

Reviewed By: iproctor

Test Plan: tutorial, channel server

Revert Plan: ok

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

17 years ago[thrift] improved error logging and handling for Erlang bindings
Christopher Piro [Wed, 1 Aug 2007 22:27:37 +0000 (22:27 +0000)] 
[thrift] improved error logging and handling for Erlang bindings

Summary:
 * custom, extensible error logger -- show only relevant stuff
 * clean up of errors in developer-supplied handler module
   now gives sane error messages and doesn't crash whole server
   (introduces tApplicationException_HANDLER_ERROR)
 * more precise catch in tErlProcessor (exits gracefully only if
   transport closes)

Reviewed By: iproctor

Test Plan: tutorial works

Revert Plan: ok

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