Skip to main content


Showing posts from September, 2015

How to create a generic array?

* array of generic elements to represent the stack
private T[] stack;

* Creates an empty stack using the specified capacity.
* @param initialCapacity represents the specified capacity
public ArrayStack (int initialCapacity)
top = 0;
stack = (T[])(new Object[initialCapacity]);

ElasticSearch to RDBMS Glossary

source: In the early days of my playing with ElasticSearch, I remember struggling with some of the basic terminology and concepts. Naturally, many of us try to equate ElasticSearch, with what we know of RDBMS. To that end, I thought of posting this simple topic as a reference to others: Node = DB Instance One Database Instance A node is simply one ElasticSearch instance (1 java process). Consider this a running instance of MySQL. Just like you can have more than one MySQL instance running per machine on different ports… you can have more than one elasticsearch node running per machine on different ports. Cluster = Database Cluster 1..N Nodes with the same Cluster Name. Index = Database Schema Similar to a Database, or Schema. Consider it a set of tables with some logical grouping. In ElasticSearch terms, an index is a Collection of Documents; where a “Document” is similar to a DB table. Mapping Type = Database Table ElasticS…