Skip to content

Instantly share code, notes, and snippets.

Consider the problem / usecase scenario where we want to run tasks on the system which runs the Ansible-playbook command. In other words, how can we run for eg. shell command on the local machine parallely while playbook is already running. Also, how can we make sure that some tasks has been fulfilled in order to run the other part of playbook on some other remote machine.
Cloud Computing Interview Questions
Cloud is an emerging trend these days and that is why these days interviewer is asking more questions on cloud computing. Cloud especially IAAS cloud and virtualization are very close terms and you should also know virtualization interview questions for IAAS.
Here are some basic questions on cloud computing:
What is cloud computing and why should we go for using cloud computing(advantages)?
Cloud Computing is a model in which configurable and scalable computing resources (storage, network, application etc) are provided as a service to end user over internet with minimal effort.
Basically cloud computing has the following features:
What is Puppet?
What is puppet manifest?
What is manifest ordering and its importance?
What is puppet module?
Why Puppet matters to Devops? (Advantage of Puppet over other devops tools)
What is puppet catalog?
Can you describe the puppet module layouts / structure?
What are agent nodes?
What is EPP templates?
What is the use of Puppet DB?
What is DevOps and how does it evolve?
What DevOps can do for you?
What is the advantage of DevOps over maven or ant tools?
What are the different DevOps tools present in the market?
Which DevOps tool will you prefer among these?
What is chef, puppet and docker?
What is the advantage of chef over puppet and docker?
What is the advantage of puppet over chef and docker?
What is the advantage of docker?
How DevOps can help in building bridges between Development, QA and Operations teams?
Java SynchronousQueue class is the only collection object which does not have any internal memory capacity. That's the beauty of this collection class and thus many fellow use to ask this in interview question about which Java collection class has no memory capacity? (Answer)
Now you might be wondering if it has no memory capacity, not even of one, then how come this collection framework is even working and how can anyone use it?
First of all, Synchronous Queue comes under the class of Blocking Queue i.e. it has all the features of Blocking Queue.
Hence it works by putting the insert operation thread to wait for remove operation by another thread. In other words, the thread inserting element to Synchronous Queue gets blocked till another thread takes the element out and vice-versa. That means any thread tries to take out the element will get blocked if there is no another thread to put the element into the queue. So the thread which tries to put the element (and gets blocked until there is no taker) keeps
What is Docker
Docker is a platform to run each application isolated and securely. Internally it achieves it by using kernel containerization feature.
What is the advantage of Docker over hypervisors?
Docker is light weight and more efficient in terms of resource uses because it uses the host underlying kernel rather than creating its own hypervisor.
What is Docker Image?
Docker Image is the source of the docker container. In other words, docker images are used to create containers. It is possible create multiple isolated containers from a single image.
............
public class DaemonThread {
public static void main(String[] args) {
System.out.println("Entering Main Thread");
Thread t = new Thread(new Runnable(){
@Override
public void run() {
for(int i=0; i<5; i++) {
System.out.println("Executing Daemon Thread");
try {
import java.util.Timer;
import java.util.TimerTask;
public class JavaTimer {
public static void main(String[] args){
Timer timer = new Timer();
TimerTask task = new TimerTask() {
@Override
public void run() {
System.out.println("Inside Timer Task" + System.currentTimeMillis());
}