This file contains 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
#!/bin/bash | |
# Install Hadoop 2 using pdsh/pdcp where possible. | |
# | |
# Command can be interactive or file-based. This script sets up | |
# a Hadoop 2 cluster with basic configuration. Modify data, log, and pid | |
# directories as desired. Further configure your cluster with ./conf-hadoop2.sh | |
# after running this installation script. | |
# | |
# Basic environment variables. Edit as necessary |
This file contains 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 subprocess | |
import pycurl | |
import time | |
from urllib import urlencode | |
from StringIO import StringIO | |
import re | |
from io import BytesIO | |
def refreshIP(): | |
print "Refreshing IP..." |
This file contains 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
#!/usr/bin/env bash | |
# Start all hadoop daemons. Run this on master node. | |
bin=`dirname "${BASH_SOURCE-$0}"` | |
bin=`cd "$bin"; pwd` | |
rm_logfile_name=yarn-yarn-resourcemanager-`hostname`.log | |
nm_logfile_name=yarn-yarn-nodemanager-`hostname`.log | |
This file contains 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
<settings> | |
<profiles> | |
<profile> | |
<id>nexus</id> | |
<repositories> | |
<repository> | |
<id>local-repository</id> | |
<name>local private repository</name> | |
<url>http://10.64.12.230:8081/nexus/content/groups/public</url> | |
<releases> |
This file contains 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
#查看 mysql 正在进行的进程 | |
show processlist; | |
mysqladmin processlist -h 10.4.243.25 -P 6002 -uq3boy -p123 | |
# transcation 部分可以看到那个 thread 给 lock 了,然后杀掉解锁 | |
SHOW ENGINE INNODB STATUS \G; | |
#杀掉 mysql 任务 | |
kill id |
This file contains 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 akka.actor.AbstractExtensionId; | |
import akka.actor.ExtendedActorSystem; | |
import akka.actor.Extension; | |
import akka.actor.Props; | |
import akka.routing.FromConfig; | |
import org.springframework.context.ApplicationContext; | |
/** | |
* An Akka Extension to provide access to Spring managed Actor Beans. | |
*/ |
This file contains 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 akka.actor.Actor; | |
import akka.actor.IndirectActorProducer; | |
import org.springframework.context.ApplicationContext; | |
/** | |
* An actor producer that lets Spring create the Actor instances. | |
*/ | |
public class SpringActorProducer implements IndirectActorProducer { | |
final ApplicationContext applicationContext; | |
final String actorBeanName; |
This file contains 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
#!/bin/bash | |
# this script installs GCC 4.9.3 | |
# to use it navigate to your home directory and type: | |
# sh install-gcc-4.9.3.sh | |
# download and install gcc 4.9.3 | |
wget https://ftp.gnu.org/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.gz | |
tar xzf gcc-4.9.3.tar.gz | |
cd gcc-4.9.3 |
This file contains 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
#!/bin/sh | |
ts=$(date +"%s") | |
jvmPid=$1 | |
defaultLines=100 | |
defaultTop=20 | |
threadStackLines=${2:-$defaultLines} | |
topThreads=${3:-$defaultTop} | |
This file contains 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
class Bazel < Formula | |
desc "Google's own build tool" | |
homepage "https://bazel.build/" | |
url "https://github.com/bazelbuild/bazel/releases/download/0.15.0/bazel-0.15.0-dist.zip" | |
sha256 "c3b716e6625e6b8c323350c95cd3ae0f56aeb00458dddd10544d5bead8a7b602" | |
depends_on :java => "1.8" | |
depends_on :macos => :yosemite | |
def install |
OlderNewer