Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-987

Extend TypeSerializers and -Comparators to work directly on Memory Segments

Agile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersStop watchingWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      As per discussion with [~till.rohrmann], Ufuk Celebi, Aljoscha Krettek, we suggest to change the way that the TypeSerialzers/Comparators and DataInputViews/DataOutputViews work.

      The goal is to allow more flexibility in the construction on the binary representation of data types, and to allow partial deserialization of individual fields. Both is currently prohibited by the fact that the abstraction of the memory (into which the data goes) is a stream abstraction (DataInputView, DataOutputView).

      An idea is to offer a random-access buffer like view for construction and random-access deserialization, as well as various methods to copy elements in a binary fashion between such buffers and streams.

      A possible set of methods for the TypeSerializer could be:

      long serialize(T record, TargetBuffer buffer);
      	
      T deserialize(T reuse, SourceBuffer source);
      	
      void ensureBufferSufficientlyFilled(SourceBuffer source);
      	
      <X> X deserializeField(X reuse, int logicalPos, SourceBuffer buffer);
      	
      int getOffsetForField(int logicalPos, int offset, SourceBuffer buffer);
      	
      void copy(DataInputView in, TargetBuffer buffer);
      	
      void copy(SourceBuffer buffer,, DataOutputView out);
      	
      void copy(DataInputView source, DataOutputView target);
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            sewen Stephan Ewen

            Dates

              Created:
              Updated:

              Slack

                Issue deployment