【问题标题】:How to get image (stored in avro format) from hbase and store in local file system如何从 hbase 获取图像(以 avro 格式存储)并存储在本地文件系统中
【发布时间】:2026-01-20 15:20:02
【问题描述】:

我使用 Flume 代理将图像(.jpg)传输到 HBase。现在我想获取该图像并存储在磁盘(本地文件系统)中,是否有一个实用程序可以将图像(存储为 Avro)转换为实际图像并存储在磁盘中。

【问题讨论】:

    标签: hbase avro


    【解决方案1】:

    我可能建议分两个阶段进行。

    1. 使用hbase shellscan 表并将内容提取到文件Get output from scans in hbase shell

    2. 使用 avrò-tools 将 avrò 文件转换为原始文件(图片?)java -jar ~/avro-tools-1.7.4.jar fromjson

    【讨论】:

    • 我可以将数据导入文件,但我无法使用 avro-tools 可用选项将文件转换为图像...
    • 可用工具:编译。 concat fragtojson fromjson fromtext getmeta getschema idl 引发反射。 jsontofrag recodec rpcprotocol rpcreceive rpcsend 发送单个 RPC 消息。系绳 tojson totext trevni_random schema.trevni_tojson
    最近更新 更多