tcrmgr copy -port 11210 10.11.157.53 /opt/data/data/0830/database.tcb
tcrmgr inform -port 11210 -st 10.11.157.53
/opt/ttserver/tt/bin/ttserver -host 10.11.157.53 -port 11219 -thnum 1024 -dmn -pid /opt/data/data/0830/ttserver.pid -log /opt/data/data/0830/ttserver.log -le -ulog /opt/data/data/0830/ulog/ -ulim 128m -sid 53219 -rts /opt/data/data/0830/ttserver.rts /opt/data/data/0830/database.tcb#lmemb=1024#nmemb=2048#bnum=20000000
tcrmgr list -port 11219 10.11.157.53 >datakey.txt
grep -e "^CMS_OBJ" datakey.txt >cms_cache.txt
cat cms_cache.txt |wc -l
或者
tcrmgr inform -port 11210 -st 10.11.157.53
/opt/ttserver/tt/bin/ttserver -host 10.11.157.53 -port 11219 -thnum 1024 -dmn -pid /opt/data/data/0830/ttserver.pid -log /opt/data/data/0830/ttserver.log -le -ulog /opt/data/data/0830/ulog/ -ulim 128m -sid 53219 -rts /opt/data/data/0830/ttserver.rts /opt/data/data/0830/database.tcb#lmemb=1024#nmemb=2048#bnum=20000000
tcrmgr list -port 11219 10.11.157.53 >datakey.txt
grep -e "^CMS_OBJ" datakey.txt >cms_cache.txt
cat cms_cache.txt |wc -l
public static void main(String[] args) {
String path = "D:\\java\\cms_cache.txt";
XMemcachedClient client = null;
try {
BufferedReader reader = new BufferedReader(new FileReader(path));
String line;
client=new XMemcachedClient(AddrUtil.getAddresses("10.11.157.53:11219"));
long begin = System.nanoTime();
while ((line = reader.readLine()) != null) {
client.delete(line);
System.out.println("..delete key: "+line);
}
long taketime = (System.nanoTime()-begin)/1000000;
System.out.println("taketime"+taketime);
} catch (Exception e) {
System.err.println("读取文件失败。");
e.printStackTrace();
}finally{
if(client!=null){
try {
client.shutdown();
} catch (Exception e2) {
System.out.println("error");
}
}
}
或者
for a in `cat cms_kv.txt`
do
echo "$a"
tcrmgr out -port 11210 10.11.157.49 "$a"
done