Skip to content

Instantly share code, notes, and snippets.

View nalingarg2's full-sized avatar

nalin nalingarg2

View GitHub Profile
useradd -m build
passwd build
yum list rpm*
yum install -y rpmdevtools rpm-build
exit
rpmdev-setuptree

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
<project>
<repositories>
<repository>
<id>cdh.repo</id>
<url>https://repository.cloudera.com/content/groups/cloudera-repos</url>
<name>Cloudera Repository</name>
</repository>
</repositories>
<dependencies>
Smoke Test
curl -X GET -u "admin:admin" -i http://cm-host:7180/api/v9/tools/echo?message=hello
Cluster Creation
curl -X POST -u "admin:admin" -i \
-H "content-type:application/json" \
-d '{ "items": [
{
"name": "test",
"version": "CDH4"
git init .
git add .
git commit -am "my first commit"
git status
git remote add kinesis https://github.com/nalingarg2/Grad101Infrastructure.git
git remote -v
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>df</groupId>
<artifactId>df</artifactId>
<version>1.0-SNAPSHOT</version>
@nalingarg2
nalingarg2 / gist:eb852f77193325202fa4
Last active January 7, 2020 06:40
kafka with Spark Streaming
#
# Hadoop:: KafkaSpark
# Recipe:: Kafka and Spark
#
# Copyright (C) 2015 Cloudwick labs
# Contact :: nalin.garg@cloudwick.com
# All rights reserved - Do Not Redistribute
#
#One machine is required as below mentioned steps are for POC purpose only.
http://blog.cloudera.com/blog/2013/03/how-to-create-a-cdh-cluster-on-amazon-ec2-via-cloudera-manager/
@nalingarg2
nalingarg2 / gist:3a295cad33125ab8ce70
Created April 10, 2015 19:09
cloudera manager sql database for amon etc
To create the MySQL databases for Cloudera Manager:
Log into MySQL as the root user:
$ mysql -u root -p
Enter password:
Create a database for the Activity Monitor. The database name, user name, and password can be anything you want. For example:
mysql> create database amon DEFAULT CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password';
#https://docs.puppetlabs.com/learning/agent_master_basic.html
┌───────────────┬───────────────────┐
│ Pre-2.6 │ Post-2.6 │
├───────────────┼───────────────────┤
│ puppetmasterd │ puppet master │
│ puppetd │ puppet agent │
│ puppet │ puppet apply │
│ puppetca │ puppet cert │
│ ralsh │ puppet resource │