Mindmajix as a team have got enough questions from the trainees who got their Apache Cassandra Training and cracked interviews at various MNCs around the world and successfully placed. From the collection of Cassandra Interview Questions, following are the most common questions we got are listed to make it easy for those who are willing to crack the interview with ease. All the answers to those were written by our professional experienced trainers and are tailored to meet the concepts expected by the interviewer.
Q. What is Apache Cassandra?
A distributed database system to manage large amount of structured data spread across multiple servers, providing high availability with less margin for error. Apache cassandra database is different from other available databases for its availability and performance in terms of simple executions and storage mechanisms which can provide option to spread its data over distributed systems and cloud storages as well.
Q. What are the features of Cassandra?
Cassandra is preferred for its availability and scalability. Apart from which following are additional features:
Q. What is CQL?
CQL refers, Cassandra Query Language is similar to SQL that allows data to be stored in terms of rows and columns in a table.
Q. Lexical structure of CQL.
This structure looks similar to SQL query. Following is the example of CQL Query:
SELECT * FROM MyTable;
SET SomeColumn = ‘Mindmajix'
WHERE columnName = 91-9246-333-245-IND-1-201-378-0518-USA;
Q. Data types in CQL.
There are two different sets of data types available in CQL.
Composite data types and Collection data types.
1. Composite Data Types: Used to define column names;
2. Collection Data Types: Used to store organised set of values.
Q. Aggregate functions are not supported by CQL. True or False?
Q. CQL limit for BLOB type?
It allows upto 2 GB
Q. What is the default time for Garbage Collection?
864000 Seconds of time, i.e., 10 Days.
Q. What is the default compaction strategies in CQL?
Q. What are the other values available to set for Compaction Strategies in CQL.
DateTieredCompactionStrategy (DTCS) - useful for time series data, and Leveled Compaction Strategy (LCS) - levels of data that include small SSTables, along with default one.
Q. Role of cassandra in Facebook?
Cassandra was developed by Facebook in order to manage its inbox search. Later on when they upgraded facebook inbox to use Facebook messenger platform developed using Hbase, Cassandra was moved to Instagram.
Q. What are identifiers?
Identifiers are tokens that are described using regular expressions which are used to identify particular tables, columns or objects.
Q. What are keywords?
Keywords are series of identifiers resulting string or token that are given with a meaning or task associated. For example, SELECT is a keyword used to select or read data.
Q. Keywords are case sensitive. Yes or No. Explain.
No. Keywords are not case sensitive.
SELECT, select,SeLeCt, etc… all the combinations mean the same keyword.
Q. What are the main run-time properties of Cassandra.
Using YAML, cassandra properties are set in cassandra-env.sh. In order to use additional Java properties, you can use JVM_OPTS that are passed to JVM when we start Cassandra.
Q. Explain logging in Cassandra.
All the log information is stored into logback.xml and one can alter any properties using this file. INFO level logs are written to system.log and debug level entries into debug.log
Q. Explain Cassandra Data Model.
Data model consists of four key elements.
Q. What is HDFS?
It is Hadoop Distributed File System.
Q. Where do we use HDFS in Cassandra?
HDFS is one of the compatible mode of Cassandra file system that allows you to manage huge data with ease. So as to replace old methods of handling large data like nodal structures.
Q. Differentiate Cassandra from Hadoop.
Hadoop is analytics platform that enables to manage huge databases whereas Cassandra is NoSQL Database that helps in high speed performance while working with online data during huge number of transactions.
Q. Differentiate Cassandra from HBase.
HBase is distributed database developed on java which is open source and uses NoSQL. This is used to develop online applications, whereas Cassadra serves better for the same purpose and also includes many advanced features as it was developed later HBase, that focus advancements in Cassandra in many technical aspects.