Commit Graph

391 Commits

Author SHA1 Message Date
David Reiss
bc3dddb91c 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
2007-08-22 23:20:24 +00:00
David Reiss
95aaaf1852 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
2007-08-22 02:32:11 +00:00
David Reiss
2dc72c3864 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
2007-08-21 23:59:34 +00:00
Mark Slee
dd56497a7c 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
2007-08-21 02:39:57 +00:00
Mark Slee
98439158db 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
2007-08-21 02:39:40 +00:00
Mark Slee
04f0b7b21b 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
2007-08-21 01:54:36 +00:00
yunfang
1ec47d4395 [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
2007-08-19 22:18:38 +00:00
iproctor
94112d6994 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
2007-08-17 21:34:15 +00:00
Mark Slee
937fa6258b 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
2007-08-17 03:53:13 +00:00
boz
5362e70f8f 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
2007-08-15 20:55:36 +00:00
Christopher Piro
fa0c857370 [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
2007-08-11 01:15:57 +00:00
iproctor
e470aa38f5 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
2007-08-10 20:48:12 +00:00
iproctor
7897c927b2 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
2007-08-08 01:43:39 +00:00
Christopher Piro
ee5988444f [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
2007-08-03 23:34:55 +00:00
Mark Slee
17496a04d6 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
2007-08-02 06:37:40 +00:00
Aditya Agarwal
80cdca7344 -- 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
2007-08-02 06:26:11 +00:00
Christopher Piro
c3c6c0c9c4 [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
2007-08-01 23:42:12 +00:00
Christopher Piro
5b3a8f7a8b [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
2007-08-01 22:27:37 +00:00
Aditya Agarwal
99e2c07815 -- allow packaging of thrift as an rpm
Summary:
- also allows development as a non-root user
- contributed by Ben Maurer

Reviewed By: marc

Test Plan: "compile", install


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665185 13f79535-47bb-0310-9956-ffa450edef68
2007-07-31 01:36:08 +00:00
Aditya Agarwal
0dd0916f9a -- Adding TMemoryBuffer.py
Summary:
Submitted by Ben Maurer

Reviewed By: mcslee, aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665184 13f79535-47bb-0310-9956-ffa450edef68
2007-07-30 23:58:37 +00:00
pfung
a46438e11d [Thrift] fixing python server socket bind permissions
Fix made by Paul Saab from powerset (ps@powerset.com)

reviewed by mcslee
test plan: tested


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665180 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 20:43:49 +00:00
Mark Slee
26549566bc Fix for IPv6 Python sockets binding localhost problem
Reviewed By: mcslee

Test Plan: Python Thrift server

Notes: From ps@powerset.com


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665179 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 18:56:56 +00:00
Aditya Agarwal
5b4181919d -- remove default seekToEnd
fixed search so no need for this anymore

Reviewed By: jwang


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665178 13f79535-47bb-0310-9956-ffa450edef68
2007-07-27 07:04:49 +00:00
David Reiss
96d2388ade Thrift: Cleaned up whitespace.
Summary:
Replaced a lot of tabs with spaces in the thrift codebase.
Removed a lot of trailing whitespace from thrift-generated c++.
Added a few things to cleanup.sh.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Recompiled thrift.
Re-thrifted some test .thrifts.
Compiled the genrated c++.
Ran cleanup.sh.

Revert Plan: ok

Notes:

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665176 13f79535-47bb-0310-9956-ffa450edef68
2007-07-26 21:10:32 +00:00
Christopher Piro
5f5fdf3a20 [thrift] maps, lists, sets, and service inheritance for Erlang
Reviewed by: cpiro

Test Plan: tested wit tutorial/tutorial.thrift

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665175 13f79535-47bb-0310-9956-ffa450edef68
2007-07-25 22:41:00 +00:00
iproctor
ff8eb9288d Thrift: Haskell library and codegen
Summary: It's thrift for haskell. The codegen is complete. The library has binary protocol, io channel transport, and a threaded server.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665174 13f79535-47bb-0310-9956-ffa450edef68
2007-07-25 19:06:13 +00:00
James Wang
e168d5e127 Summary: TSocket shouldn't let you set the timeout before it's got a valid handle
Reviewed By: dcorson

Test Plan: tested in sandbox


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665172 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 23:59:51 +00:00
iproctor
d4de1e93c6 Thrift: OCaml library binary protocol fix
Summary: Binary protocol wasn't dealing with messages properly. Also
there was a math bug in readI32.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665171 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 19:47:55 +00:00
Christopher Piro
ae1f10f8f2 [thrift] misc. Erlang codegen improvements, cleanups
Summary:
 * const/enum namespacing
 * better formatting, less debugging comments in both source and gen-erl/

Notes:
 * in preparation for iproctor's whiz-bang map/list/set support


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665169 13f79535-47bb-0310-9956-ffa450edef68
2007-07-24 04:30:15 +00:00
James Wang
e9cd655579 Readding seekToEnd() call to openLogFile() temporarily so that search doesn't break
Reviewed By: aditya

Test Plan: Thrift compiles, falcon works

Revert Plan: revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665168 13f79535-47bb-0310-9956-ffa450edef68
2007-07-23 17:35:32 +00:00
James Wang
d51643cbf9 Summary: Changing TFileTransport to not go to end of file by default
Reviewed By: boz

Test Plan: compiled and tested falcon's print utility

Revert Plan: revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665167 13f79535-47bb-0310-9956-ffa450edef68
2007-07-22 05:48:12 +00:00
David Reiss
00dcccfef2 Thrift: Debug Protocol
Summary:
Added TDebugProtocol, a write-only Thrift protocol for C++
that produces human-readable representations of thrift structs.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Recompiled Thrift.
./test/TestDebugProto.* see compile instructions at the top.
Ran that, and it looked good.

Revert Plan:
grep TDebugProtocol <world>
grep ThriftDebugString <world>
Revert or comment out whatever you find so that they still compile.
Then svn revert.

Notes:

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665166 13f79535-47bb-0310-9956-ffa450edef68
2007-07-21 01:18:10 +00:00
Christopher Piro
094823a46c [thrift] highly concurrent Erlang goodness
Summary:
 * shim to use object-oriented code as gen_servers
 * high(er) performance Erlang-style server and transport
 * sane packaging based on otp-base, i.e. Makefiles and real structure

Test Plan: tutorial server offers the same (subset of) functionality as previous version

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665164 13f79535-47bb-0310-9956-ffa450edef68
2007-07-18 00:26:12 +00:00
iproctor
9a41a0c51e Thrift: OCaml library and generator
Summary: Added (minimal) library and code generator for OCaml.
Reviewed by: mcslee
Test plan: Test client and server (included).
Revert plan: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665163 13f79535-47bb-0310-9956-ffa450edef68
2007-07-16 21:59:24 +00:00
yunfang
a36f5db4b3 [scope lock wrapped for ReadWriteMutex]
Summary:
  scope lock wrapped around ReadWriteMutex. It's like Guard but you can specify to use it as a read or write lock.

Reviewed by: boz

Test Plan: used it in AdFinder

Revertible: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665162 13f79535-47bb-0310-9956-ffa450edef68
2007-07-14 01:23:05 +00:00
Mark Slee
8b82fb7a75 Fix SET serialization borked-ness in Thrift
Summary: Extra return floating in the code

Reviewed By: boz

Test Plan: Rebuild and deploy feed


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665160 13f79535-47bb-0310-9956-ffa450edef68
2007-07-10 00:49:04 +00:00
Mark Slee
85287d3989 Fix addrinfo structure memory leak in TSocket
Summary: Need to free the IPv6 memory structure

Reviewed By: mcslee

Notes: Submitted by paul@powerset.com


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665157 13f79535-47bb-0310-9956-ffa450edef68
2007-07-09 19:50:30 +00:00
Martin Kraemer
e6c4fa671e sys_errlist is deprecated.
Summary:
Avoiding usage of sys_errlist.  It is deprecated, prefer strerror or strerror_r instead.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee, karl

Test Plan:

Revert Plan: revertible

Notes:

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665156 13f79535-47bb-0310-9956-ffa450edef68
2007-07-09 19:08:25 +00:00
Mark Slee
6d56eb9d65 TSocket IPv6 support for C++
Summary: From Paul Saab at Powerset

Reviewed By: mcslee

Test Plan: test/cpp/TestClient


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665155 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 22:28:15 +00:00
boz
cce8184d99 THRIFT ReadWriteMutex
Summary: Implemented a read/write lock class in thrift::concurrency

Reviewed By: marc

Test Plan: I compiled this, then compiled a version of fb303 that uses this
(future checkin pending further tests), then ran a binary using the new fb303
and it didn't crash as things were added to the map using the ReadWriteMutex

Revert Plan: yup

Notes: this should replace rw_lock.h for most clients


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665154 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 22:27:52 +00:00
Mark Slee
2297460253 Python IPv6 support for TSocket
Summary: Contributed by Paul Saab of Powerset

Reviewed By: mcslee

Test Plan: Python test stuff


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665153 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 22:20:19 +00:00
David Reiss
f79031e875 Fixed possible Thrift serialization bug
Summary: TBinaryProtocol.cpp was making assumptions about evaluation order
that are not guaranteed by the standard.  Now it does not (at least in these
functions).

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan: still compiles.

Revert Plan: svn revert

Notes:

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665152 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 21:43:48 +00:00
Mark Slee
58dfb4fbe8 Lots of Ruby code generation improvements
Summary: Submitted by Kevin Clark, Ruby guru from Powerset

Reviewed By: mcslee

Test Plan: He updated the tests in trunk/test/rb/

Notes: The code is now officially "ruby-ish" and idiomatic


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665151 13f79535-47bb-0310-9956-ffa450edef68
2007-07-06 02:45:25 +00:00
Christopher Piro
7ef673345b [thrift] small typo in tserver.rb
Summary: s:procotol:protocol:g


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665149 13f79535-47bb-0310-9956-ffa450edef68
2007-07-02 06:35:10 +00:00
Mark Slee
4d73d5c5cb Thrift: THttpClient for PHP in Thrift trunk
Reviewed By: peter

Test Plan: In SMC frontend


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665147 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 23:15:00 +00:00
Christopher Piro
2f5afceeaa [thrift] preliminary Erlang support (initial import)
Summary:
 * missing {list,map,set}s, inheritance is spotty
 * loose source code, plus everything is one process (application / gen_server behavior is forthcoming)
 * codegen is a mess, need t_fp_generator

Test Plan:
 * codegen invoked without -erl generates identical code for test/
 * calculatorHandler plus 'thrift -erl -r tutorial.thrift' more or less works

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665146 13f79535-47bb-0310-9956-ffa450edef68
2007-06-29 07:17:33 +00:00
Mark Slee
82883299ef Removing protocol.txt
Summary: This is not accurate anymore

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665144 13f79535-47bb-0310-9956-ffa450edef68
2007-06-26 20:19:56 +00:00
Aditya Agarwal
58500e9763 -- make sure TFileTransport always starts at EOF
Reviewed By: jwang

Test Plan: search


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665143 13f79535-47bb-0310-9956-ffa450edef68
2007-06-26 02:57:04 +00:00
eletuchy
66ccee2a74 [thrift] java httpclient needs to close its inputstream
Reviewed By: mcslee

Test Plan: run as part of aim importer

Revert Plan: sure

Notes:

EImportant:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665142 13f79535-47bb-0310-9956-ffa450edef68
2007-06-25 18:29:28 +00:00
Mark Slee
0e1100c921 Ruby TBinaryProtocol fix
Summary: VERSION_1 | type, not &, wrong binary operator

Reviewed By: binary

Test Plan: TestClient.rb


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665141 13f79535-47bb-0310-9956-ffa450edef68
2007-06-23 00:08:13 +00:00
Mark Slee
a9294a9522 Teensy insignificant thrift bug
Summary: Wasn't causing any issues because it's a noop with the binary protocol

Reviewed By: jwang

Test Plan: honky tonk, no diff in functionality


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665140 13f79535-47bb-0310-9956-ffa450edef68
2007-06-22 19:43:12 +00:00
Mark Slee
552410c037 Idiotic typos in Python code
Summary: No clue how this slid in

Reviewed By: abosworth

Test Plan: I am stupid. TestClient.py


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665139 13f79535-47bb-0310-9956-ffa450edef68
2007-06-22 01:03:55 +00:00
Mark Slee
808454ec63 Thrift TBinaryProtocol change
Summary: New Thrift TBinaryProtocol with a version identifier

Reviewed By: aditya, eugene

Test Plan: Modify your services to have strictRead_ and strictWrite_ both set to FALSE. Then redeploy your services and test running clients against them. Once you have clients and servers running stably on this new code, you should redploy versions with strictWrite_ set to TRUE. Once that's all good, we can set strictRead_ to TRUE as well, and eventually deprecate the old protocol code entirely.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665138 13f79535-47bb-0310-9956-ffa450edef68
2007-06-20 21:51:57 +00:00
dweatherford
589859984f [thrift] Add optional callback inside of serve()
Summary: If enabled, the callback function will be run after the listening socket is opened and the event loop initialized, just prior to calling event_loop()

This is handy if you want to defer some of your initialization until after the socket is open -- allowing clients to connect, but not processing requests until the initialization is complete. I use this in the Synapse tablet server to minimize the communications interruption that happens during a tablet split (replaying commit logs after opening the listening socket).

Review: mcslee
Test Plan: compiled it into Synapse's tablet server
Revert: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665137 13f79535-47bb-0310-9956-ffa450edef68
2007-06-19 23:10:19 +00:00
Mark Slee
8eceaeacfb Missing variable in initializer list for TNonblockingServer constructor
Summary: Making tablemaster very unhappy

Reviewed By: dweatherford

Test Plan: tablemaster on synampse tier


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665135 13f79535-47bb-0310-9956-ffa450edef68
2007-06-15 01:43:21 +00:00
Mark Slee
1d2ead34a2 Darwin endianness junk
Reviewed By: darwin

Test Plan: build on OSX


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665133 13f79535-47bb-0310-9956-ffa450edef68
2007-06-09 01:23:04 +00:00
Mark Slee
e02385b0b4 Add thread pool option to NonblockingServer
Summary: If you want requests processed outside of the I/O thread

Reviewed By: jake luciani, aditya

Test Plan: nb-main.cpp, in the test folder


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665132 13f79535-47bb-0310-9956-ffa450edef68
2007-06-09 01:21:16 +00:00
boz
6ded775196 THRIFT: generic output handler
Summary: I'm tired of getting output from thrift via perror AND exceptions, so
this class allows the client to set an alternate (or empty) handler for error
output

Reviewed By: mcslee

Test Plan: I ran on the worker with the default, got output via perror, then
overloaded with my own function and got output via syslog and then NULL


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665131 13f79535-47bb-0310-9956-ffa450edef68
2007-06-05 22:41:18 +00:00
Marc Slemko
a647903dd2 Modified PosixThreadFactory
Added explicit detached getter and setter
Modified PosixThreadFactory::~PThread:
        Check for join failing and don't transition to detached_ state if it does.  Potential thread-handle leak for
        threads created joinable who aren't referenced by any external thread.  Solution for now has to be
        "DONT DO THAT", the clever approach doesn't always work.

Added ThreadFactoryTests.floodNThreads:
        Loop M times for N threads where M x N is bigger than 32K to verify that detached threads can be created
        ad infinitum.

Reviewed By: mcslee

Revert Plan: revertible

Test Plan: concurrency_test thread-factory passes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665130 13f79535-47bb-0310-9956-ffa450edef68
2007-06-05 22:20:14 +00:00
Marc Slemko
67606e5d72 Modified PosixThreadFactory::PThread:
Pay attention to detached flags.  If thread is create non-detached and has not been joined when all references are given up,
        (ie boost::share_ptr calls ~PThread) do the join in the destructor to prevent thread ids from being leaked.

Modified ThreadFactoryTests.reapNThreads:
        Loop M times for M threads where M x N is bigger than 32K to verify that thread ids aren't leaked

Modified TimerManager.cpp:
        Removed debug messages.

Reviewed By: mcslee

Revert Plan: revertible

Test Plan: concurrency_test thread-factory passes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665129 13f79535-47bb-0310-9956-ffa450edef68
2007-06-04 21:01:19 +00:00
Mark Slee
5e707a6cd9 Forgot to add ProcessorFactory
Reviewed By: biren


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665128 13f79535-47bb-0310-9956-ffa450edef68
2007-06-01 23:04:09 +00:00
boz
f83c9dbf6f THRIFT: ADITYASLOP
Summary: thrift didn't compile

Reviewed By: marc

Test Plan: thrift compiles


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665127 13f79535-47bb-0310-9956-ffa450edef68
2007-05-31 23:38:37 +00:00
Mark Slee
7a2fb142f1 Memory buffer for perl
Reviewed By: Jake Luciani


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665126 13f79535-47bb-0310-9956-ffa450edef68
2007-05-31 02:30:34 +00:00
Aditya Agarwal
7859a579db -- handle EINTRS in accept()
Summary:
- I love unix.

Reviewed By: mcslee

Test Plan: boz will test it


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665125 13f79535-47bb-0310-9956-ffa450edef68
2007-05-31 01:33:07 +00:00
Mark Slee
448849deed ProcessorFactory for Java
Reviewed By: simon forman


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665124 13f79535-47bb-0310-9956-ffa450edef68
2007-05-31 01:30:22 +00:00
Mark Slee
9b82d275c6 Get the long longs out of the Thrift codebase
Summary: Replace with int64_t and don't worry about what architecture machine you're on, the typedefed int64_t will do the right thing.

Reviewed By: aditya, marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665123 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 05:16:07 +00:00
Mark Slee
2782d6d205 mcslee: being nitpicky ensuring consistent coding style
Summary: no tabs, conditionals with spaces around them, etc

Reviewed By: thrift style rules


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665122 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 04:55:30 +00:00
Aditya Agarwal
e04475b5aa -- fix read timeout handling in TSocket
Summary:
- turns out that EAGAIN can be returned both when there is a transmission timeout and when there
  is a lack of system resources.

This diff has a hacky fix for respecting a user specified read timeout.

Reviewed By: Steve Grimm, Marc, Slee

Test Plan:
- Tested by trying to crash an srp machine

Revert Plan: No.

Notes:
- Also added functionality to allow users to specify the max number of recv retries (in the case
  when EAGAIN is returned due to a lack of system resources)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665121 13f79535-47bb-0310-9956-ffa450edef68
2007-05-23 02:14:58 +00:00
Marc Slemko
3a3b53bc6e Modified facebook::thrift::concurrency::Monitor.wait:
Throw TimedOutException on wait timeout so caller can distinguish between timeout and event.

Modified facebook::thrift::concurrency::PthreadThread.start:
        Throw SystemrResourceException on any pthread_* function call failure rather than asserting 0.

Added facebook::thrift::concurrency::Thread.id() and  facebook::thrift::concurrency::ThreadFactory.currentThreadId():
        Return thread-id of thread and current thread respectively.  Needed for reentrancy tests in ThreadManager

Added facebook::thrift::concurrency::ThreadManager.pendingTaskCountMaxN
Modified facebook::thrift::concurrency::ThreadManager.add():
        Now support a maximum pending task count and block if the current pending task count is max.
        If timeout is specified for add, TimedOutException is thrown if pending task count doesn't decrease
        in the timeout interval.  If add() is called by a ThreadManager worker thread and the task cannot
        be added, a TooManyPendingTasksException is thrown rather than blocking, since deadlocks can ensue
        if worker threads block waiting for works threads to complete tasks.

Reviewed By: mcslee, aditya

Revert Plan: revertible

Test Plan: concurrency/test/ThreadManagerTests.h
           run concurrency-test thread-manager


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665120 13f79535-47bb-0310-9956-ffa450edef68
2007-05-22 23:59:54 +00:00
Mark Slee
8168706fe9 Fix Thrift perl framedtransport
Reviewed By: jake luciani


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665117 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 02:44:21 +00:00
Mark Slee
bf82151094 Some filetransport indentation and style fixes
Reviewed By: null, no code change, style only


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665114 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 02:31:53 +00:00
Mark Slee
254ce20e51 Perl library for Thrift
Summary: Submitted by Jake Luciani

Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665112 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 02:21:06 +00:00
boz
1ea81ce9b0 THRIFT: configurable retry settings for bind
Summary: SO_REUSEADDR doesn't always work, and some of my servers have
expensive init routines that I really want to run before it becomes available
to services, so I want thrift to retry the bind several times at varied
intervals before giving up

Reviewed By: slee

Test Plan: running a service in GDB with no problems binding, with another
service bound to the port for all the retries, another service bound to the
port for only some of the retries


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665109 13f79535-47bb-0310-9956-ffa450edef68
2007-05-14 23:04:33 +00:00
Mark Slee
5f68c7161d Fix messed up exception error printing
Reviewed By: boz

Test Plan: comes up in feed


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665107 13f79535-47bb-0310-9956-ffa450edef68
2007-05-11 17:58:54 +00:00
jsobel
e02e424486 thrift: cpp tsocketpool support
summary: simple port of tsocketpool from php to cpp. missing a lot of functionality due to lack of apc support
review: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665106 13f79535-47bb-0310-9956-ffa450edef68
2007-05-08 17:51:49 +00:00
Mark Slee
3690ee412a TEOFException must publicly inherit TTransportException
Reviewed By: boz

Test Plan: Queuemap


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665105 13f79535-47bb-0310-9956-ffa450edef68
2007-05-07 22:54:18 +00:00
James Wang
4fd2dbaf06 Thrift: Fixing memory leak issue with memory buffer used in TPipedTransport
Reviewed by: boz

Test Plan: tested with falcon action_listener using PeekProcessor


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665101 13f79535-47bb-0310-9956-ffa450edef68
2007-04-17 22:38:58 +00:00
James Wang
5f45207ee9 Thrift: Modifications to PeekProcessor to be able to support nested PeekProcessors
Reviewed by: boz

Test Plan: Tested with Falcon


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665100 13f79535-47bb-0310-9956-ffa450edef68
2007-04-13 20:10:39 +00:00
Mark Slee
8d725a2738 Add explicit binary type to Thrift
Summary: Identical to string in all languages except Java. Java String is NOT binary-safe, so we need to use raw byte[] in that case. PHP/RUBY/Python strings are all binary safe, and C++ std::string works fine and manages memory for you so it's the safest route. Java just needs this tweak.

Reviewed By: aditya

Test Plan: Use "binary" as a type instead of String.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665099 13f79535-47bb-0310-9956-ffa450edef68
2007-04-13 01:57:12 +00:00
Mark Slee
4f261c5b23 Crazy byteswapping thrift patches from david reiss
Reviewed By: ninjitsu

Test Plan: bswap64, holla holla


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665098 13f79535-47bb-0310-9956-ffa450edef68
2007-04-13 00:33:24 +00:00
Aditya Agarwal
8dc76e6a87 -- trying to make TFileTransport destructor quicker
Summary:
- setFlushMaxTimeUs to a lower value before trying to close the file

Reviewed By: jwang


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665095 13f79535-47bb-0310-9956-ffa450edef68
2007-04-11 00:13:09 +00:00
Aditya Agarwal
89b85f87d8 -- fix issues with TFileTransport
Summary:
- Make sure that buffers are always emptied when destructor is called (or when file is closed)
- make flush a no-op if file is not open
- dont allow new events to be enqueued if the file is in the process of being closed

Reviewed By: slee, jwang

Test Plan: tested with building search indices on top of thrift logs


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665094 13f79535-47bb-0310-9956-ffa450edef68
2007-04-10 23:15:04 +00:00
James Wang
c10bba1e16 Thrift: Checking in readonly option for TFileTransport
Reviewed by: boz


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665093 13f79535-47bb-0310-9956-ffa450edef68
2007-04-10 17:29:06 +00:00
dweatherford
86efa70748 [thrift] Build fix for TFileTransport
Summary: Not including config.h means we never get the HAVE_CLOCK_GETTIME #define, breaking the build with a duplicate function definition on machines that have a clock_gettime() function in the standard library.

Reviewed By: slee
Test Plan: it compiles, ship it
Revert: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665087 13f79535-47bb-0310-9956-ffa450edef68
2007-04-05 00:20:40 +00:00
Mark Slee
ff24f74b49 Oops typo.
Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665086 13f79535-47bb-0310-9956-ffa450edef68
2007-04-04 22:13:37 +00:00
Mark Slee
a28d819d13 Build fixes and clock_get_time copy from paul querna
Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665085 13f79535-47bb-0310-9956-ffa450edef68
2007-04-04 22:11:17 +00:00
Mark Slee
82a6c0f259 Thrift string copy construction pathces from kevin ko
Summary: Remove unnecessary string copy constructions in C++ code

Reviewed By: mcslee

Test Plan: build


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665084 13f79535-47bb-0310-9956-ffa450edef68
2007-04-04 21:08:21 +00:00
Mark Slee
ba35456acf Fix build script reference problem
Reviewed By: pquerna@apache.org

Test Plan: build w/o libevent installed


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665081 13f79535-47bb-0310-9956-ffa450edef68
2007-04-03 07:31:51 +00:00
Mark Slee
13a0d4a3d6 PHP new build fix for TBinaryProtocol
Reviewed By: shire


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665079 13f79535-47bb-0310-9956-ffa450edef68
2007-04-03 03:16:11 +00:00
Mark Slee
ba8f8d7953 Remove extra TApplicationException:: in Thrift.h
Summary: G++ 4.1.1 compatibility

Reviewed By: alex tribble


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665078 13f79535-47bb-0310-9956-ffa450edef68
2007-04-03 00:34:00 +00:00
Marc Slemko
b6b5a9e001 Removed comment about needing a lock in thread main. Access through boost::shared_ptr is thread safe
Reviewed By: none

Test Plan: N.A.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665076 13f79535-47bb-0310-9956-ffa450edef68
2007-04-01 20:17:02 +00:00
Aditya Agarwal
3f234dad0e -- more assert fixes for thrift concurrency
Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665074 13f79535-47bb-0310-9956-ffa450edef68
2007-04-01 01:19:57 +00:00
Aditya Agarwal
9dc57402b5 -- assert fixes for thrift concurrency lib
Summary:
- cannot assume that assert.h is defined

Reviewed By: marc k

Test Plan: everything compiles

Notes:
- need to reflect these changes in libfacebook/fbthread


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665073 13f79535-47bb-0310-9956-ffa450edef68
2007-03-31 17:45:12 +00:00
Martin Kraemer
ac62f948cc Thrift - remove client disconnect error
Summary:
It's fairly obnoxious.

Reviewed By: Slee and Karl

Test Plan:

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665069 13f79535-47bb-0310-9956-ffa450edef68
2007-03-30 18:41:48 +00:00
James Wang
f1ceb477ea Thrift: Making TProcessor::process(io) non-virtual again, since my last change which made it virtual caused compiling errors of functions being hidden, ugh
Reviewed by: Karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665068 13f79535-47bb-0310-9956-ffa450edef68
2007-03-28 22:43:57 +00:00
James Wang
8f6e207a5d Thrift: PeekProcessor - moving PeekEnd call after PeekBuffer
Reviewed by: boz


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665067 13f79535-47bb-0310-9956-ffa450edef68
2007-03-28 00:47:09 +00:00
James Wang
3e9d177fd2 Thrift: Adding StatsProcessor, PeekProcessor, TPipedFileReaderTransport, and TPipedFileReaderTransportFactory classes
- StatsProcessor can be used to print events, or keep track of event frequency
- PeekProcessor is used to examine data in a thrift event, prior to passing it along to an underlying processor
- TPipedFileReaderTransport and its factory are used to pipe a TFileReaderTransport (which TFileProcessor requires)

Also fixed some bugs in TFileTransport - next flush time was overflowing and not always being reset

Reviewed by: aditya, mcslee

Test Plan: Tested using various thrift clients (scribe, falcon) and gdb in sandbox and on dev008.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665066 13f79535-47bb-0310-9956-ffa450edef68
2007-03-27 23:17:34 +00:00
Mark Slee
be0ae5b1be Fix heinous TMemoryBuffer bug and warning in FileTransport
Reviewed By: dweatherford


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665065 13f79535-47bb-0310-9956-ffa450edef68
2007-03-22 02:35:33 +00:00
Mark Slee
a821cfd39f Missed an include line in sample code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665064 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 06:53:03 +00:00
Mark Slee
06af13d308 Readme on PHP/Apache Thrift integration
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665063 13f79535-47bb-0310-9956-ffa450edef68
2007-03-21 06:50:52 +00:00
Mark Slee
7679196f1c Various Thrift fixes, including Application Exception support in Ruby, better errror messages across languages, etc.
Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665058 13f79535-47bb-0310-9956-ffa450edef68
2007-03-14 02:47:35 +00:00
Mark Slee
561b536888 Fix TServerSocket accept() to not do 200ms polling
Summary: Better to signal to unix file in select

Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665056 13f79535-47bb-0310-9956-ffa450edef68
2007-03-09 19:26:29 +00:00
Aditya Agarwal
4265a2c4d9 -- Fix compiler warnings
Summary:
- These showed up when I was compiling on my local machine (cygwin!!)

Reviewed By: thrifty


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665055 13f79535-47bb-0310-9956-ffa450edef68
2007-03-08 03:10:29 +00:00
Mark Slee
b6616fc42d No such thing as e.message in python socket error?
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665052 13f79535-47bb-0310-9956-ffa450edef68
2007-03-07 05:46:05 +00:00
Mark Slee
1d4ce80af8 Implement proper TThreadedServer shutdown
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665049 13f79535-47bb-0310-9956-ffa450edef68
2007-03-07 05:16:16 +00:00
Mark Slee
54b7ab9b53 READMEs and DOCs and ant tasks, oh my
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665048 13f79535-47bb-0310-9956-ffa450edef68
2007-03-06 00:06:27 +00:00
Mark Slee
5ea15f9e32 Get rid of all the using namespace and using boost:: declarations in Thrift header files
Summary: To remove upstream dependencies. Still keeping some specific using directives around.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665047 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 22:55:59 +00:00
Mark Slee
5d06feab21 Thrift build cleanup stuff
Summary: Get rid of autoconf stuff for lib/php, it doesn't do anything


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665046 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 22:18:18 +00:00
Mark Slee
3303f36081 Thrift CPP threading fixes
Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665045 13f79535-47bb-0310-9956-ffa450edef68
2007-03-05 20:09:37 +00:00
Mark Slee
4e441e296c Do not check error code if select returns 0
Summary: They don't seem to be guaranteed on our system, 0 just means timeout

Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665040 13f79535-47bb-0310-9956-ffa450edef68
2007-03-02 21:23:30 +00:00
Mark Slee
a5a783f953 Server robustness fixes in Thrift C++ libs
Summary: ServerSockets can be interrupt() ed

Reviewed By: marc, karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665039 13f79535-47bb-0310-9956-ffa450edef68
2007-03-02 19:41:08 +00:00
Mark Slee
6e3f637bab Proper shutdown functionality for Thrift servers
Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665038 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 22:05:46 +00:00
Mark Slee
7c10eaf35c Add join to the ThreadManager
Summary: Now you can join against all the threads in a ThreadManager

Reviewed By: marc, xp-style

Test Plan: Use with new ThriftServer shutdown mechanisms


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665037 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 02:45:10 +00:00
Mark Slee
adde9687c6 Giving Marc K props for crazy bitshifting in PHP binary protocol
Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665036 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:37:56 +00:00
Mark Slee
fb40c190ca Oops missed license on one python file
Reviewed By: mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665035 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:35:54 +00:00
Mark Slee
43df5c5b8a Applying Thrift license to ruby source
Reviewed By: ruby


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665034 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:34:42 +00:00
Mark Slee
4902c0563f Apply Thrift license to PHP source code
Reviewed By: php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665033 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:31:30 +00:00
Mark Slee
89e2bb84e2 Applying Thrift software license to Python source
Reviewed By: python


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665032 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:20:36 +00:00
Mark Slee
7eb0d63542 Apply Thrift license to Java sources
Reviewed By: bash


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665031 13f79535-47bb-0310-9956-ffa450edef68
2007-03-01 00:00:27 +00:00
Mark Slee
9f0c65153c Thrift license applied to all the C++ files
Reviewed By: bash

Notes: marc says $*, corson says "$@"


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665030 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 23:58:26 +00:00
Mark Slee
57cc25e2a3 Some Thrift documentation cleanups
Summary: Getting ready to hand this over to powerset, just want to have the right licenses in place and such first.

Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665029 13f79535-47bb-0310-9956-ffa450edef68
2007-02-28 21:43:54 +00:00
Mark Slee
0af62d181c Bogus $this->type in TApplicationException in PHP
Reviewed By: php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665027 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 22:11:09 +00:00
Mark Slee
bd8b991fa7 Python HttpClient for Thrift
Reviewed By: thrifty goodness for SMC


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665026 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 20:17:00 +00:00
Mark Slee
2a22a88c57 Thrift HTTP client optimizations
Summary: When reading chunked encoding don't always get all the parts right away, return one part at a time so that reading code can deserialize the data on the fly.

Reviewed By: http


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665025 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 19:53:38 +00:00
Mark Slee
4401814d3a Various bug fixes with the THttpClient
Summary: All kinds of buffer madness, what a pain.

Reviewed By: http


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665024 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 19:03:01 +00:00
Mark Slee
a2c760b792 Whoops there were 2 extra spaces in this code
Summary: That bothers me.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665023 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 05:18:07 +00:00
Mark Slee
8a98e1bc0f Thrift HTTP client in C++
Reviewed By: aditya, dweatherford

Test Plan: SMC client


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665022 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 05:16:23 +00:00
Mark Slee
d395d57d3b Same fix to thrift codebase
Reviewed By: aditya

 line, and those below, will be ignored--

M    php/src/Thrift.php
M    php/src/transport/TSocket.php
M    php/src/transport/TPhpStream.php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665021 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 01:16:55 +00:00
Aditya Agarwal
49aea10d7a -- fix overflow error in seekToChunk()
Summary:
- I love finding overflow errors.

Reviewed By: jwang

Test Plan: tested by rolling back search logfile

Notes:
- This should not affect anything currently in production.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665020 13f79535-47bb-0310-9956-ffa450edef68
2007-02-27 00:07:45 +00:00
Mark Slee
1ecb1b053a Fix thrift includes
Summary: Remove circular ref

Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665019 13f79535-47bb-0310-9956-ffa450edef68
2007-02-22 01:01:10 +00:00
Mark Slee
dac7856db7 Proper exception types in PHP thrift
Reviewed By: tbr-aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665018 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 07:35:03 +00:00
Mark Slee
44e5f0157f Remove nonexistent TBuf ref
Reviewed By: goozebury


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665017 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 05:42:38 +00:00
Mark Slee
e74306a965 Move constant defs into Thrift.py to avoid cirulcar includes
Reviewed By: snakes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665016 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 05:38:12 +00:00
Mark Slee
92195ae219 Starting python exception handling cleanup
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665013 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 05:16:30 +00:00
Mark Slee
e5341192fd protocol exceptions in java
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665012 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 04:56:26 +00:00
Mark Slee
b46c0418c7 More java error codes in thrift
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665011 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 04:54:38 +00:00
Mark Slee
a9848d7618 New thrift c++ error code
Summary: ALREADY_OPEN

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665010 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 04:54:05 +00:00
Mark Slee
3d42440e42 Thrift application exceptions in Java
Reviewed By: thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665008 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 04:17:34 +00:00
Mark Slee
f3d3363c8e Application exception types for Thrift
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665006 13f79535-47bb-0310-9956-ffa450edef68
2007-02-21 01:39:23 +00:00
Mark Slee
f9831084bc Thrift Binary protocol improvements and application exceptions
Summary: Add application exceptions for unknown methods etc, and also let binary protocol support size limits on containers and strings

Reviewed By: aditya, xp-wayne


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665003 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 20:59:21 +00:00
Mark Slee
3cd75f543c Include debug symbols in thrift builds by default
Summary: Too irritating not having stack traces when these go down. Sack up and include stack traces always... bigger binary but whatever.

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665002 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 20:57:36 +00:00
Mark Slee
0e5283914f Take out debug print in TServer constructor
Reviewed By: aditya

Test Plan: no print on construct


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665000 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 04:23:26 +00:00
Mark Slee
04342d8b63 another typo i missed
Summary: outut

Reviewed By: aditya

Test Plan: blog


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664999 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 03:41:35 +00:00
Mark Slee
fb84b2b264 Adityaslop typos in thrift py server
Summary: outut is not output

Reviewed By: aditya, cheever

Test Plan: blogfeeds fixin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664998 13f79535-47bb-0310-9956-ffa450edef68
2007-02-20 03:37:28 +00:00
James Wang
a0c92417a0 Thrift: Changing TFileTransport to use the same buffer-swap mechanism that pillar does
Reviewed by: aditya

Tested with thrift test class

Notes: TFileTransport used to use a circular buffer.  Changed this to use two large buffers, one for reading and one for writing, that are swapped whenever the writer thread finishes with the last write.

Also changed a few default constants -- force_flush timeout is now 3 sec, default buffer size is 10000 entries


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664997 13f79535-47bb-0310-9956-ffa450edef68
2007-02-14 23:22:08 +00:00
Mark Slee
907e3d6345 Fix handling of accept() exceptions in threadedserver
Reviewed By: threadz-aditya-tbr

Notes: Propagating fix from TThreadPoolServer


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664994 13f79535-47bb-0310-9956-ffa450edef68
2007-02-08 22:29:24 +00:00
Martin Kraemer
0b64e77d96 Thrift: PHP Socket instrumentation for connect/read/write issues
Summary:
Sockets now error with timeout messages if it's a timeout over general read failures.

Reviewed By: Slee

Test Plan: Tested with payment broker client with overloaded addresses and send/recv timeouts.

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664993 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 22:39:58 +00:00
Mark Slee
e1165d4b18 Implement TSimpleServer in Ruby
Summary: It Works!

Reviewed By: tbr-doug


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664992 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 06:05:28 +00:00
Aditya Agarwal
fdef47ea2b -- Servers should not crash on accept.
Summary:
- Continue running if there is an accept issue

Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664988 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 03:54:18 +00:00
Aditya Agarwal
af602f5e9f -- Remove reference to TBufferedRouter.h/cpp in Makefile
Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664986 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 02:38:54 +00:00