Summary:
The Python and Java versions of "make check" only work if "make all" has
been run. Our automake-fu isn't strong enough to make proper dependencies,
so this hack suggested by Nitay will force the libraries to be built
before make check is run.
Test Plan: make check
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665497 13f79535-47bb-0310-9956-ffa450edef68
Summary:
Chad Walters is developing a full-featured JSON-based protocol for Java,
so we're renaming the existing protocol to something more descriptive.
I also edited the file to rename the class and add to the header comment.
I have no idea if Subversion does explicit rename tracking, or if
git svn is smart enough to mark renames as such, but I would predict
"yes" to both. Let's find out.
Reviewed By: mcslee, jssarma
Test Plan: Ran "ant" in lib/java
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665492 13f79535-47bb-0310-9956-ffa450edef68
Summary:
The upcoming TJSONProtocol handles string and binary types quite differently.
This change makes that distinction in all parts of the C++ binding.
Java already distinguished between string and binary, but this change
also updates the Java skip method to skip over strings as binary
so we don't get encoding errors when skipping binary data.
Reviewed By: mcslee
Test Plan: make check
Revert Plan: ok
Other Notes:
I just pulled this out of Chad Walters' JSON patch.
The only other change was adding readBinary (or was it writeBinary)
to TDenseProtocol. Maybe inheriting from TBinaryProtocol wasn't a good idea.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665481 13f79535-47bb-0310-9956-ffa450edef68
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.
Reviewed By: mcslee
Test Plan: git diff -b
Revert Plan: ok
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
Summary: Change the default to Executors.newCachedThreadPool() which is a good default and basically what we should always want.
Reviewed By: dreiss
Test Plan: Run a Java server with default args
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665424 13f79535-47bb-0310-9956-ffa450edef68
Summary: Read the documentation on ThreadPoolExecutor. It's very confusing. Basically, what we want is a queue that always defers to the threadpool and will always create a new thread to do work. We never want the queue to take priority over the thread pool by default.
Reviewed By: dreiss
Test Plan: Run a Java Thrift server
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665419 13f79535-47bb-0310-9956-ffa450edef68
Summary:
A feature to improve handling of invalid wire data by the Java Thrift library.
Reviewed By: mcslee
Test Plan: I trust Dave Engberg.
Revert Plan: ok
Other Notes:
Submitted by Dave Engberg.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665393 13f79535-47bb-0310-9956-ffa450edef68
Summary: TJSONProtocol for Java with write support and a TSerializer utility for easier conversion of Thrift objects into byte[] or strings.
Reviewed By: dreiss
Test Plan: Included a basic piece of this in test/ client for Java.
Revert: OK
DiffCamp Revision: 3890
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665367 13f79535-47bb-0310-9956-ffa450edef68
Summary: Same paradigm as in C++ model. Allow ServerTransport to be interrupted to block an accept loop and cleanly stop serving client requests.
Reviewed By: dreiss
Test Plan: Invoke shutdown() method on a TServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665322 13f79535-47bb-0310-9956-ffa450edef68
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: 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
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
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
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
Summary: There was really no need for these now that we are getting rid of unsigned, they should all just use the builtin int and long types
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664741 13f79535-47bb-0310-9956-ffa450edef68
Summary: The basic Thrift stack implemented in Java, still in need of a lot of work but fully functional.
Reviewed By: aditya
Test Plan: Unit tests are the NEXT checkin, I swear
Notes: Perf on the Java stuff actually isn't that bad, and it's far from optimized at the moment. Barely any tweaking has been done. Testing shows that a Java server with the C++ client has RPC performance within 2x of the pure C++ implementations. This is pretty sweet, since this cost will be eclipsed by the cost of whatever processing is being done on an actual server doing real work.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664715 13f79535-47bb-0310-9956-ffa450edef68