私の使用例では、キーと値のペアを既存のシーケンス ファイルに追加する方法を見つける必要があります。どうやってするの?手がかりは非常に役立ちます。Hadoop 2x を使用しています。
また、以下のドキュメントに出くわしました。これを使用して追加する方法を誰か教えてもらえますか?
public static org.apache.hadoop.io.SequenceFile.Writer createWriter(FileContext fc, Configuration conf, Path name, Class keyClass, Class valClass, org.apache.hadoop.io.SequenceFile.CompressionType compressionType, CompressionCodec codec, 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