Interface TaskWriter<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void abort()
      Close the writer and delete the completed files if possible when aborting.
      WriteResult complete()
      Close the writer and get the completed data and delete files.
      default DataFile[] dataFiles()
      Close the writer and get the completed data files, it requires that the task writer would produce data files only.
      void write​(T row)
      Write the row into the data files.
      • Methods inherited from interface java.io.Closeable

        close
    • Method Detail

      • write

        void write​(T row)
            throws java.io.IOException
        Write the row into the data files.
        Throws:
        java.io.IOException
      • abort

        void abort()
            throws java.io.IOException
        Close the writer and delete the completed files if possible when aborting.
        Throws:
        java.io.IOException - if any IO error happen.
      • dataFiles

        default DataFile[] dataFiles()
                              throws java.io.IOException
        Close the writer and get the completed data files, it requires that the task writer would produce data files only.
        Returns:
        the completed data files of this task writer.
        Throws:
        java.io.IOException
      • complete

        WriteResult complete()
                      throws java.io.IOException
        Close the writer and get the completed data and delete files.
        Returns:
        the completed data and delete files of this task writer.
        Throws:
        java.io.IOException