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 job -list | |
| hadoop job -kill <job_id> |
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
| import json | |
| from boto3 import client | |
| def date_handler(obj): | |
| if hasattr(obj, 'isoformat'): | |
| return obj.isoformat() | |
| else: | |
| raise TypeError |
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
| from boto3 import client | |
| cluster_id = "<cluster-id>" | |
| eip = "<ip>" | |
| emrclient = client('emr', 'us-east-1') | |
| master_instance =emrclient.list_instances(ClusterId=cluster_id, InstanceGroupTypes=['MASTER']) | |
| master_ec2_id = master_instance['Instances'][0]['Ec2InstanceId'] | |
| ec2client = client('ec2', 'us-east-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
| sudo visudo | |
| [yourusername] ALL=(ALL) NOPASSWD:ALL | |
| sudo -u [yourusername] sudo echo "success" |
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
| func init() { | |
| var err error | |
| client, err := minio.New("doc_gen_minio:9000", "accesss", "secret", false) | |
| if err != nil { | |
| panic(err) | |
| } | |
| err = client.MakeBucket("output", "") | |
| if err != nil { |
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
| defmodule Web.Tcp.Protocol do | |
| require Logger | |
| alias Web.Gateway | |
| @moduledoc """ | |
| Server messages: | |
| - `l:logs` | |
| logs - should come as json array and encoded base64 |
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
| mvn install:install-file -Dfile=libparam.jar \ | |
| -DgroupId=example.param -DartifactId=example.param\ | |
| -Dversion=0.0.0 -Dpackaging=jar |
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
| FROM golang:latest | |
| RUN apt-get install -y git | |
| RUN ln -fsn /usr/local/go/bin/go /usr/local/bin/go | |
| RUN cd /tmp/ && wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.tar.gz && \ | |
| tar -zxf jdk-8u5-linux-x64.tar.gz && mv jdk1.8.0_05 /opt/ | |
| RUN update-alternatives --install /usr/bin/java java /opt/jdk1.8.0_05/bin/java 100 | |
| RUN update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_05/bin/javac 100 |
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
| make build | |
| make test | |
| make test TEST_CASE=spec/example_spec.rb |
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
| require 'rspec' | |
| require 'ostruct' | |
| require 'excon' | |
| require 'docker' | |
| require 'securerandom' | |
| Excon.defaults[:write_timeout] = 20000 | |
| Excon.defaults[:read_timeout] = 20000 | |
| class String |