Class RetryableRecordWriter<P>

  • Type Parameters:
    P - type of the record's payload
    All Implemented Interfaces:
    RecordWriter<P>

    public class RetryableRecordWriter<P>
    extends java.lang.Object
    implements RecordWriter<P>
    Decorator that makes a RecordWriter retryable whenever the data sink is temporarily unavailable.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Method Detail

      • open

        public void open()
                  throws java.lang.Exception
        Description copied from interface: RecordWriter
        Open the writer.
        Specified by:
        open in interface RecordWriter<P>
        Throws:
        java.lang.Exception - if an error occurs during opening the writer
      • writeRecords

        public void writeRecords​(Batch<P> batch)
                          throws java.lang.Exception
        Description copied from interface: RecordWriter
        Write a batch of records to a data sink.
        Specified by:
        writeRecords in interface RecordWriter<P>
        Parameters:
        batch - of records to write.
        Throws:
        java.lang.Exception - if an error occurs during record writing
      • close

        public void close()
                   throws java.lang.Exception
        Description copied from interface: RecordWriter
        Close the writer
        Specified by:
        close in interface RecordWriter<P>
        Throws:
        java.lang.Exception - if an error occurs during closing the writer