Package datahub.client.kafka
Class KafkaEmitter
- java.lang.Object
-
- datahub.client.kafka.KafkaEmitter
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_MCP_KAFKA_TOPIC
-
Constructor Summary
Constructors Constructor Description KafkaEmitter(KafkaEmitterConfig config)
The default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
java.util.concurrent.Future<MetadataWriteResponse>
emit(com.linkedin.mxe.MetadataChangeProposal mcp, Callback datahubCallback)
Asynchronously emit aMetadataChangeProposal
event.java.util.concurrent.Future<MetadataWriteResponse>
emit(MetadataChangeProposalWrapper mcpw, Callback datahubCallback)
Asynchronously emit aMetadataChangeProposalWrapper
event.java.util.concurrent.Future<MetadataWriteResponse>
emit(java.util.List<UpsertAspectRequest> request, Callback callback)
Asynchronously emit aUpsertAspectRequest
.java.util.Properties
getKafkaConfgiProperties()
boolean
testConnection()
Test that the emitter can establish a valid connection to the DataHub platform
-
-
-
Field Detail
-
DEFAULT_MCP_KAFKA_TOPIC
public static final java.lang.String DEFAULT_MCP_KAFKA_TOPIC
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KafkaEmitter
public KafkaEmitter(KafkaEmitterConfig config) throws java.io.IOException
The default constructor- Parameters:
config
-- Throws:
java.io.IOException
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
emit
public java.util.concurrent.Future<MetadataWriteResponse> emit(MetadataChangeProposalWrapper mcpw, Callback datahubCallback) throws java.io.IOException
Description copied from interface:Emitter
Asynchronously emit aMetadataChangeProposalWrapper
event.
-
emit
public java.util.concurrent.Future<MetadataWriteResponse> emit(com.linkedin.mxe.MetadataChangeProposal mcp, Callback datahubCallback) throws java.io.IOException
Description copied from interface:Emitter
Asynchronously emit aMetadataChangeProposal
event. Prefer using the sibling method that accepts aMetadataChangeProposalWrapper
event as those are friendlier to construct.
-
testConnection
public boolean testConnection() throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
Description copied from interface:Emitter
Test that the emitter can establish a valid connection to the DataHub platform- Specified by:
testConnection
in interfaceEmitter
- Returns:
- true if a valid connection can be established, false or throws one of the exceptions otherwise
- Throws:
java.io.IOException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
-
emit
public java.util.concurrent.Future<MetadataWriteResponse> emit(java.util.List<UpsertAspectRequest> request, Callback callback) throws java.io.IOException
Description copied from interface:Emitter
Asynchronously emit aUpsertAspectRequest
.
-
getKafkaConfgiProperties
public java.util.Properties getKafkaConfgiProperties()
-
-