mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
removed exception swallowing try/catch blocks
This commit is contained in:
parent
753c945a32
commit
562129f8c5
@ -17,6 +17,7 @@
|
||||
package io.nosqlbench.adapter.pinecone.ops;
|
||||
|
||||
import io.nosqlbench.engine.api.templating.ParsedOp;
|
||||
import io.pinecone.PineconeException;
|
||||
import io.pinecone.proto.DeleteRequest;
|
||||
import io.pinecone.proto.DeleteResponse;
|
||||
import io.pinecone.PineconeConnection;
|
||||
@ -42,12 +43,7 @@ public class PineconeDeleteOp extends PineconeOp {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
DeleteResponse response = connection.getBlockingStub().delete(request);
|
||||
logger.debug("Pincecone delete request successful: " + response.toString());
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception %s caught trying to do delete", e.getMessage());
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
DeleteResponse response = connection.getBlockingStub().delete(request);
|
||||
logger.debug("Pincecone delete request successful: " + response.toString());
|
||||
}
|
||||
}
|
||||
|
@ -45,17 +45,12 @@ public class PineconeDescribeIndexStatsOp extends PineconeOp {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
DescribeIndexStatsResponse response = connection.getBlockingStub().describeIndexStats(request);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Vector counts:");
|
||||
for (Map.Entry<String, NamespaceSummary> namespace : response.getNamespacesMap().entrySet()) {
|
||||
logger.debug(namespace.getKey() + ": " + namespace.getValue().getVectorCount());
|
||||
}
|
||||
DescribeIndexStatsResponse response = connection.getBlockingStub().describeIndexStats(request);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Vector counts:");
|
||||
for (Map.Entry<String, NamespaceSummary> namespace : response.getNamespacesMap().entrySet()) {
|
||||
logger.debug(namespace.getKey() + ": " + namespace.getValue().getVectorCount());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception %s caught trying to do DescribeIndexStats", e.getMessage());
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,16 +45,11 @@ public class PineconeFetchOp extends PineconeOp {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
FetchResponse response = connection.getBlockingStub().fetch(request);
|
||||
if (logger.isDebugEnabled()) {
|
||||
for (Map.Entry<String, Vector> vectors: response.getVectorsMap().entrySet()) {
|
||||
logger.debug(vectors.getKey() + ": " + vectors.getValue().toString());
|
||||
}
|
||||
FetchResponse response = connection.getBlockingStub().fetch(request);
|
||||
if (logger.isDebugEnabled()) {
|
||||
for (Map.Entry<String, Vector> vectors: response.getVectorsMap().entrySet()) {
|
||||
logger.debug(vectors.getKey() + ": " + vectors.getValue().toString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception %s caught trying to do Fetch", e.getMessage());
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,18 +44,13 @@ public class PineconeQueryOp extends PineconeOp {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
QueryResponse response = connection.getBlockingStub().query(request);
|
||||
if (logger.isDebugEnabled()) {
|
||||
for (SingleQueryResults results : response.getResultsList()) {
|
||||
for (ScoredVector scored : results.getMatchesList()) {
|
||||
logger.debug(scored.getId() + ": " + scored.getScore());
|
||||
}
|
||||
QueryResponse response = connection.getBlockingStub().query(request);
|
||||
if (logger.isDebugEnabled()) {
|
||||
for (SingleQueryResults results : response.getResultsList()) {
|
||||
for (ScoredVector scored : results.getMatchesList()) {
|
||||
logger.debug(scored.getId() + ": " + scored.getScore());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception %s caught trying to do Query", e.getMessage());
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,12 +42,7 @@ public class PineconeUpdateOp extends PineconeOp {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
UpdateResponse response = connection.getBlockingStub().update(request);
|
||||
logger.debug("UpdateResponse succesful: " + response.toString());
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception %s caught trying to do Update", e.getMessage());
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
UpdateResponse response = connection.getBlockingStub().update(request);
|
||||
logger.debug("UpdateResponse succesful: " + response.toString());
|
||||
}
|
||||
}
|
||||
|
@ -42,12 +42,7 @@ public class PineconeUpsertOp extends PineconeOp {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
UpsertResponse response = connection.getBlockingStub().upsert(request);
|
||||
logger.debug("Put " + response.getUpsertedCount() + " vectors into the index");
|
||||
} catch (Exception e) {
|
||||
logger.error("Exception %s caught trying to do upsert", e.getMessage());
|
||||
logger.error(e.getStackTrace());
|
||||
}
|
||||
UpsertResponse response = connection.getBlockingStub().upsert(request);
|
||||
logger.debug("Put " + response.getUpsertedCount() + " vectors into the index");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user