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
Using Apache Phoenix on labs: | |
export PHOENIX_HOME=/usr/hdp/2.5.0.0-1245/phoenix/ | |
export PATH=$PATH:$PHOENIX_HOME/bin | |
# Save the files us_population.sql, us_populatipn.csv and us_population_queries.sql with the below information | |
us_population.sql |
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
Sqoop takes a long time to retrieve the minimum and maximum values of the column specified in the --split-by parameter that are needed for breaking the data into multiple independent tasks. | |
mysql -u retail_dba -h nn01.itversity.com -pitversity | |
use retail_export; | |
mysql> create table int_splitby (col1 integer, col2 char(10)); | |
Query OK, 0 rows affected (0.34 sec) |
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
import org.apache.spark.{SparkConf, SparkContext} | |
import org.apache.spark.sql.SQLContext | |
object discuss { | |
def main(args: Array[String]) = { | |
val conf = new SparkConf().setAppName("file format").setMaster("local") | |
val sc= new SparkContext(conf) | |
val sqlc = new SQLContext(sc) |
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
[testkerberos@cdh000 ~]$ hadoop jar /opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/jars/hadoop-examples.jar pi 10 1000 | |
Number of Maps = 10 | |
Samples per Map = 1000 | |
Wrote input for Map #0 | |
Wrote input for Map #1 | |
Wrote input for Map #2 | |
Wrote input for Map #3 | |
Wrote input for Map #4 | |
Wrote input for Map #5 | |
Wrote input for Map #6 |
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
[vagrant@cdhnode0 ~]$ sudo fdisk /dev/vdb | |
Welcome to fdisk (util-linux 2.23.2). | |
Changes will remain in memory only, until you decide to write them. | |
Be careful before using the write command. | |
Device does not contain a recognized partition table | |
Building a new DOS disklabel with disk identifier 0x4700a9c8. | |
Command (m for help): p |
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
#Importing MySQL database to elasticsearch | |
# Importing required modules and connecting to elasticsearch | |
from pyelasticsearch import ElasticSearch | |
es = ElasticSearch('http://localhost:9200/') | |
import json | |
import requests | |
import MySQLdb |
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
//Expression | |
println("********") | |
println("Expression") | |
val c = { | |
val i = 1 | |
val j = math.pow(2, 10) | |
i - j | |
} | |
println(c) |