O'Reilly logo

Learning Apache Thrift by Krzysztof Rakowski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Testing the installation

To test whether Apache Thrift is installed and works properly, we will generate some code for a service, which does nothing. Don't worry; we will get straight to your first fully-working application in Chapter 3, Running Your First Apache Thrift Service and Client. Now is the time to just check whether everything is in place.

Use the following code in Apache Thrift's IDL and put it in some file, that is, test.thrift:

# this is just a Test service, which contains two methods

service Test {

    # this method probably does nothing
    void donothing(),

    # this method probably multiplies two numbers
    i32 multiply(1:i32 number1, 2:i32 number2),

}

Tip

Downloading the example code

You can download the example code files for all Packt books ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required