Posts

JSON Viewer

This is a simple JSON viewer developed using JQuery. Find the JSON viewer blow and its source code at GitHub Link Options: Collapse nodes Keys with quotes Transform to HTML GitHub Link: https://github.com/harishshan/Tools/blob/master/JSONViewer.html

How to create Dynamic Kafka Topic Through Java

This is post is about how to create a Kafka topic dynamically through Java.In one of my project, we(me and my friend Jaya Ananthram) were required to create dynamic Kafka topic through Java. Since there is no documentation on Kafka official documentation we are struggled to create dynamic Kafka topic through Java. Then After a long search ,we found this solution for creating the Kafka topic through Java.  import java.util.Properties; import kafka.admin.AdminUtils; import kafka.utils.ZKStringSerializer$; import kafka.utils.ZkUtils; import org.I0Itec.zkclient.ZkClient; import org.I0Itec.zkclient.ZkConnection; public class KafkaTopicCreationInJava { public static void main(String[] args) throws Exception { ZkClient zkClient = null; ZkUtils zkUtils = null; try { String zookeeperHosts = "localhost:2181"; // If multiple zookeeper then -> String zookeeperHosts = "192.168.1.1:2181,192.168.1.2:2181"; ...

Installing MS SQL Server on Ubuntu 16.04

This post about installing the MS SQL Server on Ubuntu 16.04. MS SQL Server could be installed only on Windows, Now Microsoft released SQL Server 2017, which adds Linux support for these Linux platforms: Red Hat Enterprise Linux, SUSE Linux Enterprise Server, Ubuntu & Docker Engine. Find the steps below for installing MS SQL Server on Ubuntu 16.04 1. Login to sudo user $sudo su 2.Install CURL (if curl is not already installed) $sudo apt-get install curl 3.Register MS SQL Server repository $curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add $curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list > /etc/apt/sources.list.d/mssql-server.list $curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/msprod.list sudo apt-get update Note : mssql-server.list contains mssql-server and msprod.list contains mssql-tools 4. Install MS SQL server. $sudo apt-get install -y mssql-server $sudo /opt/mssql/bin/...

Brief Introduction to D3.js

This post is the short notes about D3.js (Data Driven Documents) framework, It is a JavaScript framework mainly used to generate charts using HTML, DOM, Canvas and SVG. Reference: https://github.com/mbostock/d3/wiki/API-Reference Select, Append, Text: <script src="http://d3js.org/d3.v3.min.js"></script> <script> d3.select("body") .append("p") .style("color","red") .attr("allign","center") .text("Hello World"); </script> Basic SVG Shape: var canvas=d3.select("body") .append("svg") .attr("width",500) .attr("height",500); var circle = canvas.append("circle") .attr("cx",250) .attr("cy",250) .attr("r", 50) .attr("fill","red"); var rect = canvas.append("rect") .attr("width",100) .attr("heiht",59); var line = canvas.append(...

A Brief Intro of Apache Storm

Image
This post is about Apache Storm and How to install Apache Storm 0.9.4 (latest version) on Windows 7 & Ubuntu 14.04.2 with an Hello World program. Overview of Apache Storm Apache Storm is a free and open source distributed system for real-time computation. Storm is implemented in Clojure & Storm APIs are written in Java by Nathan Marz & team at BackType. Storm is best for distributed processing where unbounded streams of real time data computation requires. In contrast to batch systems like Hadoop, which often introduce delay of hours, Storm allows us to process online data.Storm is extremely fast, with the ability to process over a million records per second per node on a cluster of modest size. About Nathan Marz Nathan Marz was the lead engineer on Twitter's Publisher Analytics team. Previously Nathan was the lead engineer of BackType which was acquired by Twitter in July of 2011. On march 2013 he left Twitter to start-up his own company He is a major bel...

Install Hadoop 2.5.1 on Windows 7 - 64Bit Operating System

Image
This post is about installing Single Node Cluster Hadoop 2.5.1 (latest stable version) on Windows 7 Operating Systems.Hadoop was primarily designed for Linux platform. Hadoop supports for windows from its version 2.2, but we need prepare our platform binaries. Hadoop official website recommend Windows developers to use this build for development environment and not on production, since it is not completely tested success on Windows platform. This post describes the procedure for generating the Hadoop build for Windows platform. Generating Hadoop Build For Windows Platform Step 1:Install Microsoft Windows SDK 7.1 In my case, I have used Windows 7 64 bit Operating System. Download Microsoft Windows SDK 7.1 from Microsoft Official website and install it. While installing Windows SDK,I have faced problem like C++ 2010 Redistribution is already installed. This problem will happen only if we have installed C++ 2010 Redistribution of higher version compared to the Windows SDK. ...

Install Latest Hadoop 2.4.1 on Ubuntu 14.04

This post is about Hadoop 2.4.1 (latest stable version) Single Node Cluster Installation on Ubuntu 14.04. The Hadoop Single Node Cluster Installation method are suitable only for beginners practicing. The Hadoop Multi Node Cluster is more suitable for production environment Since Hadoop is meant for distributed environment. The Multi Node Cluster Hadoop Installation steps are almost as same as Single Node Cluster Hadoop Installation with few configuration changes. My next post will cover the Multi Node Cluster Hadoop Installation. The Hadoop installation requires the pre-require steps like installing Java & ssh, creating dedicated Linux user account, disabling IPv6, generating key-gen for user account. This pre-require steps requires for Hadoop node(s) communication by Secure Shell Protocol(ssh). Disable IPv6 requires since Hadoop doesn't support for IPv6. Step 1: Install Oracle Java JDK7 on Ubuntu . Step 2: Install SSH-Server To install Open ssh server, execute th...