设为首页 加入收藏

TOP

Flume C# Thrift客户端
2019-02-19 14:07:22 】 浏览:80
Tags:Flume Thrift 客户端
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wsscy2004/article/details/19983627
Flume Thrift Source ThriftSouce.java 使用TCompactProtocol、TFastFramedTransport做协议传输层。
而我们的DSF注册系统的Thrift使用TFramedTransport做传输层。翻看Thrift的API,看两个类的区别:
```
This transport is wire compatible withTFramedTransport, but makes use of reusable, expanding read and write buffers in order to avoid allocating new byte[]s all the time. Since the buffers only expand, you should probably only use this transport if your messages are not too variably large, unless the persistent memory cost is not an issue. This implementation is NOT threadsafe.
```
貌似互相兼容、下一步C#客户端,使用TFramedTransport与Flume ThriftSouce交互、看看是否兼容
测试了半个小时、可以正常发送接受数据。

注意:event在C#里面是关键字,所以利用Thrift编译器生成客户端的接口时,要把所有event关键字改成events
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇flume架构与核心组件源代码分析 下一篇flume采集方案nginx日志到hdfs上

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目