public class StorageStub extends Object implements Closeable
This class is responsible for translating high-level SDK calls into low-level HTTP requests, handling protocol-specific details like JSON serialization and custom binary framing.
This is an internal component and is not intended for public use.
Example usage:
StubSettings stubSettings = StubSettings.newBuilder()
.withEndpoint("https://service.cn-hangzhou.maxcompute.aliyun.com/api")
.withCredentialProvider(credentialsProvider)
.build();
StorageStub storageStub = new StorageStub(stubSettings);
// Use storageStub for API calls
storageStub.close();
| Constructor and Description |
|---|
StorageStub(StubSettings stubSettings)
Constructs a new StorageStub with the provided settings.
|
public StorageStub(@NotNull
StubSettings stubSettings)
stubSettings - The settings for configuring the storage stubpublic CreateTableWriteSessionResponse createTableWriteSession(TableIdentifier tableId, CreateTableWriteSessionRequest request)
public GetTableWriteSessionResponse getTableWriteSession(TableIdentifier tableId, String sessionId)
public void commitTableWriteSession(TableIdentifier tableId, String sessionId, String routeToken)
public void abortTableWriteSession(TableIdentifier tableId, String sessionId, String routeToken)
public CreateWriteStreamResponse createTableWriteStream(TableIdentifier tableId, String sessionId, CreateWriteStreamRequest request, String routeToken)
public GetWriteStreamResponse getWriteStream(GetWriteStreamRequest request, String routeToken)
public HttpResponse writeTable(TableIdentifier tableId, String sessionId, String streamId, long streamVersion, long recordCount, okhttp3.RequestBody arrowStreamBody, String routeToken, String streamingTableId, Long streamingSchemaVersion)
public CloseWriteStreamResponse closeWriteStream(TableIdentifier tableId, CloseWriteStreamRequest request, String routeToken)
public CreateTableReadSessionResponse createTableReadSession(TableIdentifier tableId, CreateTableReadSessionRequest request)
public CreateTableReadSessionResponse getTableReadSession(TableIdentifier tableId, String sessionId, boolean sessionRefresh)
public InputStream createTableReadStream(TableIdentifier tableId, InputSplit split, CreateTableReadStreamRequest request, String routeToken)
public InputStream preview(TableIdentifier tableId, String partitionSpec, List<String> columns, Integer limit)
public CreateInstanceReadSessionResponse createInstanceReadSession(InstanceIdentifier instanceId, CreateInstanceReadSessionRequest request)
public CreateInstanceReadSessionResponse getInstanceReadSession(InstanceIdentifier instanceId, String sessionId)
public InputStream createInstanceReadStream(InstanceIdentifier instanceId, String sessionId, Long count, Long offset, CreateInstanceReadStreamRequest request)
public BlobWriteResponse tableBatchWriteBlob(TableIdentifier tableId, String sessionId, String streamId, long streamVersion, List<BlobWriteItem> blobs)
public BlobWriteResponse tableWriteBlob(TableIdentifier tableId, String sessionId, String streamId, long streamVersion, PartitionSpec partitionValues, long columnId, InputStream data)
public InputStream readBlobs(List<String> blobRefs)
public OutputStream wrapForCompression(OutputStream targetStream, CompressionCodec compressionCodec) throws IOException
targetStream - The final destination for the compressed data.compressionCodec - The compression algorithm to use.IOException - If an I/O error occurs.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2026 Alibaba Cloud Computing. All rights reserved.