Releases from 0.6.0 up to the current release are available at the Apache Thrift Archive Git Checkout ¶ For those who would like to participate in Thrift development, you may checkout Thrift. Thrift is specifically designed to support non-atomic version changes across client and server code. For more details on Thrift's design and implementation, take a gander at the Thrift whitepaper included in this distribution or at the README.md files in your particular subdirectory of interest.
The output should be compared with the contents of the SHA256 file. Similarly for other hashes (SHA512, SHA1, MD5 etc) which may be provided. Windows 7 and later systems should all now have certUtil. The output should be compared with the contents of the SHA256 file. Similarly for other hashes (SHA512, SHA1, MD5 etc) which may be provided. Windows 7 and later systems should all now have certUtil.
Last Modified: 2014-03-16
Licensed to the Apache Software Foundation (ASF) under oneor more contributor license agreements. See the NOTICE filedistributed with this work for additional informationregarding copyright ownership. The ASF licenses this fileto you under the Apache License, Version 2.0 (the'License'); you may not use this file except in compliancewith the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,software distributed under the License is distributed on an'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANYKIND, either express or implied. See the License for thespecific language governing permissions and limitationsunder the License.
Thrift is a lightweight, language-independent software stack with anassociated code generation mechanism for RPC. Thrift provides cleanabstractions for data transport, data serialization, and applicationlevel processing. The code generation system takes a simple definitionlanguage as its input and generates code across programming languages thatuses the abstracted stack to build interoperable RPC clients and servers.
Thrift is specifically designed to support non-atomic version changesacross client and server code.
For more details on Thrift's design and implementation, take a gander atthe Thrift whitepaper included in this distribution or at the README.md filesin your particular subdirectory of interest.
thrift/
compiler/
lib/
test/
tutorial/
See http://thrift.apache.org/docs/install for an up-to-date list of build requirements.
More information about Thrift can be obtained on the Thrift webpage at:
Thrift was inspired by pillar, a lightweight RPC tool written by Adam D'Angelo,and also by Google's protocol buffers.
If you are building from the first time out of the source repository, you willneed to generate the configure scripts. (This is not necessary if youdownloaded a tarball.) From the top directory, do:
Once the configure scripts are generated, thrift can be configured.From the top directory, do:
You may need to specify the location of the boost files explicitly.If you installed boost in /usr/local, you would run configure as follows:
Note that by default the thrift C++ library is typically built with debuggingsymbols included. If you want to customize these options you should use theCXXFLAGS option in configure, as such:
To enable gcov required options -fprofile-arcs -ftest-coverage enable them:
Run ./configure --help to see other configuration options
Please be aware that the Python library will ignore the --prefix optionand just install wherever Python's distutils puts it (usually alongthe lines of /usr/lib/pythonX.Y/site-packages/). If you need to controlwhere the Python modules are installed, set the PY_PREFIX variable.(DESTDIR is respected for Python and C++.)
Make thrift:
From the top directory, become superuser and do:
Note that some language packages must be installed manually using build toolsbetter suited to those languages (at the time of this writing, this appliesto Java, Ruby, PHP).
Look for the README.md file in the lib// folder for more details on theinstallation of each language library package.
There are a large number of client library tests that can all be runfrom the top-level directory.
This will make all of the libraries (as necessary), and run throughthe unit tests defined in each of the client libraries. If a singlelanguage fails, the make check will continue on and provide a synopsisat the end.
To run the cross-language test suite, please run:
This will run a set of tests that use different language clients andservers.
Active4 years ago
I am testing out how simple Apache Thrift is to learn and it looks promising. One major problem: the first tutorial doesn't work..
I have Windows 7, Python 2.7, and got the Thrift .exe for Windows v.0.9.1. I'd rather not compile from source as I don't use Cygwin etc. The exe gave the problems described below. So I moved on and tried using Chocolatey to install Thrift using cinst Thriftwhich worked fine and gave me Thrift v0.9.0. But this version results in the same behavior as the exe, described below.
When I run the tutorial found at http://thrift.apache.org/tutorial/py I get the following:
Hopefully the exe works for someone because I'd love to avoid this requiring a build from source.
JensG10.3k33 gold badges3131 silver badges4444 bronze badges
afeltafelt
2 Answers
The answer is that the tutorial assumes you have a /tutorial folder with two .thrift files included in it. If you go the Windows EXE route and then build your tutorial.thrift file, you will also need to add shared.thrift which can be found in Git at https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift
Save this file next to your tutorial.thrift file and you can proceed with the tutorial.
afeltafelt
Windows previous installation. The command
uses the
-r[recurse]
switch to automatically build a second, included IDL file shared.thrift
. This shared.thrift
file is located in the same folder as tutorial.thrift
is. Because Thrift looks for included files based on the current folder, you have to explicitly call the Thrift compiler from that folder. Assumed, your Thrift working copy is under C:Thrift and the
thrift.exe
is reachable via search path, open a command prompt, navigate to that folder and enter the command again:Apache Thrift Python
PS: The 0.9.0 is slightly outdated. The 0.9.1 is fine, the forthcoming release 0.9.2 will have even more improvements.
Apache Thrift Windows Store
JensGApache Thrift Example
JensG10.3k33 gold badges3131 silver badges4444 bronze badges