Class FileEmitter

java.lang.Object
datahub.client.file.FileEmitter
All Implemented Interfaces:
Emitter, Closeable, AutoCloseable

public class FileEmitter extends Object implements Emitter
  • Constructor Details

    • FileEmitter

      public FileEmitter(FileEmitterConfig config)
      The default constructor
      Parameters:
      config -
  • Method Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • emit

      public Future<MetadataWriteResponse> emit(datahub.event.MetadataChangeProposalWrapper mcpw, Callback callback) throws IOException
      Description copied from interface: Emitter
      Asynchronously emit a MetadataChangeProposalWrapper event.
      Specified by:
      emit in interface Emitter
      callback - if not null, is called from the IO thread. Should be a quick operation.
      Returns:
      a Future for callers to inspect the result of the operation or block until one is available
      Throws:
      IOException
    • emit

      public Future<MetadataWriteResponse> emit(com.linkedin.mxe.MetadataChangeProposal mcp, Callback callback) throws IOException
      Description copied from interface: Emitter
      Asynchronously emit a MetadataChangeProposal event. Prefer using the sibling method that accepts a MetadataChangeProposalWrapper event as those are friendlier to construct.
      Specified by:
      emit in interface Emitter
      callback - if not null, is called from the IO thread. Should be a quick operation.
      Returns:
      a Future for callers to inspect the result of the operation or block until one is available
      Throws:
      IOException
    • testConnection

      public boolean testConnection() throws IOException, ExecutionException, InterruptedException
      Description copied from interface: Emitter
      Test that the emitter can establish a valid connection to the DataHub platform
      Specified by:
      testConnection in interface Emitter
      Returns:
      true if a valid connection can be established, false or throws one of the exceptions otherwise
      Throws:
      IOException
      ExecutionException
      InterruptedException
    • emit

      public Future<MetadataWriteResponse> emit(List<datahub.event.UpsertAspectRequest> request, Callback callback) throws IOException
      Description copied from interface: Emitter
      Asynchronously emit a UpsertAspectRequest.
      Specified by:
      emit in interface Emitter
      Parameters:
      request - request with with metadata aspect to upsert into DataHub
      Returns:
      a Future for callers to inspect the result of the operation or block until one is available
      Throws:
      IOException