Class S3ClientFactory
java.lang.Object
org.gridgain.internal.sql.copy.s3.S3ClientFactory
S3 client factory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic software.amazon.awssdk.services.s3.S3ClientcreateS3Client(Map<String, String> properties) Creates S3 client.static ReadergetInputStreamReader(String path, Map<String, String> properties) Creates Input Reader for reading an S3 key.static WritergetOutputStreamWriter(String path, Map<String, String> properties) Creates Output Writer for writing an S3 key.static org.apache.parquet.io.InputFilegetS3InputFile(String path, Map<String, String> properties) Creates InputFile for reading an S3 key via parquet-mr.static org.apache.parquet.io.OutputFilegetS3OutputFile(String path, Map<String, String> properties) Creates OutputFile for writing an S3 key via parquet-mr.static booleanChecks if file exists.
-
Constructor Details
-
S3ClientFactory
public S3ClientFactory()
-
-
Method Details
-
getInputStreamReader
Creates Input Reader for reading an S3 key.- Parameters:
path- S3 URI.properties- S3 properties.
-
getOutputStreamWriter
public static Writer getOutputStreamWriter(String path, Map<String, String> properties) throws IOExceptionCreates Output Writer for writing an S3 key.- Parameters:
path- S3 URI.properties- S3 properties.- Throws:
IOException
-
getS3InputFile
public static org.apache.parquet.io.InputFile getS3InputFile(String path, Map<String, String> properties) Creates InputFile for reading an S3 key via parquet-mr.- Parameters:
path- S3 URI.properties- S3 properties.
-
getS3OutputFile
public static org.apache.parquet.io.OutputFile getS3OutputFile(String path, Map<String, String> properties) throws IOExceptionCreates OutputFile for writing an S3 key via parquet-mr.- Parameters:
path- S3 URI.properties- S3 properties.- Throws:
IOException
-
createS3Client
public static software.amazon.awssdk.services.s3.S3Client createS3Client(Map<String, String> properties) Creates S3 client. -
keyExist
Checks if file exists.
-