In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you a sample analysis of the configuration of the Thrift environment in Apache, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Official documentation address for installing Thrift:
Http://thrift.apache.org/docs/install/
When I saw that Cygwin or MinGW was needed for windows installation, I just gave up the idea of configuring it in windows and opened the virtual machine to install with CentOS. After all, using a bunch of commands to install is more convenient than windows.
CentOS install Thrift
Official document address:
Http://thrift.apache.org/docs/install/centos
Basically, according to the official operation, you can go all the way to the last set of commands, which is the following place:
Build and Install the Apache Thrift IDL Compilergit clone https://git-wip-us.apache.org/repos/asf/thrift.git cd thrift. / bootstrap.sh. / configure-with-lua=no make sudo make install
This step requires special attention, and there are two ways to choose.
Since the source code is downloaded using git here, the latest version used in your current directory was the latest version 1.0.0 below master at the time of writing this document on 2015-9-19. This version has not yet been released, so I said it provides two ways:
uses git checkout 0.9.2 to switch to the currently released version 0.9.2 before continuing
continues on the current master (unreleased version 1.0.0)
Note: it takes time to download the source code with git, and the quickest way is to download the specified version of the compressed package directly from the official.
Personally, I discovered this problem only after the event, so I operated in the second case.
I personally recommend that you choose a stable version that has been released to operate. If an error occurs during the operation, perhaps the following solution for the second case applies to the first case as well.
Continue on the current master (unreleased version 1.0.0)
Because I directly followed the official documentation and executed the above command in the case of master, there were some errors.
Before continuing with the last part of the above, you need to install some of the necessary dependencies. If these dependencies are not installed beforehand, the following error may occur:
Make appears Error:TNonblockingServer.h:41:33: error: event2/event_compat.h.
For errors like the one above, the solution is from the following address:
Http://libevent.org/
Download libevent, I downloaded the latest version of libevent-2.0.22-stable.tar.gz directly, this version can solve the above problem, other versions did not try.
After the installation is complete, if you have previously executed make, it is recommended that you clean up the directory with git gc.
Then continue with the following:
. / bootstrap.sh. / configure-with-lua=no make sudo make install
Under normal circumstances, the installation should be completed smoothly (if something goes wrong, did you not execute git gc?).
Package version 1.0.0 jar package
Since version 1.0.0 has not been released yet, there will be some errors if you use version 0.9.2, so you have to pack it yourself manually.
To enter the thrift/lib/Java directory, you need to configure jdk and ant first. Then open the terminal in this directory and execute the ant command.
After successful execution, you can see the libthrift-1.0.0.jar and libthrift-1.0.0.pom files in the build directory.
Here, you need to manually modify the libthrift-1.0.0.pom file to change pom to jar. If you don't change it to jar, you can't use the following command to import the local repository in the easiest way (jar packages will not be uploaded when the package type is pom, so change it to jar, but the official package type is really weird pom, who can explain why?)
Copy these two files to the computer you want to use, and then install them to the local warehouse using the following command:
Mvn install:install-file-Dfile=libthrift-1.0.0.jar-DpomFile=libthrift-1.0.0.pom
Once installed locally, you can use in maven:
Org.apache.thrift libthrift 1.0.0
You can start using thrift at this point.
The above is all the contents of the article "sample Analysis of Thrift Environment configuration in Apache". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.