Sometimes I hear some people say when I interviewed a guy who is confident, but I don't know the principle. If you don't know the principle, you can say that you are familiar with it. After hearing these things, I feel that I don't want to tell anyone that you know the principle. I would like to ask, is it easy for a programmer who has been working for several years, you also ask people to know how it works. The principle you call is to understand the inheritance relationship and rewrite it. If you really want to talk about the principle, together with how to compile the memory, every step of the change will be explained. Well, I don't know much about it.
Today, let's take a look at the setup of the Cassandra environment. Today we will talk about the configuration of a single node. These things have to be discussed in linux, but since my machine is too old to be configured, there is no idea of installing linux for the time being. Let's take a look at the process.
Step 1: Download Apache Cassandra. Http://cassandra.apache.org/
After downloading the package, decompress the package as follows:
650) this. width = 650; "title =" QQ20130610121657.png "src =" http://www.bkjia.com/uploads/allimg/131228/21210A322-0.png "/>
Step 2: Go to the bin directory and open the cassandra. bat file, with the following contents:
650) this. width = 650; "title =" QQ20130610121853.png "src =" http://www.bkjia.com/uploads/allimg/131228/21210CD2-1.png "/>
According to the prompts in the bat file, set CASSANDRA_HOME in the environment variable to the decompress directory of Cassandra.
650) this. width = 650; "title =" QQ20130610122001.png "src =" http://www.bkjia.com/uploads/allimg/131228/2121064304-2.png "/>
OK. After setting, double-click cassandra. bat in the bin directory to start cassandra.
650) this. width = 650; "title =" QQ20130610122334.png "src =" http://www.bkjia.com/uploads/allimg/131228/21210644O-3.png "/>
OK. The startup is successful. We can see that the cassandra service is listening to the thrift client.
So what is Thrift?
Thrift is one of Facebook's core technical frameworks, allowing systems developed in different languages to communicate through this framework. The developer uses the format provided by thrift to define data and service scripts. Thrift can automatically generate code in different languages through defined scripts to support communication between different languages. Thrift supports multiple data communication protocols, such as xml, jason, and binnary.
Next let's start the Cssandra-Cli.bat under the bin directory
650) this. width = 650; "title =" QQ20130610122713.png "src =" http://www.bkjia.com/uploads/allimg/131228/21210622b-4.png "/>
Started successfully. We create a new keySpace (equivalent to a database in a relational database)
Create a simple KeySpace as follows:
Create keyspace MyTestKeySpace.
650) this. width = 650; "title =" QQ20130610124432.png "src =" http://www.bkjia.com/uploads/allimg/131228/2121063S5-5.png "/>
Create a new ColumnFamily. First, enter the KeySpace we just created.
650) this. width = 650; "title =" QQ20130610124820.png "src =" http://www.bkjia.com/uploads/allimg/131228/21210644L-6.png "/>
Create our ColumnFamily
650) this. width = 650; "title =" QQ20130610124830.png "src =" http://img1.51cto.com/attachment/201306/124933285.png "/>
OK. The instance is successfully created. Check whether the instance is successfully created. Then, enter describe. We can see that the instance is successfully created.
650) this. width = 650; "title =" QQ20130610125249.png "src =" http://www.bkjia.com/uploads/allimg/131228/21210A421-8.png "/>
We have already succeeded. Now, our environment is ready, and we only need to design our own schema Based on the business.
This article is from the "Microsoft technology" blog, please be sure to keep this source http://leelei.blog.51cto.com/856755/1220013