public class ManagedStreamingIngestClient extends IngestClientBase implements QueuedIngestClient
ManagedStreamingIngestClient
This class combines a managed streaming client with a queued streaming client, to create an optimized experience. Since the streaming client communicates directly with the engine, it's more prone to failure, so this class holds both a streaming client and a queued client. It tries 3 times using the streaming client, after which it falls back to the queued streaming client in case of failure. If the size of the stream is bigger than 4194304, it will fall back to the queued streaming client.
| Modifier and Type | Field and Description |
|---|---|
static int |
ATTEMPT_COUNT |
static String |
CLASS_NAME |
static int |
MAX_STREAMING_SIZE_BYTES |
| Constructor and Description |
|---|
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable org.apache.http.impl.client.CloseableHttpClient httpClient) |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable org.apache.http.impl.client.CloseableHttpClient httpClient,
boolean autoCorrectEndpoint) |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder)
Deprecated.
- This method is slated to be private. Use
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)
instead. |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder,
boolean autoCorrectEndpoint) |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder,
@Nullable HttpClientProperties properties) |
ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder,
ConnectionStringBuilder queryEndpointConnectionStringBuilder,
@Nullable HttpClientProperties properties,
boolean autoCorrectEndpoint)
Deprecated.
- This method is slated to be private. Use
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder, HttpClientProperties) instead.
This constructor should only be used for advanced cases. If your endpoints are standard, or you do not know, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties))} instead. |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable HttpClientProperties properties) |
ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder,
@Nullable HttpClientProperties properties,
boolean autoCorrectEndpoint) |
ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient)
Deprecated.
- This method is slated to be private. Use
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder) instead. |
ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient,
ExponentialRetry retryTemplate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static ManagedStreamingIngestClient |
fromDmConnectionString(ConnectionStringBuilder dmConnectionString)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string, with default http client properties.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
static ManagedStreamingIngestClient |
fromDmConnectionString(ConnectionStringBuilder dmConnectionString,
@Nullable HttpClientProperties properties)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
static ManagedStreamingIngestClient |
fromEngineConnectionString(ConnectionStringBuilder engineConnectionString)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string, with default http client properties.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
static ManagedStreamingIngestClient |
fromEngineConnectionString(ConnectionStringBuilder engineConnectionString,
@Nullable HttpClientProperties properties)
Deprecated.
- Ingest clients now automatically deduce the endpoint, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder) |
protected String |
getClientType() |
IngestionResourceManager |
getResourceManager() |
protected IngestionResult |
ingestFromBlobImpl(BlobSourceInfo blobSourceInfo,
IngestionProperties ingestionProperties)
Ingest data from a blob storage into Kusto database.
|
protected IngestionResult |
ingestFromFileImpl(FileSourceInfo fileSourceInfo,
IngestionProperties ingestionProperties) |
protected IngestionResult |
ingestFromResultSetImpl(ResultSetSourceInfo resultSetSourceInfo,
IngestionProperties ingestionProperties)
Ingest data from a Result Set into Kusto database.
|
protected IngestionResult |
ingestFromStreamImpl(StreamSourceInfo streamSourceInfo,
IngestionProperties ingestionProperties)
Ingest data from an input stream, into Kusto database.
|
void |
setQueueRequestOptions(com.azure.storage.common.policy.RequestRetryOptions queueRequestOptions)
Setter for QueueRequestOptions used by the client on adding ingest message to the Azure queue, read here
https://docs.microsoft.com/azure/data-explorer/kusto/api/netfx/about-kusto-ingest#ingest-client-flavors
about Kusto queued ingestion
|
getIngestionTraceAttributes, ingestFromBlob, ingestFromFile, ingestFromResultSet, ingestFromStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitingestFromBlob, ingestFromFile, ingestFromResultSet, ingestFromStreampublic static final int ATTEMPT_COUNT
public static final int MAX_STREAMING_SIZE_BYTES
public static final String CLASS_NAME
public ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder) throws URISyntaxException
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)
instead.ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"URISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder, boolean autoCorrectEndpoint) throws URISyntaxException
ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"autoCorrectEndpoint - - Flag to indicate whether to correct the endpoint URI or notURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder, @Nullable @Nullable HttpClientProperties properties, boolean autoCorrectEndpoint) throws URISyntaxException
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder, HttpClientProperties) instead.
This constructor should only be used for advanced cases. If your endpoints are standard, or you do not know, use
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties))} instead.ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"properties - - Additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable HttpClientProperties properties, boolean autoCorrectEndpoint) throws URISyntaxException
connectionStringBuilder - - Client connection stringproperties - - Additional properties to configure the http clientautoCorrectEndpoint - - Flag to indicate whether to correct the endpoint URI or notURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable org.apache.http.impl.client.CloseableHttpClient httpClient, boolean autoCorrectEndpoint) throws URISyntaxException
connectionStringBuilder - - Client connection stringhttpClient - - HTTP clientautoCorrectEndpoint - - Flag to indicate whether to correct the endpoint URI or notURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder ingestionEndpointConnectionStringBuilder, ConnectionStringBuilder queryEndpointConnectionStringBuilder, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
ingestionEndpointConnectionStringBuilder - - Endpoint for ingesting data, usually starts with "https://ingest-"queryEndpointConnectionStringBuilder - - Endpoint for querying data, does not include "ingest-"properties - - Additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
connectionStringBuilder - - Client connection stringproperties - - Additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(ConnectionStringBuilder connectionStringBuilder, @Nullable @Nullable org.apache.http.impl.client.CloseableHttpClient httpClient) throws URISyntaxException
connectionStringBuilder - - Client connection stringhttpClient - - HTTP clientURISyntaxException - if the connection string is invalidpublic ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient)
IngestClientFactory.createManagedStreamingIngestClient(ConnectionStringBuilder) instead.resourceManager - ingestion resources managerstorageClient - - storage utilitiesstreamingClient - - the streaming clientpublic ManagedStreamingIngestClient(com.microsoft.azure.kusto.ingest.ResourceManager resourceManager,
AzureStorageClient storageClient,
StreamingClient streamingClient,
ExponentialRetry retryTemplate)
resourceManager - ingestion resources managerstorageClient - - storage utilitiesstreamingClient - - the streaming clientretryTemplate - - retry templatepublic static ManagedStreamingIngestClient fromDmConnectionString(ConnectionStringBuilder dmConnectionString) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string, with default http client properties.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)dmConnectionString - dm connection stringURISyntaxException - if the connection string is invalidpublic static ManagedStreamingIngestClient fromDmConnectionString(ConnectionStringBuilder dmConnectionString, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from a DM connection string.
This method infers the engine connection string from the DM connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)dmConnectionString - dm connection stringproperties - additional properties to configure the http clientURISyntaxException - if the connection string is invalidpublic static ManagedStreamingIngestClient fromEngineConnectionString(ConnectionStringBuilder engineConnectionString) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string, with default http client properties.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)engineConnectionString - engine connection stringURISyntaxException - if the connection string is invalidpublic static ManagedStreamingIngestClient fromEngineConnectionString(ConnectionStringBuilder engineConnectionString, @Nullable @Nullable HttpClientProperties properties) throws URISyntaxException
ManagedStreamingIngestClient(ConnectionStringBuilder, HttpClientProperties) instead.
Creates a new ManagedStreamingIngestClient from an engine connection string.
This method infers the DM connection string from the engine connection string.
For advanced usage, use ManagedStreamingIngestClient(ConnectionStringBuilder, ConnectionStringBuilder)engineConnectionString - engine connection stringproperties - additional properties to configure the http clientURISyntaxException - if the connection string is invalidprotected IngestionResult ingestFromFileImpl(FileSourceInfo fileSourceInfo, IngestionProperties ingestionProperties) throws IngestionClientException, IngestionServiceException
ingestFromFileImpl in class IngestClientBaseIngestionClientExceptionIngestionServiceExceptionprotected IngestionResult ingestFromBlobImpl(BlobSourceInfo blobSourceInfo, IngestionProperties ingestionProperties) throws IngestionClientException, IngestionServiceException
Ingest data from a blob storage into Kusto database.
This method ingests the data from a given blob, described inblobSourceInfo, into Kusto database,
according to the properties mentioned in ingestionProperties
ingestFromBlobImpl in class IngestClientBaseblobSourceInfo - The specific SourceInfo to be ingestedingestionProperties - Settings used to customize the ingestion operationIngestionResult object including the ingestion resultIngestionClientException - An exception originating from a client activityIngestionServiceException - An exception returned from the serviceBlobSourceInfo,
IngestionPropertiesprotected IngestionResult ingestFromResultSetImpl(ResultSetSourceInfo resultSetSourceInfo, IngestionProperties ingestionProperties) throws IngestionClientException, IngestionServiceException
IngestClientBaseIngest data from a Result Set into Kusto database.
This method ingests the data from a given Result Set, described inresultSetSourceInfo, into Kusto database,
according to the properties mentioned in ingestionProperties
Ingesting from ResultSet is equivalent to ingesting from a csv stream. The DataFormat should be empty or set to "csv", and the mapping, should it be provided, should be csv mapping.
ingestFromResultSetImpl in class IngestClientBaseresultSetSourceInfo - The specific SourceInfo to be ingestedingestionProperties - Settings used to customize the ingestion operationIngestionResult object including the ingestion resultIngestionClientException - An exception originating from a client activityIngestionServiceException - An exception returned from the serviceResultSetSourceInfo,
IngestionPropertiesprotected IngestionResult ingestFromStreamImpl(StreamSourceInfo streamSourceInfo, IngestionProperties ingestionProperties) throws IngestionClientException, IngestionServiceException
IngestClientBaseIngest data from an input stream, into Kusto database.
This method ingests the data from a given input stream, described instreamSourceInfo, into Kusto database,
according to the properties mentioned in ingestionPropertiesingestFromStreamImpl in class IngestClientBasestreamSourceInfo - The specific SourceInfo to be ingestedingestionProperties - Settings used to customize the ingestion operationIngestionResult object including the ingestion resultIngestionClientException - An exception originating from a client activityIngestionServiceException - An exception returned from the serviceStreamSourceInfo,
IngestionPropertiesprotected String getClientType()
getClientType in class IngestClientBasepublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic void setQueueRequestOptions(com.azure.storage.common.policy.RequestRetryOptions queueRequestOptions)
QueuedIngestClientsetQueueRequestOptions in interface QueuedIngestClientqueueRequestOptions - - Options to use when creating QueueClientpublic IngestionResourceManager getResourceManager()
getResourceManager in interface QueuedIngestClientCopyright © 2024. All rights reserved.