Package datahub.client.kafka
Class KafkaEmitter
java.lang.Object
datahub.client.kafka.KafkaEmitter
- All Implemented Interfaces:
Emitter,Closeable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKafkaEmitter(KafkaEmitterConfig config) The default constructorKafkaEmitter(KafkaEmitterConfig config, String mcpKafkaTopic) Constructor that takes in KafkaEmitterConfig and mcp Kafka Topic Name -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Asynchronously emit aMetadataChangeProposalevent.Asynchronously emit aMetadataChangeProposalWrapperevent.Asynchronously emit aUpsertAspectRequest.booleanTest that the emitter can establish a valid connection to the DataHub platform
-
Field Details
-
DEFAULT_MCP_KAFKA_TOPIC
- See Also:
-
-
Constructor Details
-
KafkaEmitter
The default constructor- Parameters:
config- KafkaEmitterConfig- Throws:
IOException- when Avro Serialization fails
-
KafkaEmitter
Constructor that takes in KafkaEmitterConfig and mcp Kafka Topic Name- Parameters:
config- KafkaEmitterConfig- Throws:
IOException- when Avro Serialization fails
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
emit
public Future<MetadataWriteResponse> emit(datahub.event.MetadataChangeProposalWrapper mcpw, Callback datahubCallback) throws IOException Description copied from interface:EmitterAsynchronously emit aMetadataChangeProposalWrapperevent.- Specified by:
emitin interfaceEmitterdatahubCallback- if not null, is called from the IO thread. Should be a quick operation.- Returns:
- a
Futurefor 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 datahubCallback) throws IOException Description copied from interface:EmitterAsynchronously emit aMetadataChangeProposalevent. Prefer using the sibling method that accepts aMetadataChangeProposalWrapperevent as those are friendlier to construct.- Specified by:
emitin interfaceEmitterdatahubCallback- if not null, is called from the IO thread. Should be a quick operation.- Returns:
- a
Futurefor callers to inspect the result of the operation or block until one is available - Throws:
IOException
-
testConnection
Description copied from interface:EmitterTest that the emitter can establish a valid connection to the DataHub platform- Specified by:
testConnectionin interfaceEmitter- Returns:
- true if a valid connection can be established, false or throws one of the exceptions otherwise
- Throws:
IOExceptionExecutionExceptionInterruptedException
-
emit
public Future<MetadataWriteResponse> emit(List<datahub.event.UpsertAspectRequest> request, Callback callback) throws IOException Description copied from interface:EmitterAsynchronously emit aUpsertAspectRequest.- Specified by:
emitin interfaceEmitter- Parameters:
request- request with with metadata aspect to upsert into DataHub- Returns:
- a
Futurefor callers to inspect the result of the operation or block until one is available - Throws:
IOException
-
getKafkaConfigProperties
-