Skip to content

Instantly share code, notes, and snippets.

View jonefeewang's full-sized avatar

jonefee wang jonefeewang

View GitHub Profile
@jonefeewang
jonefeewang / file0.txt
Created June 7, 2019 09:01 — forked from giwa/file0.txt
Install g++/gcc 4.8.2 in CentOS 6.6 ref: http://qiita.com/giwa/items/28c754d8fc2936c0f6d2
$ wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils
$ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran
@jonefeewang
jonefeewang / benchmark-commands.txt
Created March 15, 2018 11:21 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@jonefeewang
jonefeewang / install_thrift.sh
Created October 27, 2017 09:22 — forked from amuraru/install_thrift.sh
install thrift 0.8.0
#/bin/bash
set -e
wget http://archive.apache.org/dist/thrift/0.8.0/thrift-0.8.0.tar.gz
tar zxf thrift-0.8.0.tar.gz
pushd thrift-0.8.0
wget https://issues.apache.org/jira/secure/attachment/12511532/thrift-1465_1.patch
patch -p0 < thrift-1465_1.patch
wget https://issues.apache.org/jira/secure/attachment/12537024/THRIFT-1474-read-exceptions-first.patch
#!/bin/sh
set -x
set -e
NUM_CPUS=`grep -c ^processor /proc/cpuinfo`
echo "building using $NUM_CPUS CPUs"
ENVOY_DIR=/opt/envoy_env
@jonefeewang
jonefeewang / tomcat-service.sh
Created December 22, 2016 07:30 — forked from lesstif/tomcat-service.sh
RHEL/CentOS tomcat7 init.d service script.
#!/bin/bash
#
# tomcat
#
# chkconfig: 345 96 30
# description: Start up the Tomcat servlet engine.
#
# processname: java
# pidfile: /var/run/tomcat.pid
#
private final class Handler implements HelloService.AsyncIface {
@Override
public void hello(String name, AsyncMethodCallback resultHandler) throws TException {
setAsyncResult(resultHandler, CompletableFuture.completedFuture("hello"));
}
}
public static <T> void setAsyncResult(AsyncMethodCallback<T> resultHandler,
ListenableFuture<T> future) {
Futures.addCallback(future, new FutureCallback<T>() {