Class SnowflakeStreamingIngestClientInternal<T>
- java.lang.Object
-
- net.snowflake.ingest.streaming.internal.SnowflakeStreamingIngestClientInternal<T>
-
- Type Parameters:
T- type of column data (ArrowVectorSchemaRootorParquetChunkData)
- 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 voidclose()Close the client, which will flush first and then release all the resourcesStringgetName()Get the client namebooleanisClosed()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
-
getName
public String getName()
Get the client name- Specified by:
getNamein interfaceSnowflakeStreamingIngestClient- Returns:
- the client name
-
isClosed
public boolean isClosed()
Description copied from interface:SnowflakeStreamingIngestClientCheck 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:
isClosedin 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:
openChannelin interfaceSnowflakeStreamingIngestClient- Parameters:
request- the open channel request- Returns:
- a SnowflakeStreamingIngestChannel object
-
close
public void close() throws ExceptionClose the client, which will flush first and then release all the resources- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-