Summary: Java Strings have to have an encoding, they can't just be binary. The constructor and getBytes() method enforce this, so we are standardizing on UTF-8 to avoid string-mangling.
Reviewed By: dreiss
Test Plan: Code all works the exact same in the normal case, and doesn't mangle characters beyond ASCII or ISO-LATIN-1
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665321 13f79535-47bb-0310-9956-ffa450edef68
Summary: This is the php equivalent of the cpp TMemoryBuffer.
It is simply a transport that stores read and fetches write
requests to and from a string.
Trac Bug: #
Blame Rev:
Reviewed By: dreiss
Test Plan: Tested using thrift de/serialization. Wrote thrift objeccts
to the buffer and then read them later to resconstruct them.
Tested exceptional cases.
Revert Plan: ok
Database Impact: none
Memcache Impact: none
Other Notes:
EImportant:
- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665320 13f79535-47bb-0310-9956-ffa450edef68
Summary: Turns out they're different, oops
Reviewed By: marcel
Test Plan: recompile, reinstall, synapse:tablet.get() on a nonexistent cell (which returns an empty string)
Revert: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665318 13f79535-47bb-0310-9956-ffa450edef68
Summary:
How many times has no one else been able to use your awesome Python script
because the Thrift generated files are in a directory that they can't access?
Never again! We now create directories with mode 0777.
Of course, your process umask will ensure that they are actually created
with mode 0755. (This is how the mkdir command works.)
Reviewed By: mcslee
Test Plan:
Rebuilt thrift, then did this:
dreiss@dreiss-vmware:dir_mode:thrift/test$ rm -rf gen-*
dreiss@dreiss-vmware:dir_mode:thrift/test$ thrift -cpp -java -php -py ThriftTest.thrift
dreiss@dreiss-vmware:dir_mode:thrift/test$ ls -ld gen-*
drwx------ 2 dreiss dreiss 4096 2007-10-18 12:20 gen-cpp
drwx------ 3 dreiss dreiss 4096 2007-10-18 12:20 gen-java
drwx------ 2 dreiss dreiss 4096 2007-10-18 12:20 gen-php
drwx------ 3 dreiss dreiss 4096 2007-10-18 12:20 gen-py
dreiss@dreiss-vmware:dir_mode:thrift/test$ rm -rf gen-*
dreiss@dreiss-vmware:dir_mode:thrift/test$ ../compiler/cpp/thrift -cpp -java -php -py ThriftTest.thrift
dreiss@dreiss-vmware:dir_mode:thrift/test$ ls -ld gen-*
drwxr-xr-x 2 dreiss dreiss 4096 2007-10-18 12:20 gen-cpp
drwxr-xr-x 3 dreiss dreiss 4096 2007-10-18 12:20 gen-java
drwxr-xr-x 2 dreiss dreiss 4096 2007-10-18 12:20 gen-php
drwxr-xr-x 3 dreiss dreiss 4096 2007-10-18 12:20 gen-py
dreiss@dreiss-vmware:dir_mode:thrift/test$
Revert Plan: ok
Other Notes:
With some help from external contributor Ben Maurer.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665317 13f79535-47bb-0310-9956-ffa450edef68
Summary: if "cond and cond ->" is not valid erlang,
if "cond andalso cond ->" is.
Reviewed By: cpiro
Test Plan: generated erlang from and thrift file with structs ...
generated code compiles
Revert Plan: sure
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665314 13f79535-47bb-0310-9956-ffa450edef68
Summary: Adds php code generation to take advantage of the php
'thrift_protocol' extension (currently for deserialization only)
Requires you to swap your protocol for a TBinaryProtocolAccelerated
(which just inherits TBinaryProtocol without actually adding any
new functionality) and that you use a TFramedTransport or wrap your
transport in a TBufferedTransport.
TBinaryProtocolAccelerated is currently only in tfb/www/lib (or will
be momentarily).
Reviewed By: mcslee
Test Plan: synapse_feed uses this in my sandbox, works fine
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665313 13f79535-47bb-0310-9956-ffa450edef68
Summary: Implement a deserializer for thrift integral types and containers
in C++ for extra performance. To be combined with compiler support to
generate code that uses the extension + TBinaryProtocolAccelerated to
enable it.
Reviewed By: mcslee
Test Plan: runs fine in my sandbox...
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665312 13f79535-47bb-0310-9956-ffa450edef68
Summary: Allows setting the output directory via the new '-o dir' cmdline option.
TSCons is updated to use this to put the output in the right place no matter
the cwd, so doing dependent builds from different directories won't break.
Reviewed By: martin
Test Plan: mkdir /tmp/honk; thrift -cpp -java -javabean -php -phpi -py -rb -xsd -perl -erl -ocaml -hs -cocoa -o /tmp/honk Tablet.thrift
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665311 13f79535-47bb-0310-9956-ffa450edef68
Summary: Need to check for != nil, not just boolean expression
Reviewed By: mcslee
Test Plan: Send a boolean "false" value
Other Notes: Patch submitted by Patrick Collison
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665310 13f79535-47bb-0310-9956-ffa450edef68
Summary:
External patch from Andrew McGeachie.
Just shuffle the Cocoa library files around.
Reviewed By: mcslee
Test Plan: In Andrew we trust.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665309 13f79535-47bb-0310-9956-ffa450edef68
Summary: I patterned some config stuff after iserve, but Erlang's built-in stuff is better
Reviewed By: gopher
Test Plan: works with recent ch server
Revert Plan: ok
Other Notes: default config given in thrift.app
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665307 13f79535-47bb-0310-9956-ffa450edef68
Summary: This was still sending/expecting the old style (no version field); should be fixed now.
Reviewed By: mcslee
Test Plan: build and use Tablemaster and Tablet interfaces with gen-phpi
Revert: svn
DiffCamp Revision: 1435
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665306 13f79535-47bb-0310-9956-ffa450edef68
Summary: pushed all formatting out of thrift_error_logger.erl, reenable crash logs, standardize
Reviewed By: eletuchy
Test Plan: works with latest ch server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665305 13f79535-47bb-0310-9956-ffa450edef68
Summary: "Porting" this feature from PHP; I find it useful in the Synapse client.
Reviewed By: mcslee
Test Plan: It compiles, ship it!
Revert: svn
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665304 13f79535-47bb-0310-9956-ffa450edef68
Summary: more robust logic theres
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
Other Notes: the precommit hooks should forbid out-of-towners from being cited as reviewers
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665301 13f79535-47bb-0310-9956-ffa450edef68
Summary: the client structures aren't oop objects, they're vanilla records ... adjust accordingly
Reviewed By: eletuchy
Test Plan: ok
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665300 13f79535-47bb-0310-9956-ffa450edef68
Summary: oop.erl used to assume that an undef or function_clause meant a method wasn't defined, but sometimes a method does exist and an undef happens while it's executing.
Case in point, getTransport in tBufferedTransportFactory totally didn't work and instead of exiting, oop.erl fell back silently to tTransportFactory, so everywhere I thought I was talking to tBufferedTransport, I was talking directly to the tSocket. borkborkbork.
Blame: all me baby
Reviewed By: eletuchy
Test Plan: channel server works
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665299 13f79535-47bb-0310-9956-ffa450edef68
Summary: Same thing as the previous PHP change. Also includes a new constructor for easy building of a TSocketPool with a single host (for later filling in via addServer) without extra std::vector boxing/unboxing.
Reviewed By: mcslee
Test Plan: Synapse c++ client at r62896 uses this.
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 909
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665297 13f79535-47bb-0310-9956-ffa450edef68
Summary: kind of funny ... exact same patch as for the Ruby version; both were unexposed until I tried using reflection_limited
Test Plan: thx but nothx
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665295 13f79535-47bb-0310-9956-ffa450edef68
Summary: Submitted by Ben Maurer
Reviewed By: dreiss
Test Plan: Automated python testing for Thrift, lovely.
Revert: OK
DiffCamp Revision: 737
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665293 13f79535-47bb-0310-9956-ffa450edef68
Summary:
We have this in C++. Adding an implementation for PHP.
Reviewed By: mcslee
Test Plan:
Used it while testing web code.
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665292 13f79535-47bb-0310-9956-ffa450edef68
Summary: non-service types live in the top-level namespace, so look for them there. example from FacebookService.rb (accessing Service from reflection_limited_types.rb):
FIELDS = {
- 0 => {:type => TType::STRUCT, :name => 'success', :class => reflection_limited_types.Service}
+ 0 => {:type => TType::STRUCT, :name => 'success', :class => Service}
}
preferable to adding a "module honk_types ... end" around honk_types.rb ... non-service types should land in top-level space (or whatever ruby_namespace has been defined). if ruby_namespace even works ... who knows
Reviewed By: mcslee
Test Plan: now reflection_limited works with my simple Ruby client
honestly, there's no test suite for these? TODO:cpiro
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 735
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665291 13f79535-47bb-0310-9956-ffa450edef68
Summary:
just some simple styling changes. moving using boost::shared_ptr to .cpp
and using the full path name in .h
Reviewed by: boz, dreiss
Test Plan: compiled and tested on the adfinder
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665289 13f79535-47bb-0310-9956-ffa450edef68
Summary: all module names must be capitalized in Ruby -- if the enum name from the interface isn't capitalized \
then it's a runtime error, e.g. in fb303_types.rb:
-module fb_status
+module Fb_status
Reviewed By: mcslee
Test Plan: fb303 now works with Ruby binding
Revert: OK
TracCamp Project: Thrift
DiffCamp Revision: 692
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665288 13f79535-47bb-0310-9956-ffa450edef68
Summary: Python on 32-bit platforms 2.4+ wants to keep hexconstants positive, therefore converting 0x800000000 to a (long) type to keep that. This causes issues when performing comparison with a signed negative integer.
Reviewed By: dreiss
Test Plan: Python on 32 bit 2.4+ system making Thrift calls
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665287 13f79535-47bb-0310-9956-ffa450edef68
Summary: a small victory in the neverending quest of OTPifying this binding -- search for config files in ./conf/ (relative to the cwd of the emulator). for example, when you start the channel server, ./conf/{channel,thrift}.conf should exist. better than having to recompile to change a configuration ... reconfig should take care of that in running code.
Test Plan: works with channel server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665284 13f79535-47bb-0310-9956-ffa450edef68
Summary: we need to use a shared_ptr instead of an old fashioned one if we're
going to stick with this PIMPL model
Reviewed By: dreiss, marc
Test Plan: test program didn't fail or leak memory, foreman (fb303 client)
worked without problem
Revert Plan: just make sure you find some other solution to this problem
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665280 13f79535-47bb-0310-9956-ffa450edef68
Summary: also added myself to CONTRIBUTORS.
Reviewed By: marc
Test Plan: the following program no longer leaks memory (valgrind):
int main(int argc, char **argv){
Mutex mu;
mu.lock();
mu.unlock();
}
Revert Plan: ok
Notes: this is kind of important
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665279 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- make dist is no fun. Had to add a lot of stuff to Makefile.am to
make sure stuff got included in the tarball.
- Added a permanent NEWS file with the release notes for this release.
- clean.sh removes ylwrap also.
- Gave it a real version for make dist.
- Added ACLOCAL_AMFLAGS to lib/cpp/Makefile.am to make it easier to
work on configure.ac.
- Made concurrency_test a non-installed binary because
no one wants to install it.
- Dropped some symlinks that were annoying make dist.
- Updated README.
Test Plan:
./bootstrap.sh && ./configure && make dist
Compared contents of tarball to source tree.
Did this from a fresh git tree so no gross untracked files would be around.
On devrs: ./bootstrap.sh && ./configure && make install DESTDIR=/tmp/relinst1
Made sure concurrency_test was built but not installed.
Checked zlib URL with firefox.
Reviewed By: mcslee
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665274 13f79535-47bb-0310-9956-ffa450edef68
Summary:
* got rid of most of the otp_base jonx ... save that for a future release unfortunately
* cleaned up the tutorial server, added -erl to tutorial.thrift's shebang
* made better README and TODO
Test Plan: checked out a copy, read my directions, built and ran the tutorial, and pretended that it didn't blow
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665273 13f79535-47bb-0310-9956-ffa450edef68