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
#Prepare environment | |
sudo apt-get update | |
sudo apt-get install -y openjdk-7-jdk | |
sudo apt-get install -y jmeter | |
sudo apt-get install -y unzip | |
wget http://jmeter-plugins.org/downloads/file/JMeterPlugins-Standard-1.2.0.zip | |
wget http://jmeter-plugins.org/downloads/file/JMeterPlugins-Extras-1.2.0.zip | |
wget http://jmeter-plugins.org/downloads/file/JMeterPlugins-ExtrasLibs-1.2.0.zip |
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
library(plyr) | |
block.size = 128 * 1024 * 1024 | |
files.informations <- read.csv('workflow.csv', header=FALSE, stringsAsFactors=F) | |
files <- files.informations[c("V5", "V8")] | |
colnames(files) <- c("size", "filepath") | |
for(i in 1:nrow(files)) { | |
splitted.path <- strsplit(files[i,"filepath"], "/") |
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
SELECT user_name FROM v_catalog.users; | |
SELECT database_name FROM databases; | |
SELECT schema_name FROM v_catalog.schemata; | |
SELECT table_name FROM tables WHERE table_schema = 'my_schema'; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="2.6" jmeter="2.11 r1554548"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> |
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
#Based on Petr's code - https://github.com/PetrVales | |
#You need PiggyBank library | |
#info: https://cwiki.apache.org/confluence/display/PIG/PiggyBank | |
#jar: http://search.maven.org/#search%7Cga%7C1%7Cpiggybank | |
#start pig in local mode | |
pig -x local | |
#register PiggyBank library |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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 (shakespeare:Author { firstname: 'William', lastname: 'Shakespeare' }), | |
(juliusCaesar:Play { title: 'Julius Caesar' }), | |
(shakespeare)-[:WROTE_PLAY { year: 1599 }]->(juliusCaesar), | |
(theTempest:Play { title: 'The Tempest' }), | |
(shakespeare)-[:WROTE_PLAY { year: 1610}]->(theTempest), | |
(rsc:Company { name: 'RSC' }), | |
(production1:Production { name: 'Julius Caesar' }), | |
(rsc)-[:PRODUCED]->(production1), | |
(production1)-[:PRODUCTION_OF]->(juliusCaesar), | |
(performance1:Performance { date: 20120729 }), |
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
#resources | |
https://pig.apache.org/ | |
http://hortonworks.com/hadoop-tutorial/how-to-use-basic-pig-commands/ | |
http://engineering.linkedin.com/open-source/introducing-datafu-open-source-collection-useful-apache-pig-udfs | |
http://pig.apache.org/docs/r0.7.0/piglatin_ref2.html | |
#terminal | |
hadoop dfs -copyFromLocal /tmp/NYSE_daily_prices_A.csv /NYSE_daily_prices_A.csv | |
###Following operation may not make sense for stack data, but I using them only for playing with Pig. |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
➜ hadoop --version | |
Error: No command named `--version' was found. Perhaps you meant `hadoop -version' | |
➜ hadoop -version | |
Error: No command named `-version' was found. Perhaps you meant `hadoop version' | |
➜ hadoop version | |
Hadoop 2.2.0 |