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 | |
log=/alidata1/data/hdfs/nodemanager_log | |
rsync -avc root@ZERONE-01:/alidata1/data/hdfs/nodemanager_log/ $log | |
current_dir=`pwd` | |
origin_log_dir=/alidata1/data/hdfs/nodemanager_log | |
cd $origin_log_dir | |
target_dir=`ls -t | head -n 1` | |
cd $origin_log_dir/$target_dir |
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
1sudo apt-get install compiz meta | |
2 metacity --replace & | |
3 /etc/profile | |
4 fcitx | |
sudo add-apt-repository ppa:fcitx-team/nightly | |
sudo apt-get update | |
sudo apt-get install fcitx-sogoupinyin | |
mirrors.aliyun.com/deepin/pool/non-free/f/fcitx-sogoupinyin-release/ | |
fcitx-light-UI |
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
1 清理日志 | |
j log | |
cd $SPARK_HOME &&spark-submit --class org.apache.spark.examples.SparkPi \ | |
--master yarn-cluster \ | |
--num-executors 3 \ | |
--driver-memory 4g \ | |
--executor-memory 2g \ | |
--executor-cores 1 \ | |
lib/spark-examples*.jar \ |
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
find . -type f -print | xargs grep "some string" |
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
1. java style check | |
http://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-checker-config.html | |
http://stackoverflow.com/questions/12180765/maven-check-style-as-a-part-of-the-build |
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
def merge(m1: Map[String, Int], m2: Map[String, Int]): Map[String, Int] = | |
m1 ++ m2.map { case (k, v) => k -> (v + m1.getOrElse(k, 0)) } |
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 java.util | |
import org.scalatest.FunSuite | |
import scala.util.parsing.json._ | |
import org.json.JSONObject | |
import scala.collection.JavaConverters._ | |
/** | |
* Created by haiy on 5/21/15. | |
*/ |
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 | |
#author: haiy | |
#date: Mon Mar 30 17:01:00 CST 2015 | |
src=$1 | |
dst=$2 | |
tmp=$dst"_tmp" | |
red=$'\e[31m' | |
reset=$'\e[0m' | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: clone_table source_table_name target_table_name" |
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
dz-h@dzh-H:~/Desktop/kaggle_test/csv_data$ time mysqlimport --use-threads 10 --fields-terminated-by , -uroot -proot --local kaggle app_events.csv | |
mysqlimport: [Warning] Using a password on the command line interface can be insecure. | |
kaggle.app_events: Records: 32473068 Deleted: 0 Skipped: 0 Warnings: 3 | |
real 2m28.837s | |
user 0m0.084s | |
sys 0m0.568s |
OlderNewer