Example #1
0
 /// <exception cref="System.IO.IOException"/>
 private void WriteData(FileSystem fs, int elementSize)
 {
     MapFile.Delete(fs, File);
     SetFile.Writer writer = new SetFile.Writer(fs, File, typeof(IntWritable));
     for (int i = 0; i < elementSize; i++)
     {
         writer.Append(new IntWritable(i));
     }
     writer.Close();
 }
Example #2
0
 /// <exception cref="System.IO.IOException"/>
 private static void WriteTest(FileSystem fs, RandomDatum[] data, string file, SequenceFile.CompressionType
                               compress)
 {
     MapFile.Delete(fs, file);
     Log.Info("creating with " + data.Length + " records");
     SetFile.Writer writer = new SetFile.Writer(conf, fs, file, WritableComparator.Get
                                                    (typeof(RandomDatum)), compress);
     for (int i = 0; i < data.Length; i++)
     {
         writer.Append(data[i]);
     }
     writer.Close();
 }