common/thrift.git
17 years agoFix for IPv6 Python sockets binding localhost problem
Mark Slee [Fri, 27 Jul 2007 18:56:56 +0000 (18:56 +0000)] 
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

17 years ago-- remove default seekToEnd
Aditya Agarwal [Fri, 27 Jul 2007 07:04:49 +0000 (07:04 +0000)] 
-- 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

17 years agoThrift: Catch what you throw.
David Reiss [Fri, 27 Jul 2007 00:40:19 +0000 (00:40 +0000)] 
Thrift: Catch what you throw.

Summary:
Catch an exception that was being thrown,
and print out the error message.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Recompiled Thrift.
Ran it on a broken .thrift that throws one of these exceptions.

Revert Plan: ok

Notes:

EImportant:

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

17 years agoThrift: Cleaned up whitespace.
David Reiss [Thu, 26 Jul 2007 21:10:32 +0000 (21:10 +0000)] 
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

17 years ago[thrift] maps, lists, sets, and service inheritance for Erlang
Christopher Piro [Wed, 25 Jul 2007 22:41:00 +0000 (22:41 +0000)] 
[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

17 years agoThrift: Haskell library and codegen
iproctor [Wed, 25 Jul 2007 19:06:13 +0000 (19:06 +0000)] 
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

17 years agoThrift: Ruby cogeden not creating exception fields properly.
iproctor [Wed, 25 Jul 2007 18:50:50 +0000 (18:50 +0000)] 
Thrift: Ruby cogeden not creating exception fields properly.

Summary: Generated ruby code did not give exception struct fields a class. This broke the result structs for all functions that threw exceptions.
Reviewed by: mcslee
Test plan: Yes
Revert plan: yes

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

17 years agoSummary: TSocket shouldn't let you set the timeout before it's got a valid handle
James Wang [Tue, 24 Jul 2007 23:59:51 +0000 (23:59 +0000)] 
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

17 years agoThrift: OCaml library binary protocol fix
iproctor [Tue, 24 Jul 2007 19:47:55 +0000 (19:47 +0000)] 
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

17 years ago[thrift] stupid case bug in Erlang codegen
Christopher Piro [Tue, 24 Jul 2007 06:20:47 +0000 (06:20 +0000)] 
[thrift] stupid case bug in Erlang codegen

Summary: stop generating files/modules in titlecase

Notes: somehow we access service_name_ before the constructor downcases it ... burnsauce

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

17 years ago[thrift] misc. Erlang codegen improvements, cleanups
Christopher Piro [Tue, 24 Jul 2007 04:30:15 +0000 (04:30 +0000)] 
[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

17 years agoReadding seekToEnd() call to openLogFile() temporarily so that search doesn't break
James Wang [Mon, 23 Jul 2007 17:35:32 +0000 (17:35 +0000)] 
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

17 years agoSummary: Changing TFileTransport to not go to end of file by default
James Wang [Sun, 22 Jul 2007 05:48:12 +0000 (05:48 +0000)] 
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

17 years agoThrift: Debug Protocol
David Reiss [Sat, 21 Jul 2007 01:18:10 +0000 (01:18 +0000)] 
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

17 years agoThrift: add an indent to generated cpp files.
David Reiss [Sat, 21 Jul 2007 00:23:32 +0000 (00:23 +0000)] 
Thrift: add an indent to generated cpp files.

Summary:
Someone forgot an indent after a newline.  Added.

Trac Bug: #

Blame Rev:

Reviewed By: mcslee

Test Plan:
Compiled the compiler, compiled a .thrift, and compared the output
with diff -u and diff -w -u.

Revert Plan: svn revert

Notes:

EImportant:

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

17 years ago[thrift] highly concurrent Erlang goodness
Christopher Piro [Wed, 18 Jul 2007 00:26:12 +0000 (00:26 +0000)] 
[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

17 years agoThrift: OCaml library and generator
iproctor [Mon, 16 Jul 2007 21:59:24 +0000 (21:59 +0000)] 
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

17 years ago[scope lock wrapped for ReadWriteMutex]
yunfang [Sat, 14 Jul 2007 01:23:05 +0000 (01:23 +0000)] 
[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

17 years agoAdd typecasting to REST parameters in generated Thrift PHP code
Mark Slee [Tue, 10 Jul 2007 16:48:37 +0000 (16:48 +0000)] 
Add typecasting to REST parameters in generated Thrift PHP code

Trac Bug: #4360

Reviewed By: ari

Test Plan: Honky tonk, view the new generated api_10/x packages

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

17 years agoFix SET serialization borked-ness in Thrift
Mark Slee [Tue, 10 Jul 2007 00:49:04 +0000 (00:49 +0000)] 
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

17 years agoremoving test file
peterm [Tue, 10 Jul 2007 00:22:20 +0000 (00:22 +0000)] 
removing test file
peterm

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

17 years agopeterm - testing repo sync
peterm [Tue, 10 Jul 2007 00:08:20 +0000 (00:08 +0000)] 
peterm - testing repo sync

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

17 years agoFix addrinfo structure memory leak in TSocket
Mark Slee [Mon, 9 Jul 2007 19:50:30 +0000 (19:50 +0000)] 
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

17 years agosys_errlist is deprecated.
Martin Kraemer [Mon, 9 Jul 2007 19:08:25 +0000 (19:08 +0000)] 
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

17 years agoTSocket IPv6 support for C++
Mark Slee [Fri, 6 Jul 2007 22:28:15 +0000 (22:28 +0000)] 
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

17 years agoTHRIFT ReadWriteMutex
boz [Fri, 6 Jul 2007 22:27:52 +0000 (22:27 +0000)] 
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

17 years agoPython IPv6 support for TSocket
Mark Slee [Fri, 6 Jul 2007 22:20:19 +0000 (22:20 +0000)] 
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

17 years agoFixed possible Thrift serialization bug
David Reiss [Fri, 6 Jul 2007 21:43:48 +0000 (21:43 +0000)] 
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

17 years agoLots of Ruby code generation improvements
Mark Slee [Fri, 6 Jul 2007 02:45:25 +0000 (02:45 +0000)] 
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

17 years agoMake -rest an optional param to the Thrift PHP compiler
Mark Slee [Fri, 6 Jul 2007 00:30:21 +0000 (00:30 +0000)] 
Make -rest an optional param to the Thrift PHP compiler

Summary: You rarely need the generated REST stuff

Reviewed By: jwang

Test Plan: Gen falcon code without REST part

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

17 years ago[thrift] small typo in tserver.rb
Christopher Piro [Mon, 2 Jul 2007 06:35:10 +0000 (06:35 +0000)] 
[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

17 years agoRuby test code fix, and BNF file for protocol
Mark Slee [Sat, 30 Jun 2007 01:18:12 +0000 (01:18 +0000)] 
Ruby test code fix, and BNF file for protocol

Reviewed By: aditya

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

17 years agoThrift: THttpClient for PHP in Thrift trunk
Mark Slee [Fri, 29 Jun 2007 23:15:00 +0000 (23:15 +0000)] 
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

17 years ago[thrift] preliminary Erlang support (initial import)
Christopher Piro [Fri, 29 Jun 2007 07:17:33 +0000 (07:17 +0000)] 
[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

17 years agotypo in tutorial/rb/RubyServer.rb
Christopher Piro [Thu, 28 Jun 2007 01:09:22 +0000 (01:09 +0000)] 
typo in tutorial/rb/RubyServer.rb

Reviewed By: mcslee

Test Plan:

Revert Plan:

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

17 years agoRemoving protocol.txt
Mark Slee [Tue, 26 Jun 2007 20:19:56 +0000 (20:19 +0000)] 
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

17 years ago-- make sure TFileTransport always starts at EOF
Aditya Agarwal [Tue, 26 Jun 2007 02:57:04 +0000 (02:57 +0000)] 
-- 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

17 years ago[thrift] java httpclient needs to close its inputstream
eletuchy [Mon, 25 Jun 2007 18:29:28 +0000 (18:29 +0000)] 
[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

17 years agoRuby TBinaryProtocol fix
Mark Slee [Sat, 23 Jun 2007 00:08:13 +0000 (00:08 +0000)] 
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

17 years agoTeensy insignificant thrift bug
Mark Slee [Fri, 22 Jun 2007 19:43:12 +0000 (19:43 +0000)] 
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

17 years agoIdiotic typos in Python code
Mark Slee [Fri, 22 Jun 2007 01:03:55 +0000 (01:03 +0000)] 
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

17 years agoThrift TBinaryProtocol change
Mark Slee [Wed, 20 Jun 2007 21:51:57 +0000 (21:51 +0000)] 
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

17 years ago[thrift] Add optional callback inside of serve()
dweatherford [Tue, 19 Jun 2007 23:10:19 +0000 (23:10 +0000)] 
[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

17 years agoWhitespace fixes on test code
Mark Slee [Fri, 15 Jun 2007 01:45:56 +0000 (01:45 +0000)] 
Whitespace fixes on test code

Reviewed By: thrift

Test Plan: Whitespace

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

17 years agoMissing variable in initializer list for TNonblockingServer constructor
Mark Slee [Fri, 15 Jun 2007 01:43:21 +0000 (01:43 +0000)] 
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

17 years ago[thrift] small fixes to java generator
eletuchy [Wed, 13 Jun 2007 04:24:11 +0000 (04:24 +0000)] 
[thrift] small fixes to java generator

Summary: - size generated collections correctly
         - StringBuilder vs StringBuffer

Reviewed By: mcslee

Test Plan: built TestThrift.thrift; it compiled, yay

Revert Plan: sure

Notes:

EImportant:

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

17 years agoDarwin endianness junk
Mark Slee [Sat, 9 Jun 2007 01:23:04 +0000 (01:23 +0000)] 
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

17 years agoAdd thread pool option to NonblockingServer
Mark Slee [Sat, 9 Jun 2007 01:21:16 +0000 (01:21 +0000)] 
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

17 years agoTHRIFT: generic output handler
boz [Tue, 5 Jun 2007 22:41:18 +0000 (22:41 +0000)] 
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

17 years agoModified PosixThreadFactory
Marc Slemko [Tue, 5 Jun 2007 22:20:14 +0000 (22:20 +0000)] 
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

17 years agoModified PosixThreadFactory::PThread:
Marc Slemko [Mon, 4 Jun 2007 21:01:19 +0000 (21:01 +0000)] 
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

17 years agoForgot to add ProcessorFactory
Mark Slee [Fri, 1 Jun 2007 23:04:09 +0000 (23:04 +0000)] 
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

17 years agoTHRIFT: ADITYASLOP
boz [Thu, 31 May 2007 23:38:37 +0000 (23:38 +0000)] 
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

17 years agoMemory buffer for perl
Mark Slee [Thu, 31 May 2007 02:30:34 +0000 (02:30 +0000)] 
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

17 years ago-- handle EINTRS in accept()
Aditya Agarwal [Thu, 31 May 2007 01:33:07 +0000 (01:33 +0000)] 
-- 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

17 years agoProcessorFactory for Java
Mark Slee [Thu, 31 May 2007 01:30:22 +0000 (01:30 +0000)] 
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

17 years agoGet the long longs out of the Thrift codebase
Mark Slee [Wed, 23 May 2007 05:16:07 +0000 (05:16 +0000)] 
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

17 years agomcslee: being nitpicky ensuring consistent coding style
Mark Slee [Wed, 23 May 2007 04:55:30 +0000 (04:55 +0000)] 
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

17 years ago-- fix read timeout handling in TSocket
Aditya Agarwal [Wed, 23 May 2007 02:14:58 +0000 (02:14 +0000)] 
-- 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

17 years agoModified facebook::thrift::concurrency::Monitor.wait:
Marc Slemko [Tue, 22 May 2007 23:59:54 +0000 (23:59 +0000)] 
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

18 years agoNeed using namespace boost in thrift threads test
Mark Slee [Wed, 16 May 2007 21:22:34 +0000 (21:22 +0000)] 
Need using namespace boost in thrift threads test

Reviewed By: jake luciani

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

18 years agoAdd Jake Luciani to contributors list
Mark Slee [Wed, 16 May 2007 02:45:16 +0000 (02:45 +0000)] 
Add Jake Luciani to contributors list

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

18 years agoFix Thrift perl framedtransport
Mark Slee [Wed, 16 May 2007 02:44:21 +0000 (02:44 +0000)] 
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

18 years agoPerl tutorial code
Mark Slee [Wed, 16 May 2007 02:40:12 +0000 (02:40 +0000)] 
Perl tutorial code

Summary: Jake Luciani

Reviewed By: mcslee

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

18 years agoAdding perl testclient code
Mark Slee [Wed, 16 May 2007 02:35:58 +0000 (02:35 +0000)] 
Adding perl testclient code

Summary: Submitted by Jake Luciani

Reviewed By: mcslee

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

18 years agoSome filetransport indentation and style fixes
Mark Slee [Wed, 16 May 2007 02:31:53 +0000 (02:31 +0000)] 
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

18 years agoApply thrift license to all files in compiler
Mark Slee [Wed, 16 May 2007 02:29:53 +0000 (02:29 +0000)] 
Apply thrift license to all files in compiler

Summary: Forgot to do this last time around, only got the libs

Reviewed By: no code in here, just comments

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

18 years agoPerl library for Thrift
Mark Slee [Wed, 16 May 2007 02:21:06 +0000 (02:21 +0000)] 
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

18 years agoPerl generator for Thrift compiler
Mark Slee [Wed, 16 May 2007 02:18:07 +0000 (02:18 +0000)] 
Perl generator for Thrift compiler

Summary: Submitted by Jake Luciani

Reviewed By: mcslee

Test Plan: Who likes perl? Not me. Test files to be checked in soon.

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

18 years agoThrift Syntax for Vim
Martin Kraemer [Tue, 15 May 2007 23:24:30 +0000 (23:24 +0000)] 
Thrift Syntax for Vim

Summary:
See header of file for installation instructions.  I'm not a vim master so this may not
be completely kosher, feel free to improve as necessary.

Reviewed By: Slee

Test Plan:

Revert Plan:

Notes:

EImportant:

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

18 years agoTHRIFT: configurable retry settings for bind
boz [Mon, 14 May 2007 23:04:33 +0000 (23:04 +0000)] 
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

18 years agoHaiping made an emacs .el file for Thrift
Mark Slee [Fri, 11 May 2007 23:46:42 +0000 (23:46 +0000)] 
Haiping made an emacs .el file for Thrift

Summary: Now that is just awesome.

Reviewed By: haiping

Test Plan: Use it or lose it.

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

18 years agoFix messed up exception error printing
Mark Slee [Fri, 11 May 2007 17:58:54 +0000 (17:58 +0000)] 
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

18 years agothrift: cpp tsocketpool support
jsobel [Tue, 8 May 2007 17:51:49 +0000 (17:51 +0000)] 
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

18 years agoTEOFException must publicly inherit TTransportException
Mark Slee [Mon, 7 May 2007 22:54:18 +0000 (22:54 +0000)] 
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

18 years agoJava test client/server fixes
Mark Slee [Fri, 4 May 2007 18:49:56 +0000 (18:49 +0000)] 
Java test client/server fixes

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

18 years agoMake sure isset fields of java generated objects is public
Mark Slee [Thu, 3 May 2007 01:30:18 +0000 (01:30 +0000)] 
Make sure isset fields of java generated objects is public

Reviewed By: rob mccool from yahoo

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

18 years agofixing a typo
peter [Tue, 1 May 2007 04:03:22 +0000 (04:03 +0000)] 
fixing a typo

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

18 years agoThrift: Fixing memory leak issue with memory buffer used in TPipedTransport
James Wang [Tue, 17 Apr 2007 22:38:58 +0000 (22:38 +0000)] 
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

18 years agoThrift: Modifications to PeekProcessor to be able to support nested PeekProcessors
James Wang [Fri, 13 Apr 2007 20:10:39 +0000 (20:10 +0000)] 
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

18 years agoAdd explicit binary type to Thrift
Mark Slee [Fri, 13 Apr 2007 01:57:12 +0000 (01:57 +0000)] 
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

18 years agoCrazy byteswapping thrift patches from david reiss
Mark Slee [Fri, 13 Apr 2007 00:33:24 +0000 (00:33 +0000)] 
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

18 years agosprintf fix on C++ tutorial server
Mark Slee [Wed, 11 Apr 2007 09:16:23 +0000 (09:16 +0000)] 
sprintf fix on C++ tutorial server

Reviewed By: danli

Test Plan: hello

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

18 years agoFix messed up noninitialized things
Mark Slee [Wed, 11 Apr 2007 08:57:07 +0000 (08:57 +0000)] 
Fix messed up noninitialized things

Reviewed By: danli

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

18 years ago-- trying to make TFileTransport destructor quicker
Aditya Agarwal [Wed, 11 Apr 2007 00:13:09 +0000 (00:13 +0000)] 
-- 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

18 years ago-- fix issues with TFileTransport
Aditya Agarwal [Tue, 10 Apr 2007 23:15:04 +0000 (23:15 +0000)] 
-- 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

18 years agoThrift: Checking in readonly option for TFileTransport
James Wang [Tue, 10 Apr 2007 17:29:06 +0000 (17:29 +0000)] 
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

18 years agoYeeeeeeeeahhh
Mark Slee [Tue, 10 Apr 2007 06:44:53 +0000 (06:44 +0000)] 
Yeeeeeeeeahhh

Summary: Missing that $ in the vairable

Reviewed By: php

Test Plan: you need that!

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

18 years agoIn php generate array of enum values to string names
Mark Slee [Tue, 10 Apr 2007 06:15:25 +0000 (06:15 +0000)] 
In php generate array of enum values to string names

Summary: for peter k

Reviewed By: peter

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

18 years agoForgot to add Java tutorials to thrift
Mark Slee [Tue, 10 Apr 2007 02:30:30 +0000 (02:30 +0000)] 
Forgot to add Java tutorials to thrift

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

18 years ago-- check in updated pdf
Aditya Agarwal [Thu, 5 Apr 2007 01:20:45 +0000 (01:20 +0000)] 
-- check in updated pdf

Reviewed By: slee

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

18 years ago- fix typo in thrift whitepaper
Aditya Agarwal [Thu, 5 Apr 2007 01:17:52 +0000 (01:17 +0000)] 
- fix typo in thrift whitepaper

Summary:
clases -> classes

Reviewed By: scott m

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

18 years ago[thrift] Build fix for TFileTransport
dweatherford [Thu, 5 Apr 2007 00:20:40 +0000 (00:20 +0000)] 
[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

18 years agoOops typo.
Mark Slee [Wed, 4 Apr 2007 22:13:37 +0000 (22:13 +0000)] 
Oops typo.

Reviewed By: mcslee

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

18 years agoBuild fixes and clock_get_time copy from paul querna
Mark Slee [Wed, 4 Apr 2007 22:11:17 +0000 (22:11 +0000)] 
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

18 years agoThrift string copy construction pathces from kevin ko
Mark Slee [Wed, 4 Apr 2007 21:08:21 +0000 (21:08 +0000)] 
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

18 years agoTwo more thrift paper typos
Mark Slee [Wed, 4 Apr 2007 19:56:41 +0000 (19:56 +0000)] 
Two more thrift paper typos

Summary: libthread => libpthread and texttt{HashMap} missing slash

Reviewed By: david reiss

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

18 years agoFixing typos in the Thrift whitepaper
Mark Slee [Tue, 3 Apr 2007 19:47:04 +0000 (19:47 +0000)] 
Fixing typos in the Thrift whitepaper

Reviewed By: eugene, yishan

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

18 years agoFix build script reference problem
Mark Slee [Tue, 3 Apr 2007 07:31:51 +0000 (07:31 +0000)] 
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

18 years agoFix whitepaper typo
Mark Slee [Tue, 3 Apr 2007 05:49:12 +0000 (05:49 +0000)] 
Fix whitepaper typo

Reviewed By: ditka

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