Commit Graph

401 Commits

Author SHA1 Message Date
David Reiss
ef22dc652f 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
2007-11-30 20:38:49 +00:00
Mark Slee
f60467efc9 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
2007-11-29 02:57:34 +00:00
David Reiss
bef54c0647 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
2007-11-28 20:15:11 +00:00
Mark Slee
b16074d53b 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
2007-11-28 05:54:33 +00:00
Mark Slee
d0f5b28835 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
2007-11-28 04:29:25 +00:00
Mark Slee
e02ab33cb8 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
2007-11-28 04:17:49 +00:00
Mark Slee
645ecea714 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
2007-11-28 02:46:24 +00:00
Mark Slee
d602f822d5 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
2007-11-28 02:45:13 +00:00
Mark Slee
b4d3e7b052 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
2007-11-28 01:51:43 +00:00
Mark Slee
b455292699 Add a few utility methods and helpers to Thrift C++ Sockets
Summary: Submitted by Dave Simpson @ Powerset.

Reviewed By: mcslee

Test Plan: test/cpp


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665370 13f79535-47bb-0310-9956-ffa450edef68
2007-11-28 00:12:11 +00:00
Mark Slee
fe6ed0dff4 Clean up the TSerializer
Summary: Nested Transport subclass wasn't necessary, add comments

Reviewed By: dreiss

Test Plan: Same as before, test/java/TestClient


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665369 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 21:54:38 +00:00
Mark Slee
256bdc4448 IPv6 tweaks for Thrift
Summary: Need to pass hints including AI_ADDRCONFIG to getaddrinfo to make sure no IPv6 addresses come back on non-IPv6 enabled systems

Reviewed By: mcslee

Other Notes: Submitted by Paul Saab


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665368 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 08:42:19 +00:00
Mark Slee
844ac12489 TJSONProtocol writing support in Java
Summary: TJSONProtocol for Java with write support and a TSerializer utility for easier conversion of Thrift objects into byte[] or strings.

Reviewed By: dreiss

Test Plan: Included a basic piece of this in test/ client for Java.

Revert: OK

DiffCamp Revision: 3890


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665367 13f79535-47bb-0310-9956-ffa450edef68
2007-11-27 08:38:52 +00:00
Mark Slee
53d9c0c20b Merging EOFException changes from Ben Maurer
Summary: Throw a proper EOFError in this case. Long term we want to change this to properly fit into the Thrift TException heirarchy with a good way to handle the original exception as well. For now, Ben is the primary user of this so we'll go ahead with his patch.

Reviewed By: mcslee

Test Plan: Included in test/py/TestEof.py


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665365 13f79535-47bb-0310-9956-ffa450edef68
2007-11-26 21:15:40 +00:00
Mark Slee
79b1694043 Refactor TNonblockingServer to use event_base construct
Summary: This allows the event loop to be shared across different components of a program of for a separate thread in a TNonblockingServer to safely use its own libevent code without conflicts.

Reviewed By: mcslee

Test Plan: Updated test/ committed here

Other Notes: submitted by Ben Maurer, patched in by mcslee with slight modifications


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665364 13f79535-47bb-0310-9956-ffa450edef68
2007-11-26 19:05:29 +00:00
Mark Slee
bd5882259d Merging in some Smalltalk changes from Patrick Collison
Reviewed By: mcslee

Test Plan: Rebuild Thrift compiler


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665361 13f79535-47bb-0310-9956-ffa450edef68
2007-11-21 08:43:35 +00:00
Mark Slee
efd37f14d2 Add Smalltalk support to Thrift
Summary: Submitted by Patrick Collison


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665358 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 05:13:09 +00:00
Mark Slee
a1d4cab45f Make Java TBinaryProtocol default to strictWrite
Summary: About time we did this. Breaks the test suite's defaults


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665357 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 04:58:16 +00:00
Mark Slee
276eea68b7 Add (int) case to Thrift version comparison
Summary: Deals with 32 bit machines doing a weird sign-bit thing here.

Reviewed By: dreiss

Test Plan: For 32 bit AmieStreet partners


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665356 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 02:06:47 +00:00
Mark Slee
8440605c27 Cocoa Thrift binding patches from Andrew McGeachie
Summary: Latest updates to the Cocoa bindings


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665354 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 01:39:25 +00:00
Mark Slee
fb4b514028 IPv6 support for the TNonBlockingServer
Summary: Need to use IPv6 compliant constructs here. Submitted by Paul Saab.

Reviewed By: dreiss

Test Plan: Rebuild Thrift TNonblockingServer with this patch and verify behaves just the same


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665353 13f79535-47bb-0310-9956-ffa450edef68
2007-11-20 01:27:08 +00:00
hzhao
b6014f494f added trunk
Reviewed By: shire
Test Plan: ape work


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665352 13f79535-47bb-0310-9956-ffa450edef68
2007-11-18 20:54:30 +00:00
hzhao
7fcc9e87ba tagging thrift-protocol-1.0.0
Reviewed By: shire
Test Plan: ape work


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665351 13f79535-47bb-0310-9956-ffa450edef68
2007-11-18 20:48:56 +00:00
Christopher Piro
de11d85211 [thrift] gut Erlang exception handling
Summary: * move type field to tException from subclasses
          * add backtrace to tException
          * add oop:is_a
          * on exit, wrap exceptions in {thrift_exception, E} ... otherwise can't distinguish e.g. exit:{{tBinProtException, {tException, ...}}, Stack} vs. exit:{tBinProtException, {tException, ...} -- I hate erlang
          * all throws/exits to tException:throw which does the wrapping described above

Reviewed By: eletuchy

Test Plan: been using this code on my live server ^_^

Revert: OK


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665350 13f79535-47bb-0310-9956-ffa450edef68
2007-11-18 02:10:20 +00:00
Mark Slee
09f69e0524 Add __autoload() support to Thrift-generated PHP code
Summary: Include thrift/autoload.php and use -phpa flag to generated code that works with autoload. Good for services with lots of methods that are typically not all invoked.

Reviewed By: dreiss

Test Plan: Falcon, baby, falcon.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665349 13f79535-47bb-0310-9956-ffa450edef68
2007-11-17 00:32:36 +00:00
Mark Slee
f5a6b0c109 Fix PHP TBufferedTransport readAll() to work with TSocket timeouts
Reviewed By: lucas

Test Plan: Invoke Buffered Transport wrapped around socket


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665348 13f79535-47bb-0310-9956-ffa450edef68
2007-11-17 00:27:17 +00:00
dweatherford
611434992a [thrift] Fix extension deserialization call with no classname
Summary: The extension expects a classname as a string and does not allow null;
  use the empty string instead of null in the absence of a classname to pass.

Reviewed By: mcslee
Test Plan: php -l
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665347 13f79535-47bb-0310-9956-ffa450edef68
2007-11-16 03:29:47 +00:00
Christopher Piro
10522a7f2b [thrift] fix-ups to Erlang thrift_logger
Summary:
 * no ?INFO for every oop:call ... way too expensive
 * unfactor symbol/1 ... it was that way for a reason apparently
 * upped crash report depth to 3

Reviewed By: eletuchy

Test Plan: /much/ less CPU eaten by logging

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665343 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:31 +00:00
Christopher Piro
c2e37c7a61 [thrift] change up Erlang crash reports, cleanups in t{,Binary}Protocol
Summary: crash reports aren't too important so don't be so verbose -- all the pertinent info shows up elsewhere anyway.  refactor while we're at it.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665342 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:30 +00:00
Christopher Piro
53b6ef670c [thrift] whole ball of whitespace normalizations in Erlang
Summary: ill-formatted comments, trailing whitespace, and (gasp) tabs: all pwned.  better now than later.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665339 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:28 +00:00
Christopher Piro
a1650fe55c [thrift] make open and close `effectful' in Erlang client
Summary: make uniform across all tTransports.  god i want `effectful' to go away dead.  soon.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665338 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:27 +00:00
Christopher Piro
3121c8271f [thrift] Erlang client receive socket options
Summary: we want {active, false}, etc. for client sockets.  make it so.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665337 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:26 +00:00
Christopher Piro
0d5cd8a6b9 [thrift] Erlang makefile includes to terse messages
Summary: filter out compiler path and flags and cruft

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665336 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 02:20:59 +00:00
Christopher Piro
6c74062262 [thrift] convert oop.erl errors and infos to macros
Summary: old-style error messages get switched over

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665335 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 02:20:58 +00:00
David Reiss
465ccc0924 Thrift: Fix new-style generated PHP code.
Summary:
Fix reading of lists/sets of lists/sets/maps.

Reviewed By: mcslee

Test Plan: Tested in trunk.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665333 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 21:41:29 +00:00
Mark Slee
0cdc6c8cd9 Merging PHP transport changes from www trunk to thrift trunk
Summary: Some empty() fixes, plus a few other socket helpers

Reviewed By: lucas

Test Plan: Use the transports to make IPC calls!


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665331 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 10:19:08 +00:00
Mark Slee
2b786221ed Fixing typo in Thrift trunk
Summary: xter => xfer

Reviewed By: sgrimm


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665329 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 05:35:34 +00:00
Mark Slee
5b743079da Thrift PHP generation Redux
Summary: Chopping the amount of code generated by Thrift for PHP services by two orders of magnitude (approx 25% of the previous size). This is done via putting more logic in a dynamic base class and taking it out of the generated code. Hopefully this wins back the CPU cycles paid just to load code from APC at the cost of a marginal increase in dynamic execution runtime.

Reviewed By: sgrimm, dreiss

Test Plan: Ran all the tests in trunk/test/php, also tested the API generate code and Falcon, etc. in my sandbox


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665328 13f79535-47bb-0310-9956-ffa450edef68
2007-11-13 04:00:29 +00:00
David Reiss
c0c88ee805 Thrift: Perl HttpClient and fixes.
Summary:
Also updated the CONTRIBUTORS file.  Sorry, Boz.

Reviewed By: mcslee

Revert Plan: ok

Other Notes:
Submitted by Igor Afanasyev.
Reviewed by Jake Luciani.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665327 13f79535-47bb-0310-9956-ffa450edef68
2007-11-08 01:05:46 +00:00
Mark Slee
6eb5892662 Deal with UnsupportedEncodingException in TBinaryProtocol
Summary: In case you are running on a horrendous JVM that doesn't have UTF-8 support

Reviewed By: dreiss

Test Plan: Compile.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665326 13f79535-47bb-0310-9956-ffa450edef68
2007-11-07 00:48:47 +00:00
Aditya Agarwal
3788038a35 -- ensure that flush is called in close() of any wrapper transport
Summary:
- unflushed data should be flushed when transport is closed
- this diff calls flush for TBufferedTransport and TFramedTransport

Reviewed By: dreiss


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665323 13f79535-47bb-0310-9956-ffa450edef68
2007-11-06 06:33:06 +00:00
Mark Slee
0502e61fb9 Add programatic shutdown option to Java Thrift servers
Summary: Same paradigm as in C++ model. Allow ServerTransport to be interrupted to block an accept loop and cleanly stop serving client requests.

Reviewed By: dreiss

Test Plan: Invoke shutdown() method on a TServer


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665322 13f79535-47bb-0310-9956-ffa450edef68
2007-11-03 05:30:32 +00:00
Mark Slee
52182d674e Make Java TbinaryProtocol enfore UTF-8
Summary: Java Strings have to have an encoding, they can't just be binary. The constructor and getBytes() method enforce this, so we are standardizing on UTF-8 to avoid string-mangling.

Reviewed By: dreiss

Test Plan: Code all works the exact same in the normal case, and doesn't mangle characters beyond ASCII or ISO-LATIN-1


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665321 13f79535-47bb-0310-9956-ffa450edef68
2007-11-03 04:48:43 +00:00
lklots
ffc21fb792 [TMemoryBuffer: an in-memory buffer acting like a transport]
Summary: This is the php equivalent of the cpp TMemoryBuffer.
         It is simply a transport that stores read and fetches write
         requests to and from a string.

Trac Bug: #

Blame Rev:

Reviewed By: dreiss

Test Plan: Tested using thrift de/serialization. Wrote thrift objeccts
           to the buffer and then read them later to resconstruct them.
           Tested exceptional cases.

Revert Plan: ok

Database Impact: none

Memcache Impact: none

Other Notes:

EImportant:

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665320 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 23:01:27 +00:00
hzhao
b000f7433d [thrift_protocol] need negative testing for default inclusion
Reviewed By: dweatherford
Test Plan: dev026 build


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665319 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 03:18:28 +00:00
dweatherford
f36e484cfb [thrift] return empty string instead of NULL
Summary: Turns out they're different, oops
Reviewed By: marcel
Test Plan: recompile, reinstall, synapse:tablet.get() on a nonexistent cell (which returns an empty string)
Revert: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665318 13f79535-47bb-0310-9956-ffa450edef68
2007-11-02 02:22:25 +00:00
boz
8ebe4a1757 THRIFT: update the thrift extension
Summary: more ZTS stuff

Reviewed By: hzhao

Test Plan: the same tests still pass


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665316 13f79535-47bb-0310-9956-ffa450edef68
2007-11-01 07:37:45 +00:00
dweatherford
80940b70e8 [thrift] Merge protocol/transport changes from tfb/www
Summary: Supporting the thrift_protocol extension.
  Relevant changesets are r66531, r66700, r66708
Reviewed By: mcslee
Test Plan: same code already runs in tfb trunk, php -l
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665315 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 23:30:56 +00:00
dweatherford
51c0393620 [thrift] PHP thrift_protocol extension
Summary: Implement a deserializer for thrift integral types and containers
  in C++ for extra performance. To be combined with compiler support to
  generate code that uses the extension + TBinaryProtocolAccelerated to
  enable it.

Reviewed By: mcslee
Test Plan: runs fine in my sandbox...
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665312 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 04:22:12 +00:00
dweatherford
65b7075b5a [thrift] Output dir selection + updated TSCons
Summary: Allows setting the output directory via the new '-o dir' cmdline option.

  TSCons is updated to use this to put the output in the right place no matter
  the cwd, so doing dependent builds from different directories won't break.

Reviewed By: martin
Test Plan: mkdir /tmp/honk; thrift -cpp -java -javabean -php -phpi -py -rb -xsd -perl -erl -ocaml -hs -cocoa -o /tmp/honk Tablet.thrift
Revert: svn


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665311 13f79535-47bb-0310-9956-ffa450edef68
2007-10-31 02:18:14 +00:00