Skip to content

Instantly share code, notes, and snippets.

View jumping's full-sized avatar
🎯
Focusing

Jumping Qu jumping

🎯
Focusing
  • Shanghai, China
View GitHub Profile
@jumping
jumping / CDHTez.md
Created June 19, 2018 06:32 — forked from epiphani/CDHTez.md
Getting Tez enabled on CDH5.4+

So Hive in CDH is horribly, painfully slow. Cloudera ships Hive 1.1, which is actually moderately modern. It is, however, very badly configured out of the box and patched with custom code from Cloudera. With a bit of effort, we managed to improve hive performance considerably. We really shouldn't have to do this, but Cloudera is actively working against supporting a performant Hive.

First, building Tez was fairly straightforward. Using the instructions at https://github.com/apache/tez/blob/master/docs/src/site/markdown/install.md, the only change was to use the version string "2.6.0" for the build. I believe that was the default. Don't use the CDH string, it won't work.

At the bottom of the installation instructions, there's mention of the fact that to use the local hadoop jars (rather than those packaged with tez) you must unpack the jars in HDFS rather than using the tarball. In this case, unpack the tez-minimal tarball and upload the contents to /apps/tez-0.7.0 (or whatever you prefer). Don't fo

@jumping
jumping / Linux Static IP
Created November 14, 2017 09:20 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@jumping
jumping / nvm.install.sh
Last active November 2, 2017 07:55
nvm inital script
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
nvm_has() {
type "$1" > /dev/null 2>&1
}
if [ -z "$NVM_DIR" ]; then
NVM_DIR="$HOME/.nvm"
@jumping
jumping / 1_simple.go
Created June 25, 2017 07:35 — forked from sosedoff/1_simple.go
Golang Custom Struct Tags Example
package main
import (
"fmt"
"reflect"
)
// Name of the struct tag used in examples
const tagName = "validate"
@jumping
jumping / mysql.py
Created September 2, 2016 10:08
an mysql lookup Module for Ansible
#!/usr/bin/python
"""
Example Usage:
{{ lookup('mysql', ('1x.1xx.x.12', 'username', 'passwd', 'db_name', 'table_name', 'key_name')) }}
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.errors import AnsibleError
from ansible.plugins.lookup import LookupBase
// Copyright 2015 The Prometheus Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@jumping
jumping / sysctl.conf
Last active July 4, 2016 11:53 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@jumping
jumping / golang_job_queue.md
Created June 20, 2016 02:08 — forked from harlow/golang_job_queue.md
Job queues in Golang
#https://play.golang.org/p/bGs5TPZksJ
#http://nathanleclaire.com/blog/2014/08/09/dont-get-bitten-by-pointer-vs-non-pointer-method-receivers-in-golang/
import "fmt"
type foo struct {
name string
}
type bar struct {
f *foo
➜ testing terraform apply -target=aws_db_subnet_group.rds_one
aws_vpc.main: Creating...
cidr_block: "" => "10.0.0.0/16"
default_network_acl_id: "" => "<computed>"
default_security_group_id: "" => "<computed>"
dhcp_options_id: "" => "<computed>"
enable_classiclink: "" => "<computed>"
enable_dns_hostnames: "" => "true"
enable_dns_support: "" => "true"
instance_tenancy: "" => "<computed>"