Commit Graph

505 Commits

Author SHA1 Message Date
Aditya Agarwal
8b6c2ebf42 -- 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
2007-08-31 07:54:40 +00:00
David Reiss
d779cbe48c 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
2007-08-31 01:42:55 +00:00
David Reiss
5db3e92671 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
2007-08-30 23:07:45 +00:00
David Reiss
792df0bf78 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
2007-08-30 03:30:22 +00:00
David Reiss
aea19c9d65 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
2007-08-29 23:17:32 +00:00
David Reiss
2375312fa0 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
2007-08-27 19:57:34 +00:00
David Reiss
5ec8e26d25 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
2007-08-26 02:21:24 +00:00
David Reiss
382fc3043c 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
2007-08-25 18:01:30 +00:00
Mark Slee
40c6ac574c 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
2007-08-24 19:24:10 +00:00
David Reiss
3f808ab337 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
2007-08-24 00:19:12 +00:00
David Reiss
a41c8705db 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
2007-08-23 17:20:38 +00:00
David Reiss
d4a269cdb5 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
2007-08-23 02:37:19 +00:00
Mark Slee
402ee28f87 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
2007-08-23 01:43:20 +00:00
David Reiss
25b5ee3285 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
2007-08-23 00:14:48 +00:00
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
Aditya Agarwal
9bae5e783e -- typo in TSocket
Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664985 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 02:36:56 +00:00
Mark Slee
43b6c6378e Protocol should hang onto shared pointer for protection but always use underlying raw pointer
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664982 13f79535-47bb-0310-9956-ffa450edef68
2007-02-07 00:54:17 +00:00
Aditya Agarwal
e12d48596d -- TBufferedRouterTransport being renamed to TPipedTransport
Summary:
- TBufferedRouterTransport is the most nonsensical name I have ever
  heard of

Reviewed By: slee

Test Plan: it compiles


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664979 13f79535-47bb-0310-9956-ffa450edef68
2007-02-06 03:25:13 +00:00
Aditya Agarwal
5a429586f8 -- Protocol and transport factories now wrap around a single protocol/transport
Summary:
- This is an analagous to the C++ change made in r31441

Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664978 13f79535-47bb-0310-9956-ffa450edef68
2007-02-06 02:51:15 +00:00
Aditya Agarwal
6a5bcaa754 -- Protocol and transport factories now wrap around a single protocol/transport
Summary:
- This is an analagous to the C++ change made in r31441

Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664977 13f79535-47bb-0310-9956-ffa450edef68
2007-02-06 02:50:56 +00:00
Aditya Agarwal
f954f97b96 -- Allow specification of socket timeouts in thrift python socket code
Reviewed By: slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664976 13f79535-47bb-0310-9956-ffa450edef68
2007-02-06 01:26:12 +00:00
Aditya Agarwal
5c468196dc -- Protocol and transport factories now wrap around a single protocol/transport
Summary:
- This is an analagous to the C++ change made in r31441

Reviewed By: cheever, mcslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664975 13f79535-47bb-0310-9956-ffa450edef68
2007-02-06 01:14:33 +00:00
Martin Kraemer
ee341cb57b Thrift: Supported for file descriptor == 0 and cleanup error output
Summary:
Thrift improperly initialized file descriptors to zero and treated 0 and an invalid value.  0 is a valid file descriptor.  Also, commented out error message on client disconnect for TThreadPoolServer

Reviewed By: Marc & Karl

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664972 13f79535-47bb-0310-9956-ffa450edef68
2007-02-05 21:40:38 +00:00
Martin Kraemer
92a2eac8cb Thrift: Exception message is protected and accessible to derived classes.
Summary:
Exception message is protected and accessible to derived classes.

Reviewed By: Karl

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664971 13f79535-47bb-0310-9956-ffa450edef68
2007-02-05 20:58:41 +00:00
Martin Kraemer
10640d8935 Thrift fixes for Exceptions and TServerSocket
Summary:
TServerSocket detected file des. 0 as an invalid file des.  This has been fixed.

Reviewed By: Steve

Revert Plan: Revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664969 13f79535-47bb-0310-9956-ffa450edef68
2007-02-03 01:59:12 +00:00
Mark Slee
f23cfd810c TFileTransport %lu => %u
Summary: compiler warnings are lame

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664968 13f79535-47bb-0310-9956-ffa450edef68
2007-02-02 00:09:51 +00:00
Mark Slee
8cbda85be5 Prevent direct instantation of ThreadManager
Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664967 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 23:05:38 +00:00
Mark Slee
b3cb62959e Adding threaded server to Thrift
Summary: Spawns a new thread for each client connection

Reviewed By: marc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664965 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 22:55:00 +00:00
Mark Slee
7a20a14a06 Fix bufferedroutertransport overflow bugs
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664964 13f79535-47bb-0310-9956-ffa450edef68
2007-02-01 21:39:50 +00:00
Mark Slee
cb126a0c19 Fix for TBufferedTransport double-buffer-size strings
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664961 13f79535-47bb-0310-9956-ffa450edef68
2007-01-31 08:31:29 +00:00
Mark Slee
aaa23ed4ea Move var declarations out of switch blocks in Thrift
Summary: Strict G++ compliance

Reviewed By: fett


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664958 13f79535-47bb-0310-9956-ffa450edef68
2007-01-30 19:52:05 +00:00
Mark Slee
6d7d595858 Ruby support for Thrift
Summary: Just client support so far.

Reviewed By: tbr-doug


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664953 13f79535-47bb-0310-9956-ffa450edef68
2007-01-27 01:44:22 +00:00
Martin Kraemer
50919171b7 Thrift: indentation
Summary:
sigh mixed indentation sytyles.

Reviewed By: Slee

Test Plan: Test by building..

Revert Plan: revertible

Notes:


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664952 13f79535-47bb-0310-9956-ffa450edef68
2007-01-26 01:41:03 +00:00
Mark Slee
0788a70568 Separate thrift into libthrift and libthriftnb
Summary: libthriftnb is the one that requires libevent. It was really annoying that you always had to put -levent in your link step to build thrift programs when youa re not using any of the c++ nonblocking stuff. This way, if you're using nonblocking you can do that, but the normal case is easier to link.

Reviewed By: makefile


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664951 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 08:14:50 +00:00
Mark Slee
eb0d024ee1 Full automake/autoconf compliance for thrift
Summary: Including the compiler!!!

Reviewed By: automake


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664949 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 07:58:55 +00:00
Aditya Agarwal
2c9f2fb0bd -- ThriftLogfile is finally done.
Summary:
- Everything seems to be working well..

Reviewed By: tbr - slee

Test Plan: Tested using search


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664947 13f79535-47bb-0310-9956-ffa450edef68
2007-01-25 03:27:43 +00:00
Aditya Agarwal
68f08ee5f5 -- Error recovery code for thrift logfile
Summary:
- perform some basic corruption checks:
   1) Event larger than chunk
   2) Event larger than specified max
   3) Event crossing chunk boundary etc.
- If error encountered, then try to perform some recovery

Reviewed By: Slee

Test Plan: Going to test now...need to check in because of compile issues

Notes:
- These checks take care of the case when there is a dirty read from the filesystem (which
  we have encountered with the netapps). The recovery involves trying to perform the read
  again from ths FS and if that fails skipping the chunk altogether.
  Keep in mind that this might only be useful for idempotent systems (e.g. search redolog).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664943 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 23:39:10 +00:00
Mark Slee
c425780847 Thrift socket should not perror in the TRYAGAIN state
Reviewed By: wayne


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664942 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 23:14:30 +00:00
Aditya Agarwal
9abb0d69b7 -- Change concept of protocol and transport factory
Summary:
- Transport factories now wrap around one transport
- Protocol factories now wrap around one transport (as opposed to a pair of input/output
   transports)
- TServer now takes input/output transport and protocol factories

The motivation for this change is that you could concievably want to use a different protocol or
transport for input and output. An example is that incoming data is encoded using binary protocol
but outgoing data is encrypted XML (with encryption being done on the transport level).

This change should be mostly backwards compatible because the TServer classes have constructors
that take a transport factory and use that for both the input and transport factories. The only
change might be for anyone who is using the C++ client code directly i.e. instantiating
TBinaryProtocol() directly because the constructor now only accepts one transport.

Reviewed By: Slee

Test Plan: Everything compiles (for both thrift and search).

Notes:
I am going to make the same changes in all the supported languages after this...


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664940 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 22:53:54 +00:00
Mark Slee
f9373397c3 Nonblockingserver constructor that uses binary protocol factory by default
Reviewed By: tbr-aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664937 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 19:41:57 +00:00
Aditya Agarwal
502ea8a3c8 -- thrift logfile fixes
Summary:
-- numChunks was broken and that was causing a lot of strange downstream behaviour

Reviewed By: tbr slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664936 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 02:24:35 +00:00
Aditya Agarwal
1ea90526b0 -- Nonblocking server changes to allow logging
Summary:
-- the constructor needs to accept a transport factory
-- TConnection close() needs to close factor generated transports

Reviewed By: Mark Slee

Test Plan: Tested with search redologger


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664930 13f79535-47bb-0310-9956-ffa450edef68
2007-01-19 02:02:12 +00:00
Aditya Agarwal
794568bafe -- additions to ThriftLogfile
Summary:
-- fixed peek() in TBufferedRouterTransport.cpp
-- Added processChunk() to ThriftLogfile

Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664924 13f79535-47bb-0310-9956-ffa450edef68
2007-01-18 06:20:24 +00:00
Karl Lehenbauer
893ef724c3 Fix identifier typo in Thrift error message.
Trac Bug: #

Reviewed By:

Test Plan:
The correct error message appears when a PHP Thrift client can't
connect to a server.  Set that up, and try and get the error message:

[Wed Jan 17 10:41:41 2007] [error] TSocketPool: retryInterval (60) has
passed for host dev007:8188

...then you're good.  If you get something about a undefined property,
then this fix didn't work.

Revert Plan: Revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664920 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 18:56:10 +00:00
Marc Slemko
85ca7a13e8 Added ax_event_base.m4 to find and configure libevent
Modified configure.ac to pull in AX_EVENT_BASE
Modified Makefile.am to take EVENT settings from automake.

Reviewed by dcorson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664919 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 08:32:16 +00:00
Marc Slemko
75c2f702c9 Make boost base default to yes to make sure we don't get through configure without boost
Fixed configure.ac to add a few missing functions and headers

Reviewed by dcorson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664918 13f79535-47bb-0310-9956-ffa450edef68
2007-01-17 07:59:38 +00:00
Marc Slemko
d95abdd918 Added autoconf/automake glue to run lib/py/setup.py as part of make install
Reviewed by mslee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664914 13f79535-47bb-0310-9956-ffa450edef68
2007-01-16 22:20:19 +00:00
robert
b0fac3ee66 Fixed some warnings, changed TSocketPool to inherit debugHandler from TSocket
reviewed: mcslee
revert: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664913 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 23:53:25 +00:00
Aditya Agarwal
ebc99e0e16 -- Allow manual setting of host and port in TSocket
Summary:
-- required for TSocketPool equivalent functionality

Reviewed By: slee

Notes:
-- Todo is to replicate TSocketPool.php in C++


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664912 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 23:14:58 +00:00
robert
1c989f2c78 Added open, close, and isOpen to TFramedTransport
reviewed: mcslee
revert: yes


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664911 13f79535-47bb-0310-9956-ffa450edef68
2007-01-15 18:29:51 +00:00
Adam Nichols
2f816f28e6 minor syntax change in thrift php library, reviewed by slee, revertible
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664906 13f79535-47bb-0310-9956-ffa450edef68
2007-01-11 21:25:29 +00:00
Mark Slee
e7714a6c09 Fix call_user_func bug on debugHandler_
Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664905 13f79535-47bb-0310-9956-ffa450edef68
2007-01-11 01:26:00 +00:00
Mark Slee
ad58f952bc Add options to thrift transport classes for custom error handlers
Summary: So we can pass debug_rlog (facebook custom) in as a handler for errors to thrift (generic open source)

Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664903 13f79535-47bb-0310-9956-ffa450edef68
2007-01-03 19:23:50 +00:00
Mark Slee
a09e34efb0 Fix typo class variable bug in TSocketPool
Reviewed By: corson


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664902 13f79535-47bb-0310-9956-ffa450edef68
2007-01-03 18:45:04 +00:00
robert
79511192f1 fixed a problem with read buffer resizing in TNonblockingServer
reviewed: mcslee
revert: yes
test: send a large message to a nonblocking server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664900 13f79535-47bb-0310-9956-ffa450edef68
2006-12-20 19:25:38 +00:00
robert
3fa9d24bc3 fixed a bug in TFramedTransport where it was checking a size for nonzero after byte swapping it.
reviewed: mcslee
revert: yes
test: run a C++ client and server with framed transport


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664899 13f79535-47bb-0310-9956-ffa450edef68
2006-12-19 22:27:54 +00:00
Mark Slee
2abc9dfd59 message_ in TException can't be const or subclasses break
Reviewed By: yishan


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664898 13f79535-47bb-0310-9956-ffa450edef68
2006-12-16 01:06:49 +00:00
Martin Kraemer
8196a61745 Thrift TException Cleanup
Summary:
Destructors should be virtual or declared protected.

Reviewed By: mcslee

Revert Plan: revertible


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664892 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 01:57:58 +00:00
Aditya Agarwal
25b293616b -- Rename TBufferedFileWriter.h/cpp to TFileTransport.h/cpp
Summary:
-- Thrift logfile is now officially in action!

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664891 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:58:15 +00:00
Aditya Agarwal
0c341a1332 -- Check all system call return values
Summary:
-- Throw TTransportException if a system call fails

Reviewed By: Mark Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664890 13f79535-47bb-0310-9956-ffa450edef68
2006-12-09 00:47:03 +00:00
Aditya Agarwal
e9ef8d7ce9 -- TFileTransport (Thrift Logfile)
Summary:
-- TBufferedFileWriter.h/cpp will be renamed to TFileTransport.h/cpp in the next commit.
-- TFileTransport is essentially reading and writing thrift calls to/from a file instead of a
   socket.
-- The code/design is somewhat similar to pillar_logfile but there are some significant changes.

todo:
-- still need to do error correction/detection

Reviewed By: Mark Slee

Test Plan:
-- Wrote test in thrift/test/cpp/src/main.cpp that appends to a file and replays requests

Notes:
It's finally time to port search over to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664889 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 23:52:57 +00:00
Martin Kraemer
97f9d60be8 Thrift TException does not properly define virtual what() method.
Summary:
Clients would elect to call the base class what() method instead of the derived version.  This results in
less than usable exceptions for debugging.

Reviewed By: Karl * mcslee

Test Plan:
Tested with local application in development.

Revert Plan:
revertible.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664887 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 19:52:16 +00:00
Mark Slee
3860c9a246 Fix TSimpleServer exception bug
Reviewed By: tbr-martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664886 13f79535-47bb-0310-9956-ffa450edef68
2006-12-06 00:13:42 +00:00
Mark Slee
e598d075f5 Thrift: Fix PHP socket fread return
Summary: If you read the string "0" then it treats that as false, so we have to check for both === false and === '' manually.

Reviewed By: martin

Notes: I hate php


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664878 13f79535-47bb-0310-9956-ffa450edef68
2006-11-21 02:01:22 +00:00
Mark Slee
b9ff32ae30 Thrift: C++ peek() method and TException not Exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664876 13f79535-47bb-0310-9956-ffa450edef68
2006-11-16 01:00:24 +00:00
Mark Slee
588e452bc4 Fix bad implode call with nonexistant class variable in PHP SocketPool
Reviewed By: karl


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664875 13f79535-47bb-0310-9956-ffa450edef68
2006-11-15 22:23:06 +00:00
Mark Slee
9683f77d88 Fix TType.php problem
Reviewed By: martin


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664866 13f79535-47bb-0310-9956-ffa450edef68
2006-11-07 23:03:00 +00:00
Mark Slee
e2bd58da29 Add python scons rules
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664860 13f79535-47bb-0310-9956-ffa450edef68
2006-10-31 05:09:24 +00:00
Mark Slee
0f70d77333 Mutex was missing from libthrift build
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664858 13f79535-47bb-0310-9956-ffa450edef68
2006-10-28 00:51:14 +00:00
Mark Slee
63608e8017 Include <time.h> not "time.h"
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664855 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 05:06:26 +00:00
Mark Slee
5f8237d4de Thrift PHP update for new Protocol wraps Transport style
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664854 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 04:57:03 +00:00
Mark Slee
bb31d0ac43 Let Python server take protocolFactory argument
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664853 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 04:56:40 +00:00
Aditya Agarwal
35ae1c784c -- Change thrift logging macros to have a T_ prefix
Summary:
-- don't want to cause naming conflicts with other packages/dirs

Reviewed By: Mark Slee

Test Plan: Compiled


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664851 13f79535-47bb-0310-9956-ffa450edef68
2006-10-26 03:31:34 +00:00
Mark Slee
4ac459ff3a Fix python server bugs and go to new protocol wraps transport model
Reviewed By: ccheever


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664849 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 21:39:01 +00:00
Mark Slee
456b7a868c New protocol wrapping transport model for Thrift Java
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664846 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 20:53:37 +00:00
Mark Slee
b6f10d1fd1 Clean up Java Thrift transport code
Summary: More robust error checking


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664845 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:58:36 +00:00
Mark Slee
60275c7a67 Give options for one-way or two-way buffering in PHP Thrift transports
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664843 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:54:20 +00:00
Mark Slee
fe30c5f304 Improve python thrift transport, readAll, buffering, framing
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664842 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:53:36 +00:00
Mark Slee
4af6ed71e1 Change Thrift c++ to new protocol wrapping transport model
Summary: Also cleaned up excessive .h/.cpp files into Utils files

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664838 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 19:02:49 +00:00
Mark Slee
b3bd81f479 Change Thrift .cc files to be .cpp files
Summary: CPP R00lz, CC Drewlz

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664837 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 01:36:44 +00:00
Mark Slee
83303e1cf7 Allow optional framing of input/output in FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664836 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 01:29:37 +00:00
Mark Slee
92f00fb022 Framing option for non blocking server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664835 13f79535-47bb-0310-9956-ffa450edef68
2006-10-25 01:28:17 +00:00
Mark Slee
9a695ba364 self.clients instead of self.client
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664834 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 18:55:36 +00:00
Mark Slee
4ce787f238 Missing self argument in server method
Reviewed By: ccheever


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664833 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 18:54:06 +00:00
Mark Slee
b90aa7c104 Python threadpool server for Thrift
Summary: Fixed number of threads that work from a shared queue

Reviewed By: cheever


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664832 13f79535-47bb-0310-9956-ffa450edef68
2006-10-24 18:49:45 +00:00
Aditya Agarwal
e528c76490 -- Thrift Log File
Summary:
-- This is the thrifty version of Pillar's batch_writer
-- Cleaned up a lot of the code in batch writer and made it conform to Thrift's strict coding standards
-- Added TBufferedRouterTransport.h/cc to actually route messsages via readEnd() to the file writer. It's
   not quite as easy to route the messages in Thrift as it was in Pillar

Reviewed By: Slee

Test Plan: Tested by making sure that the file was recording data

Notes:
-- The real correctness test will be when I finish writing TLogFileTransport (pillar_logfile.cpp).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664826 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:48:43 +00:00
Aditya Agarwal
be3f8d8c6d -- Adding TLogging.h
Summary:
-- This should have been part of the previous commit

Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664825 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:43:25 +00:00
Aditya Agarwal
d622e966d2 -- Thrift fixes
Summary:
-- Made read buffering work (the buffer wasn't actually being used)
-- TServer now extends TRunnable (useful for testing)
-- Adding TLogging (the DEBUG and ERROR macros that we all know and love)

Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664824 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:42:49 +00:00
Mark Slee
99e2b2639a PHP Thrift improvements, Binary code skipping, etc
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664821 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:42:29 +00:00
Mark Slee
7d5da16362 Thrift Java HTTP client
line, and those below, will be ignored--

A    java/src/transport/THttpClient.java


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664820 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:38:25 +00:00
Mark Slee
97b47dff3f Python framed thrift transports
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664819 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:38:05 +00:00
Mark Slee
2f6404d9ae C++ Thrift coding style changes
Summary: Make underscore for class members consistent


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664818 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:37:40 +00:00
Mark Slee
3f11b7a75d Better randomization in socketpoool
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664815 13f79535-47bb-0310-9956-ffa450edef68
2006-10-04 19:02:03 +00:00
Mark Slee
d7cc1c4e63 Suppress php errors in TSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664814 13f79535-47bb-0310-9956-ffa450edef68
2006-10-04 16:49:07 +00:00
Mark Slee
3c4d7fd053 Thrift missing python threading import
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664813 13f79535-47bb-0310-9956-ffa450edef68
2006-10-02 17:53:20 +00:00
Mark Slee
4f0fed6c76 Python basic threaded server
Reviewed By: ccheever-pillar


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664812 13f79535-47bb-0310-9956-ffa450edef68
2006-10-02 17:50:08 +00:00
Mark Slee
2905078d16 Better socket timeout and options support for Thrift C++
Summary: Also compile without degugging symbols for the linked library

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664810 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 00:12:30 +00:00
Mark Slee
29f5f67e1f Check for empty buf on socket read
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664809 13f79535-47bb-0310-9956-ffa450edef68
2006-09-28 03:19:03 +00:00
Mark Slee
845fe3da64 Add better socket linger, tcp_nodelay and timeout handling to thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664807 13f79535-47bb-0310-9956-ffa450edef68
2006-09-27 20:51:11 +00:00
Mark Slee
9ffe9d426c Set linger off and nodelay true on accepted ServerSockets
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664806 13f79535-47bb-0310-9956-ffa450edef68
2006-09-27 20:40:23 +00:00
Mark Slee
5bcde6eba9 Add socket and server socket timeout support to thrift java
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664804 13f79535-47bb-0310-9956-ffa450edef68
2006-09-27 17:50:32 +00:00