[英]How to Aggregate the camel hdfs chunks into temporary file and read from it
我有一条骆驼hdfs组件从HDFS读取文件的路线。 骆驼HDFS组件按块读取文件。 因此,如何聚合所有块并写入文件或任何其他输出源。 这样一来,以后可以用\\ n的拆分器读取它,逐记录地读取提取记录并执行进一步的处理。
HDFS文件在这里很大。
使用HDFS读取
<from uri="hdfs://server:port/path?owner=xxxxxx&chunkSize=xxxxx&pattern=xxxxx&delay=xxxx&initialDelay=xxxx&readSuffix=xxxx&connectOnStartup=xxxxx" />
这将根据块大小读取块,然后使用
<aggregate strategyRef="aggregationStrategyRef">
<correlationExpression>
<simple>header.CamelFileName</simple>
</correlationExpression>
<completionPredicate>
***Specify the predicate***
</completionPredicate>
<to uri="direct:routeNext"/>
</aggregate>
下一步是实现用于AggregationStrategyRef的bean并在骆驼JNDI注册中心中注册。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.