Database Reference
In-Depth Information
Note Chapter 3 will cover indexing in detail.
4.
Now explore the user column family with CQL3, and see the result in
Figure 2-16 .
describe table user;
Figure 2-16 . Describes table user
Metadata has been changed, and columns ( first_name and
last_name ) modified via Thrift are no longer available with
CQL3! Don't worry! Data is not lost as CQL3 and Thrift rely on the
same storage engine, and we can always get that metadata back by re-
building them.
5.
Let's rebuild first_name and last_name :
alter table user add first_name text;
alter table user add last_name text;
The problem is with CQL3's sparse tables. CQL3 has different
metadata (CQL3Metadata) that has NOT been added to Thrift's
CFMetaData. Do not mix and match CQL3 and Thrift to perform
DDL/DML operations. It will always lead any one of these metadata
to an inconsistent state.
A developer who can't afford loosing Thrift's dynamic column
support still prefers to perform an insert via Thrift, but to read them
back via CQL3. It is recommended to use CQL3 for a new applica-
tion development over Cassandra. However, it has been noticed that
 
 
Search WWH ::




Custom Search