예제 #1
0
        /**
         * called by the class that Is responsible for writing this sucker.
         * Subclasses should implement this so that their data Is passed back in a
         * byte array.
         *
         * @return size
         */

        protected override void Serialize(ContinuableRecordOutput out1)
        {
            SSTSerializer serializer = new SSTSerializer(field_3_strings, NumStrings, NumUniqueStrings);

            serializer.Serialize(out1);
            bucketAbsoluteOffsets = serializer.BucketAbsoluteOffsets;
            bucketRelativeOffsets = serializer.BucketRelativeOffsets;
        }
예제 #2
0
 /**
  * called by the class that Is responsible for writing this sucker.
  * Subclasses should implement this so that their data Is passed back in a
  * byte array.
  *
  * @return size
  */
 protected override void Serialize(ContinuableRecordOutput out1)
 {
     SSTSerializer serializer = new SSTSerializer(field_3_strings, NumStrings, NumUniqueStrings );
     serializer.Serialize(out1);
     bucketAbsoluteOffsets = serializer.BucketAbsoluteOffsets;
     bucketRelativeOffsets = serializer.BucketRelativeOffsets;
 }
예제 #3
0
        /**
         * called by the class that Is responsible for writing this sucker.
         * Subclasses should implement this so that their data Is passed back in a
         * byte array.
         *
         * @return size
         */

        public override int Serialize(int offset, byte [] data)
        {
            SSTSerializer Serializer = new SSTSerializer(
                   field_3_strings, NumStrings, NumUniqueStrings);
            int bytes = Serializer.Serialize(offset, data);
            bucketAbsoluteOffsets = Serializer.BucketAbsoluteOffsets;
            bucketRelativeOffsets = Serializer.BucketRelativeOffsets;
            return bytes;
        }
 private void ConfirmSize(int expectedSize)
 {
     ContinuableRecordOutput cro = ContinuableRecordOutput.CreateForCountingOnly();
     SSTSerializer ss = new SSTSerializer(strings, 0, 0);
     ss.Serialize(cro);
     Assert.AreEqual(expectedSize, cro.TotalSize);
 }