minor cleanup

This commit is contained in:
Mark Wolters 2023-05-18 20:20:02 +00:00 committed by Madhavan
parent 7eb58982e6
commit a93924b285
2 changed files with 3 additions and 4 deletions

View File

@ -39,12 +39,12 @@ public class PineconeSpace {
this.environment = cfg.get("environment");
this.projectName = cfg.get("projectName");
this.name = name;
config = new PineconeClientConfig()
.withApiKey(apiKey)
.withEnvironment(environment)
.withProjectName(projectName);
LOGGER.info(this.name + ": Creating new Pinecone Client with api key " + apiKey + ", environment "
+ environment + " and project name " + projectName);
this.client = new PineconeClient(config);
}
@ -58,6 +58,7 @@ public class PineconeSpace {
public synchronized PineconeConnection getConnection(String index) {
PineconeConnection connection = connections.get(index);
if (connection == null) {
LOGGER.info("Creating new Pinecone Connection to Index " + index);
PineconeConnectionConfig connectionConfig = new PineconeConnectionConfig().withIndexName(index);
connection = client.connect(connectionConfig);
connections.put(index, connection);

View File

@ -8,10 +8,8 @@ import io.nosqlbench.adapter.pinecone.ops.PineconeOp;
import io.nosqlbench.adapter.pinecone.ops.PineconeUpsertOp;
import io.nosqlbench.engine.api.templating.ParsedOp;
import io.pinecone.proto.SparseValues;
import io.pinecone.proto.UpdateRequest;
import io.pinecone.proto.UpsertRequest;
import io.pinecone.proto.Vector;
import jakarta.ws.rs.NotSupportedException;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;