问题描述
遵循 Hadoop:如何访问(许多)要由 map/reduce 处理的照片图像? 问题,其中 orangeoctopus 提供了加载图像二进制文件并将它们收集到 SequenceFiles
以提供给映射器的合理方向.
Following Hadoop: how to access (many) photo images to be processed by map/reduce? question, where orangeoctopus provides a reasonable direction to load the image binaries and collect them into SequenceFiles
to feed the mapper.
认为这对其他人也可能有用,作为本地 java 进程或在大量图像文件的情况下可能是 hadoop 作业,我创建了这个单独的问题来寻找实现的示例.
Think this could be useful for the others also, as a local java process or probably a hadoop job in case of vast amount image files, I created this separate question to look for the example for the implementation.
谢谢!
推荐答案
Hadoop:权威指南 - 第 4 章有一些读取/写入序列文件的示例.这是相同的代码.浏览代码并将其更改为二进制图像作为序列文件的输入.
Hadoop: The Definitive Guide - Chapter 4 has some samples for reading/writing sequence files. Here is the code for the same. Go through the code and change it for the binary images as input for the sequence file.
这篇关于Hadoop:生成带有要在 map/reduce 中处理的图像二进制文件的 SequenceFile 的示例过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!