Class SnowflakeStreamingIngestClientInternal<T>
- java.lang.Object
-
- net.snowflake.ingest.streaming.internal.SnowflakeStreamingIngestClientInternal<T>
-
- Type Parameters:
T
- type of column data (ParquetChunkData
)
- All Implemented Interfaces:
AutoCloseable
,SnowflakeStreamingIngestClient
public class SnowflakeStreamingIngestClientInternal<T> extends Object implements SnowflakeStreamingIngestClient
The first version of implementation for SnowflakeStreamingIngestClient. The client internally manages a few things:- the channel cache, which contains all the channels that belong to this account
- the flush service, which schedules and coordinates the flush to Snowflake tables
-
-
Constructor Summary
Constructors Constructor Description SnowflakeStreamingIngestClientInternal(String name, SnowflakeURL accountURL, Properties prop, Map<String,Object> parameterOverrides)
Default Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the client, which will flush first and then release all the resourcesString
getName()
Get the client namevoid
injectRequestBuilder(RequestBuilder requestBuilder)
boolean
isClosed()
Check whether the client is closed or not, if you want to make sure all data are committed before closing, please callAutoCloseable.close()
before closing the entire clientnet.snowflake.ingest.streaming.internal.SnowflakeStreamingIngestChannelInternal<?>
openChannel(OpenChannelRequest request)
Open a channel against a Snowflake table
-
-
-
Constructor Detail
-
SnowflakeStreamingIngestClientInternal
public SnowflakeStreamingIngestClientInternal(String name, SnowflakeURL accountURL, Properties prop, Map<String,Object> parameterOverrides)
Default Constructor- Parameters:
name
- the name of the clientaccountURL
- Snowflake account urlprop
- connection propertiesparameterOverrides
- map of parameters to override for this client
-
-
Method Detail
-
injectRequestBuilder
public void injectRequestBuilder(RequestBuilder requestBuilder)
-
getName
public String getName()
Get the client name- Specified by:
getName
in interfaceSnowflakeStreamingIngestClient
- Returns:
- the client name
-
isClosed
public boolean isClosed()
Description copied from interface:SnowflakeStreamingIngestClient
Check whether the client is closed or not, if you want to make sure all data are committed before closing, please callAutoCloseable.close()
before closing the entire client- Specified by:
isClosed
in interfaceSnowflakeStreamingIngestClient
- Returns:
- a boolean to indicate whether the client is closed or not
-
openChannel
public net.snowflake.ingest.streaming.internal.SnowflakeStreamingIngestChannelInternal<?> openChannel(OpenChannelRequest request)
Open a channel against a Snowflake table- Specified by:
openChannel
in interfaceSnowflakeStreamingIngestClient
- Parameters:
request
- the open channel request- Returns:
- a SnowflakeStreamingIngestChannel object
-
close
public void close() throws Exception
Close the client, which will flush first and then release all the resources- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
-