缘起
最近有个分布式限速的需求。支付宝的接口双11只允许每秒调用10次。
单机的限速,自然是用google guava的RateLimiter。
http://docs.guava-libraries.googlecode.com/git-history/master/javadoc/com/google/common/util/concurrent/RateLimiter.html
...
分类:
系统相关 时间:
2014-11-07 20:52:30
阅读次数:
310
mvn install:install-file -DgroupId=com.asiainfo -DartifactId=spark-assembly -Dversion=1.2.0 -Dpackaging=jar -Dfile=/home/spark/software/source/compile...
分类:
其他好文 时间:
2014-11-07 16:50:59
阅读次数:
166
Tigase是一个基于Java开发的XMPP服务器,类似于Openfire,可用于搭建一个即时通讯(Instant Messaging,简称IM)的平台。1、准备在安装Tigase之前,首先需要准备Java环境以及数据库(本文使用MySQL)。Tigase下载:https://projects.tigase.org/projects/tigase-server/files下载:tigase-ser...
分类:
系统相关 时间:
2014-11-07 14:54:36
阅读次数:
394
1、使用 HISTTIMEFORMAT 显示时间戳当你从命令行执行 history 命令后,通常只会显示已执行命令的序号和命令本身。如果你想要查看命令历史的时间戳,那么可以执行:# export HISTTIMEFORMAT='%F %T '# history | more1 2008-08-05 ...
分类:
系统相关 时间:
2014-11-06 21:41:12
阅读次数:
241
value reduceByKey is not a member of org.apache.spark.rdd.RDD[(String, Int)]
分类:
其他好文 时间:
2014-11-06 19:08:13
阅读次数:
1293
Apache Mesos是一个集群管理器,提供了有效的、跨分布式应用或框架的资源隔离和共享,可以运行Hadoop、MPI、Hypertable、Spark。oschina.net -集群管理器 Apache Mesos
分类:
其他好文 时间:
2014-11-06 16:26:10
阅读次数:
794
这两天在看Spark HistoryServer的代码,发现里面使用了Jetty,下面简单描述下Jetty的使用有两个Servlet:HelloServlet和WorldServletpackage com.luogankun.servlet;import java.io.IOException;i...
分类:
其他好文 时间:
2014-11-06 12:51:02
阅读次数:
188
set cursorlineset history=1700set nocompatible "去掉讨厌的有关vi一致性模式,避免以前版本的一些bug和局限 set nufiletype plugin onfiletype indent onset autoreadset so=7set wildm...
分类:
系统相关 时间:
2014-11-05 23:03:11
阅读次数:
483
转载来自:http://www.cnblogs.com/spark-china/p/3941878.html在VMWare 中准备第二、第三台运行Ubuntu系统的机器;在VMWare中构建第二、三台运行Ubuntu的机器和构建第一台机器完全一样,再次不在赘述。。与安装第一台Ubuntu机器不同的几...
分类:
系统相关 时间:
2014-11-05 19:38:56
阅读次数:
1295
田忌赛马
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述Here is a famous story in Chinese history.
"That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to...
分类:
其他好文 时间:
2014-11-05 14:57:11
阅读次数:
143