Skip to content

Instantly share code, notes, and snippets.

View DonDebonair's full-sized avatar

Daan Debie DonDebonair

View GitHub Profile
@guyrt
guyrt / gist:5268176
Created March 29, 2013 01:37
Installer for sqoop on Amazon's EMR
#!/bin/bash
# Install sqoop and mysql connector. Store in s3 and load
# as bootstrap step.
bucket_location='<put your bucket here>'
sqoop_jar='sqoop-1.4.3.bin__hadoop-1.0.0'
sqoop_jar_gz=$sqoop_jar.tar.gz
mysql_dir='mysql-connector-java-5.1.24'
mysql_jar='mysql-connector-java-5.1.24-bin.jar'
mysql_dir_gz=$mysql_dir.tar.gz
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Three comparison points:
Presto + RCFile vs Impala + RCFile vs Impala + Parquet
Note: Query time, CPU utilization, Disk read tput (KBRead)
Impala v1.1.1
Presto v0.52
================================================================================================================================
Presto + RCFile:
select ss_sold_date_sk, count(*) from store_sales_rcfile group by 1 order by 1 limit 2000;
@chrishamant
chrishamant / s3_multipart_upload.py
Created January 3, 2012 19:29
Example of Parallelized Multipart upload using boto
#!/usr/bin/env python
"""Split large file into multiple pieces for upload to S3.
S3 only supports 5Gb files for uploading directly, so for larger CloudBioLinux
box images we need to use boto's multipart file support.
This parallelizes the task over available cores using multiprocessing.
Usage:
s3_multipart_upload.py <file_to_transfer> <bucket_name> [<s3_key_name>]
@Deraen
Deraen / 00_notes.md
Last active October 1, 2019 08:40
Compojure-api and Buddy
  • (:identity req) is auth backend independent way to access user data
  • login and logout implementation depends on auth backend
  • :current-user doesn't imply that authentication is required, route should also have :auth-rules if authentication is required
@smougenot
smougenot / A_Logstash.conf
Created July 26, 2012 13:59
Logstash Multiline Filter for Java Stacktrace (tested on field)
# stacktrace java as one message
multiline {
#type => "all" # no type means for all inputs
pattern => "(^.+Exception: .+)|(^\s+at .+)|(^\s+... \d+ more)|(^\s*Caused by:.+)"
what => "previous"
}
#!/bin/bash
PACKAGE=$(basename "$0")
# .----. _ .-. _ _
# `--. ::_;: :.-. :_;:_;
# ,','.-.: `'.' .--. .-..-.
# .'.'_ : :: . `.' '_.': :: :
# :____;:_;:_;:_;`.__.': ::_;
# .-. :
@coolhva
coolhva / config.gateway.json
Created December 7, 2021 20:59
pi-hole-nat
{
"system": {
"offload": {
"ipv4": {
"forwarding": "enable",
"gre": "enable",
"pppoe": "enable",
"vlan": "enable"
},
"ipv6": {