private SnowflakeS3Client createS3Client(Map stageCredentials,
                                           int parallel,
                                           RemoteStoreFileEncryptionMaterial encMat,
                                           String stageRegion)
  throws SnowflakeSQLException
  {
    final int S3_TRANSFER_MAX_RETRIES = 3;

    logger.debug("createS3Client encryption={}", (encMat == null ? "no" : "yes"));

    SnowflakeS3Client s3Client;

    ClientConfiguration clientConfig = new ClientConfiguration();
    clientConfig.setMaxConnections(parallel + 1);
    clientConfig.setMaxErrorRetry(S3_TRANSFER_MAX_RETRIES);
    clientConfig.setDisableSocketProxy(HttpUtil.isSocksProxyDisabled());

    logger.debug("s3 client configuration: maxConnection={}, connectionTimeout={}, " +
                 "socketTimeout={}, maxErrorRetry={}",
                 clientConfig.getMaxConnections(),
                 clientConfig.getConnectionTimeout(),
                 clientConfig.getSocketTimeout(),
                 clientConfig.getMaxErrorRetry());

    try
    {
      s3Client = new SnowflakeS3Client(stageCredentials, clientConfig, encMat, stageRegion);
    }
    catch (Exception ex)
    {
      logger.debug("Exception creating s3 client", ex);
      throw ex;
    }
    logger.debug("s3 client created");

    return s3Client;
  }
private SnowflakeS3Client createS3Client ( Map stageCredentials , int parallel , RemoteStoreFileEncryptionMaterial encMat , String stageRegion ) throws SnowflakeSQLException { final int S3_TRANSFER_MAX_RETRIES = 3 ; logger . debug ( "createS3Client encryption={}" , ( encMat == null ? "no" : "yes" ) ) ; SnowflakeS3Client s3Client ; ClientConfiguration clientConfig = new ClientConfiguration ( ) ; clientConfig . setMaxConnections ( parallel + 1 ) ; clientConfig . setMaxErrorRetry ( S3_TRANSFER_MAX_RETRIES ) ; clientConfig . setDisableSocketProxy ( HttpUtil . isSocksProxyDisabled ( ) ) ; logger . debug ( "s3 client configuration: maxConnection={}, connectionTimeout={}, " + "socketTimeout={}, maxErrorRetry={}" , clientConfig . getMaxConnections ( ) , clientConfig . getConnectionTimeout ( ) , clientConfig . getSocketTimeout ( ) , clientConfig . getMaxErrorRetry ( ) ) ; try { s3Client = new SnowflakeS3Client ( stageCredentials , clientConfig , encMat , stageRegion ) ; } catch ( Exception ex ) { logger . debug ( "Exception creating s3 client" , ex ) ; throw ex ; } logger . debug ( "s3 client created" ) ; return s3Client ; }
Creates a SnowflakeS3ClientObject which encapsulates
the Amazon S3 client

@param stageCredentials Map of stage credential properties
@param parallel         degree of parallelism
@param encMat           encryption material for the client
@param stageRegion      the region where the stage is located
@return the SnowflakeS3Client  instance created
@throws SnowflakeSQLException failure to create the S3 client