- What kind of datastore is MongoDB?
MongoDB is a document-oriented NoSQL datastore - Which format are the documents stored in MongoDB?
Documents are stored in binary form of JSON known as BSON - How can you inspect a source code of a function?
The function must be invoked without any parentheses - Which language is supported by MongoDB for UDF?
Both built-in functions and UDFs are written in JavaScript - What are the different type of indexes supported by MongoDB?
B-Tree index and GeoSpatial index - How is a index created?
An index is created by calling ensureIndex(fields,options) - How will you see the explain plan for a query?
By calling the explain() function. For example, db.book.find().explain() - How will you find if you are on the master server?
Db.isMaster() - How many master does MongoDB allow?
Only one. CouchDB allows multiple masters. - What is the ObjectId composed of?
The ObjectId is composed of timestamp, client machine id, client process id, 3 byte incremented counter - Can documents stored in MongoDB collection vary in structure?
Since MongoDB documents are schemaless they can very in structure - What is the command syntax for inserting a document?
database.collection.insert(document) - From which node are the reads performed by default?
From the primary node by default. - Are transactions supported?
No, classical operations such as insert, update, delete, commit, rollback are not supported - What is master or primary?
A master or primary node in a replica set is where all write operations take place. In the event of primary node failure other node (member) may be elected as primary. - What is a secondary or slave?
A secondary or slave is a node/member which is replicated from actions of primary. The actions are replicated to a slave from primary in an asynchronous fashion. The slave will try to stay as close to the primary as possible. - Why are data files so large in MongoDB?
In order to avoid filesystem fragmentation, MongoDB employs agressive preallocation of reserved space. - How can I see the connection used by mongos?
db._adminCommand("connPoolStats") - What feature I can use to do safe hot backups?
Journaling - What is the role of profiler in MongoDB?
The profiler shows the performance characteristics of each operation against the database.
The Big Data Queries
Thursday, March 13, 2014
MongoDB interview questions
Sunday, March 2, 2014
HBase Interview Questions
- What is the similarity between HBASE and RDBMS?
Both are ACID compliant and can run transactional applications. - What is HBase design based upon?
HBase design is based upon Google's BigTable - What is the most unique feature supported by HBase?
HBase supports versioning out-of-the-box - How is versioning implemented in HBase?
Versioning is implemented using the timestamp field. - What are the different types of compression algorithms supported by HBase?
Gzip and Lempel-Ziv-Oberhumer (LZO) - Which compression algorithm comes packaged with HBase?
Gzip - Why is LZO not packaged with HBase? How can it be included?
Due to licensing issues LZO is not packaged with HBase. It can be downloaded separately. - What is a region?
A region is a chunk of rows identified by starting key (inclusive) and ending key (exclusive) - How are rows kept in HBase?
Rows are kept sorted by row key - How are region to region server assignments managed?
ZooKeeper (a distributed coordination service) manages region assignment to region server. - What are the two special tables in HBase?
.META and .ROOT - What does .META table store?
It keeps track of all user tables and which region servers are responsible for serving the regions of those tables. - Does one table map to one region?
No. As the size of the table grows, more regions are created and spread across the entire cluster. - How are write operations performed in HBase?HBase uses WAL (Write Ahead Log) before persisting to the disk
- Is writing to WAL mandatory?
No writing to WAL is not mandatory. It is enabled by default. - How can you control WAL setting?
Writing to WAL can be changed by using setWriteToWAL() method - What is the advantage of disabling WAL?
Improves performance - What does Bloom filters help determine?
Bloom filters determine if a column exists for a given row key or if a row key exists at all. - Why are operations that alter column family characteristics expensive?
HBase creates a new column family with new specification and then copies all the data over from the old column family and then deletes it. - What are the three different running modes supported by HBase?
Standalone mode, Pseudo-distributed mode, Fully distributed mode
Subscribe to:
Comments (Atom)