0

是否可以在 IBM infosphere 流中使用 hdfs2FileSink 运算符以 ORC 格式写入

不适用

4

1 回答 1

0

不,目前无法使用 HDFS2FileSink 运算符。它只支持文本或二进制。

streamx.parquet工具包支持写入 Parquet。

否则,您必须创建自己的 Java 运算符来接收数据并使用 ORC API 来写入数据。

如本视频所示,创建 Java 运算符相当简单。Java Operator Development 指南可以引导您完成整个过程。具体参见编写接收器运算符

创建新的 Java 运算符后,在 process 方法中添加要写入 ORC API 的代码:

  @Override
public void process(StreamingInput<Tuple> stream, Tuple tuple)
        throws Exception {
    // TODO Insert code here to process the incoming tuple, 
    // typically sending tuple data to an external system or data store.
    // String value = tuple.getString("AttributeName");
}

我将从 ORC 主页开始,为 Hive、Hadoop 选择适当的链接

于 2019-04-29T16:37:11.370 回答