This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<div id ="resultLen"></div> | |
<div id ="resultSearch"></div> | |
</body> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = [ | |
"Hydrogen", | |
"Helium", | |
"Lithium", | |
"Beryllium" | |
]; | |
var a2 = function(s){ return s.length }; | |
var a3 = ((s) => s.length); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.apt.server; | |
import kafka.producer.KeyedMessage; | |
import kafka.producer.ProducerConfig; | |
import java.util.Properties; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. You can follow https://gist.github.com/piyasde/17d4f7bc97c0f0820d40 for single node setup for all the machines in cluster | |
2. Make a user group for Hadoop Users | |
3. Make same user for hadoop in all the machines where the hadoop setup will be done | |
4. Select a machine which will be master node. | |
On that machine vi /etc/hosts and add the ip a name as master not localhost. | |
vi /etc/hosts | |
#127.0.0.1 localhost | |
#127.0.1.1 ubupc1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 0 - | |
Update your machine with - | |
$ sudo apt-get install ssh | |
$ sudo apt-get install rsync | |
###Machine 1(master). | |
Pre-requisite: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mt; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.cfg.Configuration; | |
public class HibernateUtil { | |
private static final SessionFactory sessionFactory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var morgan = require('morgan'); | |
var bodyParser = require('body-parser'); | |
var methodOverride = require('method-override'); | |
var app = express(); | |
app.use(express.static(__dirname + '/public')); // set the static files location /public/img will be /img for users | |
app.use(morgan('dev')); // log every request to the console | |
app.use(bodyParser()); // pull information from html in POST | |
app.use(methodOverride()); // simulate DELETE and PUT |