This file contains hidden or 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
{ | |
"master_password" : "HXEHana1" | |
} |
This file contains hidden or 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
version: "3" | |
services: | |
hana: | |
image: store/saplabs/hanaexpress:${HANA_XE_VERSION:-2.00.031.00.20180712.1} | |
hostname: hxe | |
command: ['--passwords-url', 'file:////hana/hxe-config.json', '--agree-to-sap-license'] | |
ulimits: | |
nofile: 1048576 | |
sysctls: | |
- kernel.shmmax=1073741824 |
This file contains hidden or 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
## Consumer Throughput: Single consumer thread, no compression | |
## Consumer Throughput: 3 consumer thread, no compression | |
bin/kafka-consumer-perf-test.sh --topic benchmark-3-3-none \ | |
--zookeeper kafka-zk-1:2181,kafka-zk-2:2181,kafka-zk-3:2181 \ | |
--messages 15000000 \ | |
--threads 1 |
This file contains hidden or 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
'use strict'; | |
/* Origin request function */ | |
exports.handler = (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
/* | |
* Based on the value of the CloudFront-Viewer-Country header, generate an | |
* HTTP status code 302 (Redirect) response, and return a country-specific |
This file contains hidden or 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
{ | |
"name": "TweetStructure", | |
"type": "record", | |
"fields": [ | |
{"name": "version", "type": "int"}, | |
{"name": "id", "type": "long"}, | |
{"name": "text", "type": "string"}, | |
{"name": "lang", "type": "string"}, | |
{"name": "isRetweet", "type": "boolean"}, | |
{"name": "tweetedOn", "type": "string", "default": "null"} |
This file contains hidden or 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
{ | |
"name": "TweetStructure", | |
"type": "record", | |
"fields": [ | |
{"name": "version", "type": "int"}, | |
{"name": "id", "type": "long"}, | |
{"name": "text", "type": "string"}, | |
{"name": "lang", "type": "string"}, | |
{"name": "isRetweet", "type": "boolean"} | |
] |
This file contains hidden or 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
curl -X GET \ | |
http://localhost:8081/subjects/TweetStructure/versions/1 | |
# Response | |
# { | |
# "subject": "TweetStructure", | |
# "version": 1, | |
# "id": 1, | |
# "schema": "{\"type\":\"record\",\"name\":\"TweetStructure\",\"fields\":[{\"name\":\"version\",\"type\":\"int\"},{\"name\":\"id\",\"type\":\"long\"},{\"name\":\"text\",\"type\":\"string\"},{\"name\":\"lang\",\"type\":\"string\"},{\"name\":\"isRetweet\",\"type\":\"boolean\"}]}" | |
# } |
This file contains hidden or 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
# Creating a sqoop job | |
sqoop job --create categories_export -- export \ | |
--connect jdbc:mysql://quickstart:3306/sqoop_exports \ | |
--username root \ | |
--password cloudera \ | |
--table categories \ | |
--export-dir /user/cloudera/categories | |
# displaying all sqoop jobs | |
sqoop job --list | |
# Displaying a specific sqoop job |
This file contains hidden or 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
# Basic sqoop commands | |
sqoop import --connect jdbc:mysql://quickstart.cloudera:3306/retail_db \ | |
--username root \ | |
-P \ | |
--table categories \ | |
--target-dir /user/cloudera/categories_pipe \ | |
--terminated-by "\n" \ | |
--fields-seperated-by "|" | |
sqoop import --connect jdbc:mysql://quickstart.cloudera:3306/retail_db \ |
This file contains hidden or 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
create database if not exists extractions comment 'Raw imports'; | |
create database if not exists transformations comment 'Transformed Data' location '/user/hive/warehouse/transformations'; | |
use extractions; | |
create table if not exists petextracts( | |
data string | |
); | |
show tables; | |
load data inpath '/user/cloudera/case1.csv' into table petextracts; | |
select data from petextracts; | |
create table if not exists pets( |
NewerOlder