I tried to use Metadata to store the count of entries in a SequenceFile.I don't know the entry count only after all the data is appended to the file. But the Metadata is written in the "header" before any data append. Won't be better if the Metadata will be appended to the SequenceFile (in close method) ? In this way we can add metadata that is known only when we finished appending data to the SequenceFile (like entry count).
John