Class StandardKustoIngestService
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.services.azure.data.explorer.StandardKustoIngestService
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService,KustoIngestService
@Tags({"Azure","Data","Explorer","ADX","Kusto","ingest","azure"})
@CapabilityDescription("Sends batches of flowfile content or stream flowfile content to an Azure ADX cluster.")
public class StandardKustoIngestService
extends org.apache.nifi.controller.AbstractControllerService
implements KustoIngestService
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final Stringprivate com.microsoft.azure.kusto.data.Clientprivate com.microsoft.azure.kusto.ingest.ManagedStreamingIngestClientprivate static final List<org.apache.nifi.components.PropertyDescriptor> private com.microsoft.azure.kusto.ingest.QueuedIngestClientprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate com.microsoft.azure.kusto.data.auth.ConnectionStringBuildercreateKustoEngineConnectionString(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) protected com.microsoft.azure.kusto.data.ClientcreateKustoExecutionClient(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) protected com.microsoft.azure.kusto.ingest.QueuedIngestClientcreateKustoQueuedIngestClient(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) protected com.microsoft.azure.kusto.ingest.ManagedStreamingIngestClientcreateKustoStreamingIngestClient(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) private KustoIngestQueryResponseexecuteQuery(String databaseName, String query) private com.microsoft.azure.kusto.ingest.IngestionProperties.DataFormatgetDataFormat(String dataFormat) List<org.apache.nifi.components.PropertyDescriptor> ingestData(KustoIngestionRequest kustoIngestionRequest) protected List<com.microsoft.azure.kusto.ingest.result.IngestionStatus> booleanisStreamingPolicyEnabled(String databaseName) booleanisTableReadable(String databaseName, String tableName) voidonEnabled(org.apache.nifi.controller.ConfigurationContext context) final voidprivate KustoIngestionResultpollOnIngestionStatus(com.microsoft.azure.kusto.ingest.result.IngestionResult ingestionResult, long timeoutMillis, long ingestionStatusPollingInterval) private com.microsoft.azure.kusto.ingest.IngestionMapping.IngestionMappingKindsetDataFormatAndMapping(String dataFormat, com.microsoft.azure.kusto.ingest.IngestionProperties ingestionProperties) Methods inherited from class org.apache.nifi.controller.AbstractControllerService
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful, migrateProperties
-
Field Details
-
AUTHENTICATION_STRATEGY
public static final org.apache.nifi.components.PropertyDescriptor AUTHENTICATION_STRATEGY -
APPLICATION_CLIENT_ID
public static final org.apache.nifi.components.PropertyDescriptor APPLICATION_CLIENT_ID -
APPLICATION_KEY
public static final org.apache.nifi.components.PropertyDescriptor APPLICATION_KEY -
APPLICATION_TENANT_ID
public static final org.apache.nifi.components.PropertyDescriptor APPLICATION_TENANT_ID -
CLUSTER_URI
public static final org.apache.nifi.components.PropertyDescriptor CLUSTER_URI -
PROPERTY_DESCRIPTORS
-
STREAMING_POLICY_SHOW_COMMAND
- See Also:
-
COUNT_TABLE_COMMAND
- See Also:
-
NIFI_SINK
-
queuedIngestClient
private volatile com.microsoft.azure.kusto.ingest.QueuedIngestClient queuedIngestClient -
managedStreamingIngestClient
private volatile com.microsoft.azure.kusto.ingest.ManagedStreamingIngestClient managedStreamingIngestClient -
executionClient
private volatile com.microsoft.azure.kusto.data.Client executionClient
-
-
Constructor Details
-
StandardKustoIngestService
public StandardKustoIngestService()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) throws org.apache.nifi.processor.exception.ProcessException, URISyntaxException - Throws:
org.apache.nifi.processor.exception.ProcessExceptionURISyntaxException
-
onStopped
@OnStopped public final void onStopped() -
createKustoQueuedIngestClient
protected com.microsoft.azure.kusto.ingest.QueuedIngestClient createKustoQueuedIngestClient(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) throws URISyntaxException - Throws:
URISyntaxException
-
createKustoStreamingIngestClient
protected com.microsoft.azure.kusto.ingest.ManagedStreamingIngestClient createKustoStreamingIngestClient(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) throws URISyntaxException - Throws:
URISyntaxException
-
ingestData
- Specified by:
ingestDatain interfaceKustoIngestService
-
pollOnIngestionStatus
private KustoIngestionResult pollOnIngestionStatus(com.microsoft.azure.kusto.ingest.result.IngestionResult ingestionResult, long timeoutMillis, long ingestionStatusPollingInterval) throws URISyntaxException, InterruptedException -
isStreamingPolicyEnabled
- Specified by:
isStreamingPolicyEnabledin interfaceKustoIngestService
-
isTableReadable
- Specified by:
isTableReadablein interfaceKustoIngestService
-
initializeKustoIngestionStatusAsPending
protected List<com.microsoft.azure.kusto.ingest.result.IngestionStatus> initializeKustoIngestionStatusAsPending() -
createKustoExecutionClient
protected com.microsoft.azure.kusto.data.Client createKustoExecutionClient(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) throws URISyntaxException - Throws:
URISyntaxException
-
createKustoEngineConnectionString
private com.microsoft.azure.kusto.data.auth.ConnectionStringBuilder createKustoEngineConnectionString(String clusterUrl, String appId, String appKey, String appTenant, KustoAuthenticationStrategy kustoAuthStrategy) -
executeQuery
-
setDataFormatAndMapping
private com.microsoft.azure.kusto.ingest.IngestionMapping.IngestionMappingKind setDataFormatAndMapping(String dataFormat, com.microsoft.azure.kusto.ingest.IngestionProperties ingestionProperties) -
getDataFormat
private com.microsoft.azure.kusto.ingest.IngestionProperties.DataFormat getDataFormat(String dataFormat)
-