Premium

Datastax Cassandra Administrator Certification Questions and Answer (Pratice Questions and Dumps)



Question-: Tombstone is a marker for which rows to be deleted?
A. True
B. False

Answer: B

Explanation: Tombstone is a marker within a row that indicates that a column will be deleted. Deletion of column will happen while compaction.



Question-: You have to restart a node in a Cassandra cluster to apply some patch on it. However, after restart it should take at least minutes to be part of the cluster as well as serving data.
A. True
B. False

Answer: B
Exp: Cassandra cluster nodes uses the Gossip protocol to discover and share location and state information about the other nodes in Cassandra cluster. However, Gossip information is locally persisted by each node in cluster. So that after restart it can be immediately used. There is no such 30 mins waiting time before start using the cluster.

(Dev/Admin)


Question-: Select the correct statement with regards to Partitioner?
A. It is the partitioner responsibility to distribute the data across the nodes in the cluster for load balancing.
B. It is the user who decide on which node first replica of the data should be placed and then partitioner decide how to distribute other replicas across other nodes in the cluster.
C. Partition key and primary key may be the same.
D. Murmur3Partitioner is decommissioned and should not be used in new version of Cassandra Cluster.

Answer: A, C
Exp: It is the partitioner responsibility to distribute the data evenly across all the nodes in the cluster for load balancing. Partitioner decides which node receives the first replica if a piece of data and how to distribute other replicas across other nodes in the cluster. Each row of data is uniquely identified by a primary key which may be same as its partition key. Even partition key can include other clustering columns. A partitioner is a hash function that derives a token from the primary key of that row. The partitioner uses the token value to determine which nodes in the cluster receive the replicas of that row. The Murmur3Partitioner is a valid partitioner strategy for Cassandra Cluster and even suitable for almost all cases.

(Dev/Admin)

Related Questions


Question-: You have been given below sample data with the millions of the rows


While designing data model we have below requirement which needs to be satisfied.
- We should be able to query table which can return n newest users in the group.
- Data should be evenly stored across the nodes in the cluster.
- Each new day there should be a new partition.
- Analytics group has huge volume of data compare to any other group.
- Query should be something like below
SELECT * FROM he_group WHERE coursegroup = ? LIMIT ?

A. CREATE TABLE he_group (
coursegroup text,
subs_timeuuid timeuuid,
subscribed_date text,
username text,
email text,
first text,
last text,
location text,
PRIMARY KEY ( coursegroup , subs_timeuuid ), subscribed_date )
) WITH CLUSTERING ORDER BY subs_timeuuid DESC)


B.
CREATE TABLE he_group (
coursegroup text,
subs_timeuuid timeuuid,
subscribed_date text,
username text,
email text,
first text,
last text,
location text,
PRIMARY KEY (coursegroup ), subscribed_date , subs_timeuuid )
) WITH CLUSTERING ORDER BY subs_timeuuid DESC)

C.
CREATE TABLE he_group (
coursegroup text,
subs_timeuuid timeuuid,
subscribed_date text,
username text,
email text,
first text,
last text,
location text,
PRIMARY KEY ( coursegroup , subscribed_date ), subs_timeuuid )
) WITH CLUSTERING ORDER BY subs_timeuuid DESC)

D.
CREATE TABLE he_group (
coursegroup text,
subs_timeuuid timeuuid,
subscribed_date text,
username text,
email text,
first text,
last text,
location text,
PRIMARY KEY ( coursegroup , subscribed_date ), subs_timeuuid )
) WITH CLUSTERING ORDER BY subscribed_date DESC)



Question-: You are designing a table with the columns (A, B, C, D,E) and you defined key as below
PRIMARY KEY (A, B, C)
Which of the following statement is true?

A. Columns A, B are partition key
B. Column A is a partition key
C. Columns B, C is a composite clustering key
D. Column C is a clustering key


Question-: Which of the following should be taken care while designing the data model in Apache Cassandra?

A. Data should be evenly distributed across the node in the cluster.
B. While reading the data, we have to make sure that minimum partitions are read.
C. While reading the data, we have to make sure as much as possible partitions (try to maximize it) are read.
D. Data duplication is encouraged to avoid multiple table read.


Question-: You have been given below table design

CREATE TABLE he_food_chain(
country_code text,
state text,
city text,
cafe_name text,
PRIMARY KEY (country_code, state, city, cafe_name )
);

Which of the following statement is/are correct?

A. All café within a country, state and city reside in the same partition.
B. All café within a country reside in the same partition.
C. Within a country, state and city you would get result order by café name.
D. Within a country you would get result order by state, city and café name.


Question-: You have defined below table definition

CREATE TABLE he_food_chain(
country_code text,
state text,
city text,
cafe_name text,
opening_date timestamp,
PRIMARY KEY ((country_code, state, city) , opening_date, cafe_name )
) WITH CLUSTERING ORDER BY (opening_date ASC, cafe_name ASC ) ;

Which of the following is valid query?

A. SELECT * FROM he_food_chain WHERE country_code = 'IND' and state = 'RAJ' and city = 'UDAIPUR'
B. SELECT * FROM he_food_chain WHERE country_code = 'IND' and state = 'RAJ' and city = 'UDAIPUR' and opening_date < '2019-01-01 00:00:00+0200'
C. SELECT * FROM he_food_chain WHERE country_code = 'IND' and state = 'RAJ'
D. SELECT * FROM he_food_chain WHERE country_code = 'IND' and state = 'RAJ' and city = 'UDAIPUR' and cafe_name = 'PRATAP DHABA'



Question-: Which of the following are correct limitation for the Cassandra database?
A. You should set the ordering of data while table creation only.
B. All data for a single partition must fit on disk in a single node in the cluster.
C. A single column value is limited to 1 MB only.
D. No join or subquery support for aggregation.