v0.6.0 Release
Added: Asynchronous Stub
We have added the capability to expose a future stub, providing users with the ability to execute asynchronous gRPC requests. The future stub allows for concurrent requests, enhancing the efficiency of data plane operations.
Example
Below is a simple code example demonstrating how to utilize the future stub for making asynchronous gRPC request:
// Instantiate a Pinecone client configuration with the API key
PineconeClientConfig clientConfig = new PineconeClientConfig().withApiKey("PINECONE_API_KEY");
// Create a Pinecone client and establish a connection
PineconeClient client = new PineconeClient(clientConfig);
PineconeConnection connection = client.connectWithUrl("https://abcdefg-123-c01b9b5.svc.us-east1-gcp.pinecone.io/");
// Retrieve the future stub for asynchronous requests
VectorServiceGrpc.VectorServiceFutureStub futureStub = connection.getFutureStub();
// Prepare a DescribeIndexStatsRequest
DescribeIndexStatsRequest describeIndexStatsRequest = DescribeIndexStatsRequest.newBuilder().build();
// Execute the asynchronous request and handle the response
ListenableFuture<DescribeIndexStatsResponse> describeIndexStatsResponseFuture = futureStub.describeIndexStats(describeIndexStatsRequest);
try {
DescribeIndexStatsResponse response = describeIndexStatsResponseFuture.get();
logger.info("Received describe index stats response: " + response);
} catch (InterruptedException | ExecutionException e) {
logger.error("Failed to retrieve describe index stats: " + e.getMessage());
}
Added: Integration tests
We have also added integration tests that will run after every commit to enhance testing capability.
What's Changed
- Setup starter CI job by @jhamon in #33
- Expand CI coverage to Java 17, add integration tests by @jhamon in #34
- Clean up integration tests by @rohanshah18 in #36
- Expose future stub on Pinecone connection by @russcam in #32
- Update changelogs for v0.6.0 release by @rohanshah18 in #38
New Contributors
Full Changelog: v0.5.1...v0.6.0