mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
minor cleanup
This commit is contained in:
parent
7eb58982e6
commit
a93924b285
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user