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 | |
if [ $# -lt 1 ] | |
then | |
echo $0 list-key | |
exit | |
fi | |
src_redis_host="dsff.redis.rds.aliyuncs.com" | |
src_redis_passwd="wwwww" | |
src_redis_db=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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
import sys | |
import urllib | |
import urllib2 | |
from lxml import etree | |
import time | |
import random | |
import logging |
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 python | |
# -*- coding: utf-8 -*- | |
import sys | |
import urllib | |
import urllib2 | |
from lxml import etree | |
import time | |
import random |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
) | |
var name = flag.String("name", "", "the name ") | |
var age int |
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 | |
if [ $# -lt 1 ] | |
then | |
echo $0 opt | |
echo 'list (list all topic)' | |
echo 'describe topic (describe topic info)' | |
echo 'len topic (show topic len)' | |
fi | |
case $1 in | |
list) |
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 python | |
import redis | |
print 'this is python redis test' | |
if __name__ == '__main__': | |
#redis.Redis | |
r = redis.Redis() | |
print r.dbsize() |
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 python | |
import pymongo | |
import pprint | |
print 'this is a python test' | |
mongo_host = 'localhost' | |
#http://api.mongodb.com/python/current/tutorial.html#getting-a-database |
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
#include <string> | |
#include <iostream> | |
#include <limits.h> | |
#include <unistd.h> | |
std::string getexepath() | |
{ | |
char result[ PATH_MAX ]; | |
ssize_t count = readlink( "/proc/self/exe", result, PATH_MAX ); | |
return std::string( result, (count > 0) ? count : 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
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 |
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 | |
# get dir | |
fullpath=$(readlink -f "$0") | |
path=$(dirname "$fullpath") | |
exec=$path/l2-proxy | |
#`ps -ef | grep "/root/l2/hsl-level2hq/client/"` | |
checkresult=$(ps -e -o cmd | grep -v "grep" | grep "$exec" | wc -l) | |
if [ $checkresult -eq 1 ]; |
OlderNewer