Netty是Java NIO之上的网络库(API)。Netty 提供异步的、事件驱动的网络应用程序框架和工具,用以快速开发高性能、高可靠性的网络服务器和客户端程序。我构建了一个Netty项目模板:avro-channel。目的是结合Netty和Avro实现异步数据传输和RPC(远程过程调用)。...
分类:
Web程序 时间:
2015-03-13 12:42:47
阅读次数:
227
android多渠道批量打包 使用python实现 只需要修改channel文件,添加你需要的渠道名称 在终端运行就可以了
使用提示步骤:
一、下载python安装包,python 2.7.9下载地址:https://www.python.org/downloads/ 直接运行傻瓜式安装,只要稍稍注意安装的路径就可以了。
比如我是安装在 D:\Python\Python27,那么在我的电脑环境变量path中添加D:\Python\Python27;
打开cmd 并输入python可以正常查看...
分类:
移动开发 时间:
2015-03-12 11:37:35
阅读次数:
3874
flume可以监控并管理组件的运行状态,在组件关闭的时候可以自动拉起来,原理是通过启动一个计划任务线程池(monitorService,线程的最大数量为30),运行监控线程(MonitorRunnable线程),每隔3s判断组件(包括Channel,SinkRunner)的状态是否符合要求(可用的状态由两种START和..
分类:
Web程序 时间:
2015-03-12 01:04:09
阅读次数:
2319
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 /dev/ttyUSB0
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
sent [LCP ConfAck id=0x0 ]
rcvd ...
分类:
Web程序 时间:
2015-03-11 12:58:59
阅读次数:
291
TimeServer.javapackage netty.timeserver.server;import io.netty.bootstrap.ServerBootstrap;import io.netty.channel.ChannelFuture;import io.netty.channel...
分类:
Web程序 时间:
2015-03-10 13:32:35
阅读次数:
163
/*
* 本程序用于测试Socket中的一个中断的方法
* 对于进行的线程可以对其进行停止的中断
* 是通过SocketChannel channel = SocketChannel.open(new InetSocketAddress(host, port));
* */
package interruptible;
import java.awt.BorderLay...
分类:
其他好文 时间:
2015-03-09 16:20:20
阅读次数:
171
从官方下载的flume-ng的源码里有单元测试的代码,本文就通过单元测试来体验下flume中avro的性能如何
本文中的一个event的body内容大小是1KB,读者可自行组织文本,达到1KB即可,方便测试时,性能的计算
for (int i = 0; i < client.getBatchSize(); i++) {
Event event = channel.take()...
分类:
Web程序 时间:
2015-03-09 16:16:56
阅读次数:
5816
org.apache.flume.channel.ChannelProcessor用于实际的Event到Channel的操作(在Source中用到),可以把它想象成channel的proxy,用于控制把Eventput到哪些Channel中,以及怎么put(bacth或者单个),同时在put之前会使用Interceptor对Event进行处理。把Eventput到哪些Channel中..
分类:
其他好文 时间:
2015-03-09 01:48:39
阅读次数:
176
在agent启动时,会启动Channel,SourceRunner,SinkRunner,比如在org.apache.flume.agent.embedded.EmbeddedAgent类的doStart方法中:privatevoiddoStart(){
booleanerror=true;
try{
channel.start();//调用Channel.start启动Channel
sinkRunner.start();//调用SinkRunner.star..
分类:
其他好文 时间:
2015-03-08 17:24:39
阅读次数:
521
??
一、Accessingpixel values访问像素值。(用类自带的方法:方便,但效率不高)
cv::Mat has the a template methodat(int y, int x)
用法image.at(j,i)[channel]= value;
注意事项:the programmer needs to specify the retur...
分类:
其他好文 时间:
2015-03-08 17:12:04
阅读次数:
234