Fixup differences between OSS and FB internal repository
(thrift) perfect forwarding for FunctionRunner

Summary: So you can move `function`s in if you want.
@override-unit-failures

Test Plan: unit tests and contbuild

Reviewed By: davejwatson@fb.com

Subscribers: net-systems@, alandau, bmatheny, exa

FB internal diff: D1393077

Tasks: 3789661
Fixed Double and Float Coercion

Summary: The way that `Float`s and `Double`s were being serialized and deserialized was incorrect.  This fix introduces an endianness conversion so that floating point numbers are correctly read and written to and from the network

Test Plan: `fbconfig -r thrift/lib/hs && fbmake runtests_dev`

Reviewed By: smarlow@fb.com

Subscribers: alandau, bmatheny, jcoens, davejwatson, akr

FB internal diff: D1397957

Tasks: 4533818
Locking mappings opened with frozen::mapFrozen()

Summary: Frozen depends on random-access performance, which requires that the memory is actually locked.

Test Plan: Unit tests

Reviewed By: mhx@fb.com, lucian@fb.com

Subscribers: mhx, alandau, bmatheny

FB internal diff: D1406269
Change Round Trip tests to QuickCheck Property

Summary: This library was previously tested using arbitrary hard-coded values.  I changed the implmentation to use a QuickCheck property instead to get more coverage

Test Plan: fbmake -r thrift/lib/hs && runtests_dev

Reviewed By: bnitka@fb.com

Subscribers: davejwatson, watashi, alandau, bmatheny, jcoens

FB internal diff: D1404416

Tasks: 4533818
Add TMultiplexedProtocol (C++)

Summary:
This adds the classes needed to support TMultiplexedProtocol on Thrift/C++, as on https://issues.apache.org/jira/browse/THRIFT-1902

Minor changes were needed to build it on fbcode's version of thrift (boost::shared_ptr -> std::shared_ptr, a few methods added, etc)

Test Plan: compileandship

Reviewed By: andrewcox@fb.com

Subscribers: alandau, bmatheny

FB internal diff: D1404058

Tasks: 4556144
fix build break

Summary: fix oss build break from D1404058

Test Plan: watch jenkins.  Still need to hook it up to phab somehow

Reviewed By: paulocosta@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1409347

Blame Revision: D1404058
Refactor IO Buffers

Summary: The IO Buffers defined in `thrift/lib/hs/Thrift/Transport/IOBuffer.hs` are useful for multiple applications.  This code was originally repeated in both `thrift/lib/hs/Thrift/Transport/HttpClient.hs` and `thrift/lib/hs/Thrift/Transport/Framed.hs`.  In revision D1395144 I removed it from `Framed.hs` and imported it from `HttpClient.hs`.  However, it did not make sense to have `Framed.hs` depend on `HttpClient.hs`, so I factored the code into its own file.  In addition to this, I modified it to use the `Data.ByteString.Builder` library for performance reasons.

Test Plan: fbmake -r thrift/lib/hs && runtests_dev

Reviewed By: smarlow@fb.com

Subscribers: watashi, alandau, davejwatson, bmatheny, smarlow, akr, jcoens

FB internal diff: D1398766

Tasks: 4533818
Codemod: use #include angle brackets in folly and thrift

Summary: Also changed the thrift compilers to emit code with <...>.

Test Plan: fbconfig -r folly thrift && fbmake opt && fbmake runtests_opt

Reviewed By: davejwatson@fb.com

Subscribers: ruibalp, nli, shilin, tjackson, fugalh, alandau, bmatheny, njormrod

FB internal diff: D1411225
autotools 'make install'

Summary: Makes autotools' 'make install' work for fbthrift.  Also adds a 'make installcheck' target to test that all the headers were installed correctly (so jenkins will break when one is forgotten)

Test Plan: make install; make installcheck on ubuntu, using a --prefix=/tmp/thrift

Reviewed By: tudorb@fb.com

Subscribers: doug, ruibalp, alandau, bmatheny

FB internal diff: D1408300
Only numa if available

Summary: Some systems don't support numa, make the check automatic

Test Plan: ???

Reviewed By: adhipgupta@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1413394
Move thrift2 python to thrift_compiler Python package

Summary:
Because in the OSS world, a Python package can only come from one source
(so package thrift can only map to one directory), and both compiler
and thrift/lib/py want to use package thrift.

NOTE TO SELF: DO NOT FORGET TO REBUILD THE FBBUILD PACKAGE AND UPDATE VERSION

Test Plan: compiled thrift/test

Reviewed By: davejwatson@fb.com

Subscribers: simpkins, ruibalp, agallagher, alandau

FB internal diff: D1412519
Fix autoconf for thrift

Summary:
Compiling thrift2 in tree now works without resorting to hard-coding the Python
version (we add a level of indirection... I wanted to use "setup.py develop"
but that's only available with setuptools, not distutils)

Test Plan: built in OSS env

Reviewed By: davejwatson@fb.com

Subscribers: ruibalp, alandau, bmatheny

FB internal diff: D1412990
thrift

Summary:

Test Plan: none

Reviewed By: andrewcox@fb.com

Subscribers: ruibalp, alandau, bmatheny, fsilva

FB internal diff: D1415521

Tasks: 4421492
gflag for thrift numa, default OFF

Summary: Add gflag for thrift numa, default off until we can figure out how to get preferred to work and continue allocating on other nodes if we are unbalanced

Test Plan: added log, check that gflag worked

Reviewed By: rkroll@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1418758

Tasks: 4638264
Make java TSerializer thread safe

Summary:
MQTT may have been bitten by this, and it may be the cause of corruption we are
seeing in some serializations. The API of TSerializer seems to encourage
creating only one instance and reusing it, but it isn't thread safe. If you need
this, you're probably better off creating a new instance per serialization or
per-thread, but at least this may help prevent corrupted data.

Test Plan: arc unit

Reviewed By: yanyanw@fb.com

Subscribers: doug, alandau, bmatheny

FB internal diff: D1418497
Add boost_thread, as thrift/lib/cpp2 uses boost::barrier

Test Plan: OSS build

Reviewed By: meyering@fb.com

Subscribers: alandau, bmatheny

FB internal diff: D1420185
Fix missing include

Summary:
We were getting unknown type errors for some fields defined in PausableTimer.h compiling on Android without this.
Probably due to our dependency hacking along the way exposed a missing
include.

Test Plan: compiles on Android with this include

Reviewed By: davejwatson@fb.com

Subscribers: doug, ruibalp, alandau, bmatheny

FB internal diff: D1421067
Update php/hack generation so TSimpleJSONProtocol works

Test Plan: Regenerated thrift files in www, confirmed nothing exploded

Reviewed By: alandau@fb.com

Subscribers: alandau

FB internal diff: D1417542
fix oss build

Summary:
A couple broken things after D1412990

1) PYTHONPATH needed for setup.py install
2) clean-local complains if we delete the whole gen-cpp2 directory, since it contains some .deps files (this is different from clean target for some reason)

Test Plan: built on ubuntu

Reviewed By: alandau@fb.com

Subscribers: doug, ruibalp, alandau, bmatheny

FB internal diff: D1422833