Commit Graph

70 Commits

Author SHA1 Message Date
Todd Lipcon
53ae9f39d5 THRIFT-622. Add appropriate licensing information to get Thrift ready for a release.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@887812 13f79535-47bb-0310-9956-ffa450edef68
2009-12-07 00:42:38 +00:00
David Reiss
b42361c2e9 THRIFT-574. erlang: Support framed transport for servers
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@813054 13f79535-47bb-0310-9956-ffa450edef68
2009-09-09 17:18:57 +00:00
David Reiss
1e1a697672 THRIFT-211. erlang: Support "tethered" clients
Add a client option that causes clients to monitor their creators
and terminate when the creator dies.  This makes it possible to
prevent client leaks without linking, because the latter causes
application code to be killed when a transport error occurs and
exits are not trapped.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781636 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:32 +00:00
David Reiss
bb97fd90a5 THRIFT-211. erlang: Allow clients to be created without connecting
Add a client option to prevent the initial connect (which causes
the protocol factory to be ignored).  The main use case for this
is testing the proper handling of clients that cannot connect.
Update the tether test to use this feature instead of a raw
gen_server:start call.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781635 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:28 +00:00
David Reiss
5e530af587 THRIFT-211. erlang: Support unlinked Thrift clients.
- Create a thrift_client:start function that accepts client options.
- Make start_link a wrapper that adds {monitor, link}.
- Add a test to make sure that everything dies or doesn't die as expected.
  (The test has to be run manually.)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@781634 13f79535-47bb-0310-9956-ffa450edef68
2009-06-04 02:01:24 +00:00
Bryan Duxbury
def30a6072 THRIFT-387. Add appropriate Apache header to all code files
This hits all the documentation and some misc code files that have avoided the license up to this point.



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@763048 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 00:19:37 +00:00
David Reiss
deda141392 THRIFT-388. Create a "ONEWAY" message type that is an alias for "CALL"
Pave the way for a new message type for oneway function calls.
For now, just define the constant in all languages and make
server implementations treat it the same way as a normal call.
Only C++ and Erlang currently check the message type (on the
server side).

There is a little bit of redundancy in the Erlang code, but
the alternative is a bit gross, and this split-up will be
necessary eventually when we start handling one-way calls
differently.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761389 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:22:31 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
45c27793cf THRIFT-307. erlang: Make HiPE optional
You can still use it by running "make ERLC_FLAGS='+native'".


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760166 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:47:05 +00:00
David Reiss
2d8563ed6e THRIFT-306. erlang: Let thrift_http_transport specify custom HTTP headers
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760165 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:47:01 +00:00
David Reiss
4c0234f815 THRIFT-305. erlang: Fix http_options for thrift_http_transport
The old implementation of thrift_http_transport:set_http_options assumed
that the return value of thrift_transport:new was a pid, but it isn't.
It is a private structure.  Therefore, set_http_options could never work.
Now, thrift_http_transport:new takes an optional third argument,
an assoc-list of options, including http_options.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760164 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:46:56 +00:00
David Reiss
233ace53f0 THRIFT-127. erlang: Skip fields that have the wrong type
In the other languages (AFAIK), if a field has the wrong type,
it is silently skipped.  Erlang currently assumes that the type
is correct and de-synchronizes.  This change makes it behave like
the other languages (except that it is not silent).


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760161 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:46:47 +00:00
David Reiss
bfc57a0402 THRIFT-126. erlang: TMemoryBuffer for Erlang
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760160 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 20:46:37 +00:00
David Reiss
fe931d1526 THRIFT-136. s/async/oneway/ in Erlang
This is kind of a bummer because it requires a simultaneous
code regeneration and library upgrade, and possibly also a
server restart.  I'm not sure if it is worth it, since the
only benefit is a little code clarity.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757993 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:02:08 +00:00
David Reiss
6ce401dd55 THRIFT-136. s/async/oneway/ in misc places
This is mostly an internal-only change.
It affects docstrings, messages, variables, test cases, etc.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757992 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:58 +00:00
David Reiss
c51986f438 THRIFT-136. s/async/oneway/ in comments
This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757990 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:25 +00:00
Kevin Clark
9a863ee551 THRIFT-192. erl: Fix handling of booleans
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757870 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 16:04:36 +00:00
David Reiss
080991bf98 THRIFT-186. erl: Make the Makefile work on OpenSolaris
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@709086 13f79535-47bb-0310-9956-ffa450edef68
2008-10-30 04:28:42 +00:00
David Reiss
46e8d0b8fb THRIFT-94. erlang: Fix a syntax error
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@678659 13f79535-47bb-0310-9956-ffa450edef68
2008-07-22 06:57:41 +00:00
David Reiss
7a4ff6be4d THRIFT-83. erlang: Don't flush an empty buffer in the http transport.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@677157 13f79535-47bb-0310-9956-ffa450edef68
2008-07-16 05:13:30 +00:00
David Reiss
cc0c9e98b5 Clean up some bad/missed merges from the alterl merge.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666486 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:29 +00:00
David Reiss
37dbfef478 Fix thrift_server to work with newest thrift_processor
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666483 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:16:01 +00:00
David Reiss
9f2a5d7799 Rename "alterl" to "erl".
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666481 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:15:45 +00:00
David Reiss
f2e66c1cb7 Remove all of the old Erlang stuff in preparation for renaming alterl.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666480 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 01:14:38 +00:00
David Reiss
13c4380347 Add a distdir rule to lib/erl/Makefile to make "make check" happy.
This is a gross hack because lib/erl isn't using automake,
but it is still in SUBDIRs.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665661 13f79535-47bb-0310-9956-ffa450edef68
2008-04-21 18:07:49 +00:00
David Reiss
1d106ae6f0 Add simple "check" and "distclean" targets to lib/erl/Makefile.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665655 13f79535-47bb-0310-9956-ffa450edef68
2008-04-11 22:00:06 +00:00
Christopher Piro
b6f18c20ee [thrift] Erlang build tweaks
Summary: fix the Makefile to use BSD-friendly find(1) and enable conditional building of the Erlang binding.  Contributed by Dan Sully (daniel@electricrain.com).

Reviewed By: eletuchy

Test Plan: builds


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665549 13f79535-47bb-0310-9956-ffa450edef68
2008-03-04 07:09:12 +00:00
eletuchy
6f3507c425 [thrift] erlang: fixing error logger for devious "not-quite-right" lists
Summary: ... a la dictionary

Reviewed By: cpiro

Test Plan: bin_trim of a dict with a stored integer value

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665531 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 23:50:21 +00:00
eletuchy
7d2ab9fd43 [thrift] erlang: dialyzer bug: binary protocol double type ...
Summary: ... needs to be specified as a float to work, since
         erlang's binary syntax default is "integer"

Reviewed By: cpiro

Test Plan: make dialyzer -j

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665529 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 19:56:52 +00:00
eletuchy
38d199b879 [thrift] erlang: dialyzer bug: bad usage of ++ operator on a non-list
Reviewed By: cpiro

Test Plan: make dialyzer -j

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665528 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 19:55:15 +00:00
eletuchy
f0cf2a3745 [thrift] erlang: dialyzer bug: tSocket reading of send_timeout preference
Reviewed By: cpiro

Test Plan: make dialyzer

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665526 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 19:27:41 +00:00
eletuchy
53e571968f [thrift] erlang dialyzer error
Summary: impossible pattern matches are never good

Reviewed By: cpiro

Test Plan: make dialyzer

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665525 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 18:38:42 +00:00
eletuchy
57fd32c796 [thrift] make erlang error logger more efficient
Summary: when omit_fmt is included

Reviewed By: cpiro

Test Plan: sanity checked a service to make sure it ran

Revert Plan: sure

Other Notes: TODO - make reconfiguration work with this


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665524 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 17:43:40 +00:00
eletuchy
7dc23bce4b [thrift] adding dialyzer to erlang library Makefile
Summary: ... because static analysis can find bugs

Reviewed By: cpiro

Test Plan: cd src ; make dialyzer -j
     gape in awe at errors

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665523 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 17:41:05 +00:00
eletuchy
efe64a6cc5 [thrift] making erlang thrift error logger slightly nicer for printing binaries
Reviewed By: cpiro

Test Plan: ran some services ... verified that they worked

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665522 13f79535-47bb-0310-9956-ffa450edef68
2008-02-27 16:31:01 +00:00
eletuchy
c81e82bc26 [thrift] don't do a reverse DNS lookup for every erlang thrift request
Reviewed By: cpiro

Test Plan: ran a server ... verified its debug messages no longer included
     hostnames

Notes: methinks this binding is not long for this world

Revert Plan: sure ... if you don't like your dns server


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665505 13f79535-47bb-0310-9956-ffa450edef68
2008-02-26 12:11:29 +00:00
eletuchy
698713cf64 [thrift] better error handling and timeouts in tSocket code
Summary: default socket send timeout to 5seconds, not infinity.
         close the socket in case of an error.

Reviewed By: cpiro

Test Plan: ran a client for slow services
     and sanity checked other client code to make sure

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665504 13f79535-47bb-0310-9956-ffa450edef68
2008-02-26 11:44:00 +00:00
Christopher Piro
215ba5c310 [thrift] Erlang thrift_sup will exit if it can't bind to the given address
Summary: before it would complain and not exit.  that's not right.

Reviewed By: eletuchy

Test Plan: DEATH ENSUES

Revert Plan: sounds reasonable


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665490 13f79535-47bb-0310-9956-ffa450edef68
2008-02-20 08:19:38 +00:00
eletuchy
bd03e3e40e [erl-thrift] tiny change to exception message for tSocket:connect
Summary: calls integer_to_list on the port

Reviewed By: dreiss

Test Plan: connected a client to non-running server. oh noes, exception.

Revert Plan: sure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665475 13f79535-47bb-0310-9956-ffa450edef68
2008-02-13 00:48:15 +00:00
David Reiss
0c90f6f8af Thrift: Whitespace cleanup.
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
2008-02-06 22:18:40 +00:00
Christopher Piro
aa93451dbf [thrift] iolists and binaries in Erlang
Summary: three related changes:
 * for numeric types in tBinaryProtocol call effectful_write with binary(), not [char()]
 * tBinaryProtocol:writeString now takes either [char()], iolist(), or binary() ... now you can use any of the three where a Thrift string is required
 * tBufferedTransport now buffers by building an iolist() rather than Buffer++Data.  zomg.

Reviewed By: eletuchy

Test Plan: everything seems to work as usual, and binary() works as expected

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665447 13f79535-47bb-0310-9956-ffa450edef68
2008-01-30 01:39:01 +00:00
Christopher Piro
21db52de16 [thrift] fix thrift_logger.erl when show_pid option is enabled
Summary: this gets rid of a lot of messy useless output every time the error logger prints something

Reviewed By: eletuchy

Test Plan: works as expected

Revert Plan: ok

Other Notes: contributed by Todd Lipcon (todd@amiestreet.com)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665422 13f79535-47bb-0310-9956-ffa450edef68
2008-01-14 05:54:50 +00:00
Christopher Piro
26484fb7b1 [thrift] in erlang add {nodelay, true} and {reuseaddr, true} to gen_tcp socket options
Summary: for parity with the C++ implementation

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok

Other Notes: contributed by Todd Lipcon (todd@amiestreet.com)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665415 13f79535-47bb-0310-9956-ffa450edef68
2008-01-08 03:14:19 +00:00
Christopher Piro
7ab31e4fd1 [thrift] add show_pid option to thrift.app.src (Erlang)
Summary: we've been using this option in our apps but we never added it to thrift's own config

Reviewed By: eletuchy

Test Plan: ok

Other Notes: contributed by Jason Ganetsky (jason@amiestreet.com)


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665411 13f79535-47bb-0310-9956-ffa450edef68
2008-01-04 00:21:18 +00:00
Christopher Piro
a89cd7b03e [thrift] squelch crash reports in Erlang R12B-0
Summary: there's a new format for errors in R12B-0, so don't echo a crash report if it matches the new one

Reviewed By: eletuchy

Test Plan: completely unnecessary

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665400 13f79535-47bb-0310-9956-ffa450edef68
2007-12-19 00:00:39 +00:00
Christopher Piro
de11d85211 [thrift] gut Erlang exception handling
Summary: * move type field to tException from subclasses
          * add backtrace to tException
          * add oop:is_a
          * on exit, wrap exceptions in {thrift_exception, E} ... otherwise can't distinguish e.g. exit:{{tBinProtException, {tException, ...}}, Stack} vs. exit:{tBinProtException, {tException, ...} -- I hate erlang
          * all throws/exits to tException:throw which does the wrapping described above

Reviewed By: eletuchy

Test Plan: been using this code on my live server ^_^

Revert: OK


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665350 13f79535-47bb-0310-9956-ffa450edef68
2007-11-18 02:10:20 +00:00
Christopher Piro
10522a7f2b [thrift] fix-ups to Erlang thrift_logger
Summary:
 * no ?INFO for every oop:call ... way too expensive
 * unfactor symbol/1 ... it was that way for a reason apparently
 * upped crash report depth to 3

Reviewed By: eletuchy

Test Plan: /much/ less CPU eaten by logging

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665343 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:31 +00:00
Christopher Piro
c2e37c7a61 [thrift] change up Erlang crash reports, cleanups in t{,Binary}Protocol
Summary: crash reports aren't too important so don't be so verbose -- all the pertinent info shows up elsewhere anyway.  refactor while we're at it.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665342 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:30 +00:00
Christopher Piro
53b6ef670c [thrift] whole ball of whitespace normalizations in Erlang
Summary: ill-formatted comments, trailing whitespace, and (gasp) tabs: all pwned.  better now than later.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665339 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:28 +00:00
Christopher Piro
a1650fe55c [thrift] make open and close `effectful' in Erlang client
Summary: make uniform across all tTransports.  god i want `effectful' to go away dead.  soon.

Reviewed By: eletuchy

Test Plan: ok

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665338 13f79535-47bb-0310-9956-ffa450edef68
2007-11-15 06:26:27 +00:00