Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hadoop 附加到现有序列文件_Hadoop_Sequencefile - Fatal编程技术网

Hadoop 附加到现有序列文件

Hadoop 附加到现有序列文件,hadoop,sequencefile,Hadoop,Sequencefile,在我的用例中,我需要找到一种方法将键/值对附加到现有的序列文件中。怎么做?任何线索都会大有帮助。我正在使用hadoop 2x 此外,我还看到了以下文档。有人能告诉我如何使用这个附加吗 public static org.apache.hadoop.io.SequenceFile.Writer createWriter(FileContext fc, 配置配置, 路径名, 类键类, 阶级,阶级, org.apache.hadoop.io.SequenceFile.CompressionType C

在我的用例中,我需要找到一种方法将键/值对附加到现有的序列文件中。怎么做?任何线索都会大有帮助。我正在使用hadoop 2x

此外,我还看到了以下文档。有人能告诉我如何使用这个附加吗

public static org.apache.hadoop.io.SequenceFile.Writer createWriter(FileContext fc, 配置配置, 路径名, 类键类, 阶级,阶级, org.apache.hadoop.io.SequenceFile.CompressionType CompressionType, 压缩编解码器, org.apache.hadoop.io.SequenceFile.Metadata元数据, EnumSet createFlag, org.apache.hadoop.fs.Options.CreateOpts…opts) 抛出IOException

Construct the preferred type of SequenceFile Writer.

Parameters:
    fc - The context for the specified file.
    conf - The configuration.
    name - The name of the file.
    keyClass - The 'key' type.
    valClass - The 'value' type.
    compressionType - The compression type.
    codec - The compression codec.
    metadata - The metadata of the file.
    **createFlag - gives the semantics of create: overwrite, append etc.**
    opts - file creation options; see Options.CreateOpts. 
Returns:
    Returns the handle to the constructed SequenceFile Writer. 
Throws:
    IOException

仍然无法附加到现有序列文件

有一个开放的工作,但它仍然没有解决。

更新:现在它已经关闭,从版本2.6.1/2.7.2可以附加到现有的SequenceFile:)

(我当时使用的是2.7.1版,并在SequenceFile中查找append,因此我将其降级为2.6.1版,因为2.7.2版尚未发布)