Thursday, March 29, 2018

How can instantiate Java interface without implementing.

public interface Foo { String method(); }
public class Claaa {
   public static void main(String[] args) {
    Foo fooByIC = new Foo() {
       @Override
       public String method() {
          return null;
       }
    };
  }

Answer: Inner class

Evolution Of Java Thread

Thread =>
   Concurrent Package(ExecutorService) =>
        ForkJoin(Internally uses concurrent package =>
           ParallelStream(internally uses fork join)

Thursday, September 14, 2017

Install docker on windows

1) Download docker for windows and don't install.
2) Restart the machine and enable "Virtualilaization" in BIOS settings
3) Enable "Hyper-V" in control panel/Program and features/Turn on features
4) Restart the server
5) Install docker and restart
6) Start the docker from desktop icon
7) Verify the docker installation by "docker images" or other docker commands

Wednesday, May 10, 2017

Setting up kubernetes(Minikube) in windows machine

1) Download minikube-installer.exe.
2) Download kubectl.exe.
3) Install minikube in C:\Minikube and copy kubectl.exe in same location.
4) Create .kube folder in C:\Users\ 5) Set KUBECONFIG="C:\Users\ 6) Go to "Hyper-V Manager" and create "New Virtual Switch" as "RajKube" using virtual switch manager with default network connection.
7) Go to Control Panel\Network and Internet\Network and Sharing Center.
8) Select your actual network connection name. For .ex if i connected in wi-fi my wi-fi name will be displayed.
9) Click "Properties" and select "Sharing" tab.
10) On the Sharing tab tick "Allow other network users to connect through ..." and then select the virtual switch you created in step 1 ("vEthernet (RajKube)" in my case).
11) Delete any existing Minikube VMs in Hyper-v and delete the .minikube folder in your home folder.
12) minikube start --vm-driver=hyperv --memory=1024 --hyperv-virtual-switch=RajKube --v=7 --show-libmachine-logs --alsologtostderr

Monday, July 20, 2015

Sqoop2 server installation on Ubuntu.

Sqoop2 server installation steps: 1) Download sqoop-1.99.6-bin-hadoop200.tar.gz and extract. 2) Changed sqoop.properties and catalina.properties in /server/conf folder. 3) catalina.properties contain hadoop installation libraries(E.g: My hadoop install location is /usr/local/hadoop] and sqoop.properties contain hadoop conf[e.g: /usr/local/hadoop/etc/conf] folder location 4) Execute /server/bin/./sqoop2-tool verify and it should return "Success" message. 5) Start sqoop server . /server/bin/./sqoop2-sever start.

How can instantiate Java interface without implementing.

public interface Foo { String method(); } public class Claaa {    public static void main(String[] args) {     Foo fooByIC...