| Package | Description |
|---|---|
| net.snowflake.client.core | |
| net.snowflake.client.jdbc | |
| net.snowflake.client.jdbc.cloud.storage |
| Modifier and Type | Method and Description |
|---|---|
static void |
StmtUtil.cancel(net.snowflake.client.core.StmtUtil.StmtInput stmtInput)
Cancel a statement identifiable by a request id
|
void |
SFSession.close()
Close the connection
|
static void |
SessionUtil.closeSession(SessionUtil.LoginInput loginInput)
Close a session
|
static StmtUtil.StmtOutput |
StmtUtil.execute(net.snowflake.client.core.StmtUtil.StmtInput stmtInput)
Execute a statement
side effect: stmtInput.prevGetResultURL is set if we have started ping
pong and receives an exception from session token expiration so that
during retry we don't retry the query submission, but continue the
ping pong process.
|
Object |
SFStatement.executeHelper(String sql,
String mediaType,
Map<String,ParameterBindingDTO> bindValues,
boolean describeOnly)
A helper method to build URL and submit the SQL to snowflake for exec
|
protected static String |
StmtUtil.getQueryResult(com.fasterxml.jackson.databind.JsonNode inProgressResponse,
String mediaType,
String previousGetResultPath,
net.snowflake.client.core.StmtUtil.StmtInput stmtInput)
Issue get-result call to get query result given an in progress response.
|
boolean |
SFResultSet.next()
Advance to next row
|
boolean |
SFBaseResultSet.next() |
void |
SFSession.open()
Open a new database session
|
static SessionUtil.LoginOutput |
SessionUtil.openSession(SessionUtil.LoginInput loginInput)
Open a new session
|
static ResultUtil.ResultOutput |
ResultUtil.processResult(ResultUtil.ResultInput resultData)
A common helper to process result response
|
static SessionUtil.LoginOutput |
SessionUtil.renewSession(SessionUtil.LoginInput loginInput)
Renew a session
|
| Constructor and Description |
|---|
SFFixedViewResultSet(SnowflakeFixedView fixedView,
SnowflakeFileTransferAgent.CommandType commandType) |
| Modifier and Type | Method and Description |
|---|---|
void |
SnowflakeResultChunk.addRow(Object[] row) |
static void |
SnowflakeUtil.checkErrorAndThrowException(com.fasterxml.jackson.databind.JsonNode rootNode)
Check the error in the JSON node and generate an exception based on
information extracted from the node.
|
static List<SnowflakeColumnMetadata> |
SnowflakeUtil.describeFixedViewColumns(Class clazz) |
void |
SnowflakeResultChunk.ensureRowsComplete()
Checks that all data has been added after parsing.
|
static org.apache.http.HttpResponse |
RestRequest.execute(org.apache.http.client.HttpClient httpClient,
org.apache.http.client.methods.HttpRequestBase httpRequest,
long retryTimeout,
int injectSocketTimeout,
AtomicBoolean canceling)
Execute an http request with retry logic.
|
static Set<String> |
SnowflakeFileTransferAgent.expandFileNames(String[] filePathList)
process a list of file paths separated by "," and expand the wildcards
if any to generate the list of paths for all files matched by the
wildcards
|
static SnowflakeColumnMetadata |
SnowflakeUtil.extractColumnMetadata(com.fasterxml.jackson.databind.JsonNode colNode) |
SnowflakeResultChunk |
SnowflakeChunkDownloader.getNextChunkToConsume()
The method does the following:
1.
|
Object |
SnowflakeFileTransferAgent.getResultSet() |
static SnowflakeType |
SnowflakeType.javaTypeToSFType(int javaType) |
static SnowflakeType |
SnowflakeUtil.javaTypeToSFType(int javaType) |
static String |
SnowflakeUtil.javaTypeToSFTypeString(int javaType) |
static void |
SnowflakeFileTransferAgent.renewExpiredToken(SFSession connection,
String command,
SnowflakeStorageClient client)
This static method is called when we are handling an expired token exception
It retrieves a fresh token from GS and then calls .renew() on the storage
client to refresh itself with the new token
|
| Constructor and Description |
|---|
SnowflakeFileTransferAgent(String command,
SFSession connection,
SFStatement statement) |
SnowflakeResultSetMetaData(int columnCount,
List<String> columnNames,
List<String> columnTypeNames,
List<Integer> columnTypes,
SFSession session) |
| Modifier and Type | Method and Description |
|---|---|
SnowflakeStorageClient |
StorageClientFactory.createClient(String stageLocationType,
Map stageCredentials,
int parallel,
net.snowflake.common.core.RemoteStoreFileEncryptionMaterial encMat,
String stageRegion)
Creates a storage client based on the value of stageLocationType
|
void |
SnowflakeS3Client.download(SFSession connection,
String command,
String localLocation,
String destFileName,
int parallelism,
String remoteStorageLocation,
String stageFilePath,
String stageRegion)
Download a file from S3.
|
void |
SnowflakeStorageClient.download(SFSession connection,
String command,
String localLocation,
String destFileName,
int parallelism,
String remoteStorageLocation,
String stageFilePath,
String stageRegion)
Download a file from remote storage.
|
static void |
SnowflakeS3Client.handleS3Exception(Exception ex,
int retryCount,
String operation,
SFSession connection,
String command,
SnowflakeS3Client s3Client) |
void |
SnowflakeS3Client.handleStorageException(Exception ex,
int retryCount,
String operation,
SFSession connection,
String command) |
void |
SnowflakeStorageClient.handleStorageException(Exception ex,
int retryCount,
String operation,
SFSession connection,
String command)
Handles exceptions thrown by the remote storage provider
|
void |
SnowflakeS3Client.renew(Map stageCredentials)
Renew the S3 client with fresh AWS credentials/access token
|
void |
SnowflakeStorageClient.renew(Map stageCredentials)
Re-creates the encapsulated storage client with a fresh access token
|
void |
SnowflakeS3Client.upload(SFSession connection,
String command,
int parallelism,
boolean uploadFromStream,
String remoteStorageLocation,
File srcFile,
String destFileName,
InputStream inputStream,
FileBackedOutputStream fileBackedOutputStream,
StorageObjectMetadata meta,
String stageRegion)
Upload a file (-stream) to S3.
|
void |
SnowflakeStorageClient.upload(SFSession connection,
String command,
int parallelism,
boolean uploadFromStream,
String remoteStorageLocation,
File srcFile,
String destFileName,
InputStream inputStream,
FileBackedOutputStream fileBackedOutputStream,
StorageObjectMetadata meta,
String stageRegion)
Upload a file (-stream) to remote storage
|
| Constructor and Description |
|---|
SnowflakeS3Client(Map stageCredentials,
com.amazonaws.ClientConfiguration clientConfig,
net.snowflake.common.core.RemoteStoreFileEncryptionMaterial encMat,
String stageRegion) |
Copyright © 2017. All rights reserved.