Monthly Archives: September 2016

What is ConcurrentModificationException in Java?

Oracle JavaEvery java developer must have encountered java.util.ConcurrentModificationException in his/her life specially in early development days . You must have several questions in you mind: what is code>ConcurrentModificationException in Java? How to avoid ConcurrentModificationException? how to overcome ConcurrentModificationException exception either in multi-threaded or single-threaded environment.
Continue reading What is ConcurrentModificationException in Java?

Step by Step installation of Elastic Search on Windows

elastic search
If you are going to install elastic search you can have various question in your mind , like how to install elastic on windows platform? The step by step process of installation of Elastic will be learned via this post. Although, the installation of Elastic is very simple on any environment either on Windows or different flavor of Linux. Please follow following step of installation and you are done with installation part of it.
Continue reading Step by Step installation of Elastic Search on Windows

Date Range Query on ObjectId in MongoDB

MongoDB
How to write a date range query on _id (objectId) in mongodb? This is very easy as MongoDB by default keep one primary key which is _id , if you not provide while inserting/adding. In _id key mongoDB keep date time or you can say timestamp of the system when inserted in to mongoDB. You can query on ObjectId or _id of mongoDB either greater than ($gt) or less than date ($lt). Here you can provide any one of them or both, it’s your choice based on the requirement. I would recommend not to keep separate field which keeps for dateTime / timestamp. _id is sufficient to pull based on date range.
Continue reading Date Range Query on ObjectId in MongoDB

How to Write Your Custom Exception in Java

Oracle Java
This post demonstrate , how to write you own custom exception in java here I have made UserNotFoundException. By naming convention, this Exception throws when user not found for provided userId. Here there are three class first, UserNotFoundException.java (custom exception) , second DAO ( UserDAOImpl.java) and third class Client application which run and gives the output of program. for simlicity throws explicitly.
Continue reading How to Write Your Custom Exception in Java

Table in Apache Cassandra

Apache Cassandra
Well, in Apache Cassandra, Keyspace is similar to schema in RDBMS and Coulum-family of Apache Cassandra is similar to table in RDBMS, but nowadays , we most of the time say Table in Cassandra. Apache Cassandra is very much flexible with different types of data, whether it is either semi-structured data or unstructured data. if you are new in Cassandra , you can visit our post: What is Apache Cassandra?

Continue reading Table in Apache Cassandra