Commit Graph

172 Commits

Author SHA1 Message Date
Mark Slee
a6b48ea7ce Rename test files to .cpp instead of .cc
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664830 13f79535-47bb-0310-9956-ffa450edef68
2006-10-12 04:04:11 +00:00
Mark Slee
65681d061e Generate .cpp files instead of .cc in Thrift
Reviewed By: aditya

Notes: Be consistent on cpp, dunno why ever chose cc


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664829 13f79535-47bb-0310-9956-ffa450edef68
2006-10-12 03:58:49 +00:00
Mark Slee
4f8da1dfb4 Allow the specification of custom container types in Thrift IDL files
Summary: If you want your map to be a hash_map instead of an stl::map, we now have a directive in Thrift to let you do that.

Instead of:
map<i32,i32>

You can do:
map[cpp:hash_map<int32_t,int32_t>]<i32,i32>

This tells the Thrift compiler to explicitly use whatever type was specified in the brackets when generating C++ code, instead of the implied Thrift type.

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664828 13f79535-47bb-0310-9956-ffa450edef68
2006-10-12 02:47:27 +00:00
Aditya Agarwal
3950f47d6f -- Thrift testing changes
Summary:
-- Modified StressTest.thrift to work (it was out of date..) and added tests for TBufferedFileWriter
-- Modified Makefiles to use the correct lib directory

Reviewed By: Slee

Test Plan: This is the test.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664827 13f79535-47bb-0310-9956-ffa450edef68
2006-10-11 02:50:15 +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
b9acf98b33 Test code updates
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664823 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:57:32 +00:00
Mark Slee
f5377b3e99 Thrift compiler code cleanup, comments, php inline generation, etc
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664822 13f79535-47bb-0310-9956-ffa450edef68
2006-10-10 01:42:59 +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
96a6bbec1a Python remote printing fix
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664817 13f79535-47bb-0310-9956-ffa450edef68
2006-10-06 22:43:29 +00:00
Mark Slee
748e576f6c Python generator to make __str__ and __repr__ methods for generated structs
Summary: Also generate a nice command line -remote utility like pillar

Reviewed By: ccheever


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664816 13f79535-47bb-0310-9956-ffa450edef68
2006-10-04 21:51:05 +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
f77ff06a3b Prefix php names with service_ to avoid naming conflicts and use False not false in python
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664811 13f79535-47bb-0310-9956-ffa450edef68
2006-09-29 21:33:55 +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
6979bdb557 Use vector<> instead of list<> in Thrift-gen'd C++ code
Summary: vector kindly provides [] access

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664808 13f79535-47bb-0310-9956-ffa450edef68
2006-09-27 22:11:45 +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
fdbee8102d Thrift compiler to tokenize args by " " so you can use script files
Summary: if you do #!/usr/local/bin/thrift --php --cpp it shows up as one arg: "--php --cpp" so you need to tokenize that


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664805 13f79535-47bb-0310-9956-ffa450edef68
2006-09-27 18:50:48 +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
Mark Slee
1c4a559bc1 Change thrift require_once to include_once
Summary: As per Lucas' request

Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664803 13f79535-47bb-0310-9956-ffa450edef68
2006-09-25 21:32:05 +00:00
Mark Slee
c2e8ff5ae6 Fix potential multithreading protocol issue in Thrift Java
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664802 13f79535-47bb-0310-9956-ffa450edef68
2006-09-22 16:57:38 +00:00
Mark Slee
20c70a67be Ooops function __construct not just __construct
Reviewed By: lucas


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664801 13f79535-47bb-0310-9956-ffa450edef68
2006-09-21 01:26:28 +00:00
Mark Slee
9a89f9b7c7 Fix typo, missing underscore in thrift compiler variable
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664800 13f79535-47bb-0310-9956-ffa450edef68
2006-09-20 02:41:24 +00:00
Mark Slee
794993d278 Change run() to serve() in all Thrift server interfaces
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664799 13f79535-47bb-0310-9956-ffa450edef68
2006-09-20 01:56:10 +00:00
Mark Slee
dc8a2a2fc7 Use GNU Net implementation of htnoll and ntohll
Reviewed By: shire


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664798 13f79535-47bb-0310-9956-ffa450edef68
2006-09-19 22:20:18 +00:00
Mark Slee
4e755cae58 Thrift: Rename run() to serve() in java interfaces
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664797 13f79535-47bb-0310-9956-ffa450edef68
2006-09-12 00:46:08 +00:00
Mark Slee
9e7734dada Thrift: Rename chunked to framed transports
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664796 13f79535-47bb-0310-9956-ffa450edef68
2006-09-08 03:51:34 +00:00
Mark Slee
ade2c83d11 Thrift PHP TSocketPool client
Summary: Client that connects to one of an arbitrary pool of servers

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664795 13f79535-47bb-0310-9956-ffa450edef68
2006-09-08 03:41:50 +00:00
Mark Slee
018b6998d6 Thrift: generate Processors not Servers
Summary: Because the gen'd code isn't actually a server

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664794 13f79535-47bb-0310-9956-ffa450edef68
2006-09-07 21:31:12 +00:00
Mark Slee
aff9f8e3cf Thrift: generate python dictionaries and STL maps for server side process function lookups
Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664793 13f79535-47bb-0310-9956-ffa450edef68
2006-09-07 21:18:27 +00:00
Mark Slee
d788b2e046 Thrift TTransportFactory model for servers
Summary: Servers need to create bufferedtransports etc. around the transports they get in a user-definable way. So use a factory pattern to allow the user to supply an object to the server that defines this behavior.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664792 13f79535-47bb-0310-9956-ffa450edef68
2006-09-07 01:26:35 +00:00
Mark Slee
ffcddd688a Thrift multithreaded Java server
Summary: Ported the Pillar multithreaded Java server to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664791 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 20:37:03 +00:00
Aditya Agarwal
450585b74b -- search per-user lib dir first
Summary:
-- this should fix the library mismatch issue..

From the gcc linking guide:

LIBRARY_PATH
           The value of LIBRARY_PATH is a colon-separated list of directories,
           much like PATH.  When configured as a native compiler, GCC tries
           the directories thus specified when searching for special linker
           files, if it can't find them using GCC_EXEC_PREFIX.  Linking using
           GCC also uses these directories when searching for ordinary
           libraries for the -l option (but directories specified with -L come
           first).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664790 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 04:19:47 +00:00
Mark Slee
c98d050d65 Thrift: Added support for double type across all languages
Summary: Just for completeness cause I'm crazy. Let's never use these!

Notes: Also made thrift grammar support # style comments, so you can do this at the top of your files

#!/usr/local/bin/thrift --cpp

/**
 * This is a thrift def file youc an invoke directly and gen code!
 */

blah


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664789 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 02:42:25 +00:00
Aditya Agarwal
68db166dd4 -- more thrift Makefile changes
Reviewed By: Slee


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664788 13f79535-47bb-0310-9956-ffa450edef68
2006-09-06 00:18:29 +00:00
Aditya Agarwal
085267d60c -- added stubs for readEnd() and writeEnd()
Summary:
-- these are hook points that thrift_logger/logfile will integrate with..

Reviewed By: McSlee

Test Plan: Generated thrift code

Notes:
-- Thrift logfiles are soon coming to a netapp near you!


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664787 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 22:49:53 +00:00
Aditya Agarwal
0cc0c0ab6c -- generalize Makefile
Summary:
-- dont use /usr/local as the thrift directory now that multiple ppl are developing on dev007

Reviewed By: McSlee

Test Plan: Tested by making and cleaning


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664786 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 22:38:13 +00:00
Mark Slee
d2655523ab Thrift: Change Java/C++ server generation
Summary: Servers shouldn't implement iface directly, instead should contain an iface object


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664785 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 22:09:57 +00:00
Mark Slee
f5f2be46a3 Thrift: standardize coding style
Summary: Standardize indentation, spacing, #defines etc.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664784 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 21:05:31 +00:00
Mark Slee
c9676569ad Thrift Python server code generation
Summary: Yep, it's up and running. We now have full client/server support in all of C++ Java PHP and Python. Well, not quite... there's no PHP server, but honestly who wants one? Actually, if we do want one the framework will support writing is as a PHP file that can be served in apache like a web service (i.e. restserver.php would be thriftserver.php). But now that's rambling and nothing to do with this commit.

Notes: cheever, let's chat about porting your multithreaded Pillar Python server over to Thrift


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664783 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 17:34:52 +00:00
Mark Slee
4ecbebc099 Add multiserver generation to C++ Thrift
Summary: Autogen server that can encapsulates multiple server instances

Reviewed By: aditya


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664782 13f79535-47bb-0310-9956-ffa450edef68
2006-09-05 00:14:21 +00:00
Mark Slee
aeac1926f2 Thrift, Make sure gen'd code initializes empty containers in php / python
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664781 13f79535-47bb-0310-9956-ffa450edef68
2006-09-04 00:20:24 +00:00