【发布时间】:2012-01-03 14:38:54
【问题描述】:
我正在运行一个 map reduce 作业,它需要一个小输入(~3MB,大小为 z 的整数列表), 具有大小为 n x m 的稀疏矩阵缓存,并且基本上输出维度为 (n x 1) 的 z 个稀疏向量。这里的输出非常大(~2TB)。我在 Amazon EC2 上运行 20 个 m1.small 节点,并使用 S3 存储作为输入和输出。
但是,我收到 IOException: No space left on device。 似乎在 Hadoop 日志上写入了 s3 个字节,但没有创建文件。 当我使用较小的输入(较小的 z)时,工作完成后输出正确。 因此,我相信它会在临时存储上用完。
有没有办法检查这个临时存储在哪里? 另外,有趣的是日志说所有字节都写入了 s3,但我看不到任何文件,也不知道这些字节被写入哪里。
感谢您的帮助。
示例代码(也曾尝试拆分为 map 和 reduce 作业,但错误相同)
public void map(LongWritable key, Text value,
Mapper<LongWritable, Text, LongWritable, VectorWritable>.Context context)
throws IOException, InterruptedException
{
// Assume the input is id \t number
String[] input = value.toString().split("\t");
int idx = Integer.parseInt(input[0]) - 1;
// Some operations to do, but basically outputting a vector
// Collect the output
context.write(new LongWritable(idx), new VectorWritable(matrix.getColumn(idx)));
};
【问题讨论】:
标签: amazon-s3 amazon-ec2 hadoop ioexception