Esempio n. 1
0
        /// <exception cref="System.IO.IOException"/>
        public virtual void Write(DataOutput @out)
        {
            Text.WriteString(@out, inputSplitClass.FullName);
            Text.WriteString(@out, inputFormatClass.FullName);
            Text.WriteString(@out, mapperClass.FullName);
            SerializationFactory factory = new SerializationFactory(conf);

            Org.Apache.Hadoop.IO.Serializer.Serializer serializer = factory.GetSerializer(inputSplitClass
                                                                                          );
            serializer.Open((DataOutputStream)@out);
            serializer.Serialize(inputSplit);
        }
Esempio n. 2
0
 /// <summary>Write splits in the following format.</summary>
 /// <remarks>
 /// Write splits in the following format.
 /// <c>&lt;count&gt;&lt;class1&gt;&lt;class2&gt;...&lt;classn&gt;&lt;split1&gt;&lt;split2&gt;...&lt;splitn&gt;
 ///     </c>
 /// </remarks>
 /// <exception cref="System.IO.IOException"/>
 public virtual void Write(DataOutput @out)
 {
     WritableUtils.WriteVInt(@out, splits.Length);
     foreach (InputSplit s in splits)
     {
         Text.WriteString(@out, s.GetType().FullName);
     }
     foreach (InputSplit s_1 in splits)
     {
         SerializationFactory factory = new SerializationFactory(conf);
         Org.Apache.Hadoop.IO.Serializer.Serializer serializer = factory.GetSerializer(s_1
                                                                                       .GetType());
         serializer.Open((DataOutputStream)@out);
         serializer.Serialize(s_1);
     }
 }