mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
updated ops to only log to debug on success
This commit is contained in:
parent
a50818c9cb
commit
753c945a32
@ -53,8 +53,7 @@ public class PineconeDeleteOpDispenser extends PineconeOpDispenser {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PineconeOp apply(long value) {
|
public PineconeOp apply(long value) {
|
||||||
return new PineconeDeleteOp(pcFunction
|
return new PineconeDeleteOp(pcFunction.apply(value)
|
||||||
.apply(value)
|
|
||||||
.getConnection(targetFunction.apply(value)),
|
.getConnection(targetFunction.apply(value)),
|
||||||
deleteRequestFunc.apply(value));
|
deleteRequestFunc.apply(value));
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,8 @@ public class PineconeDescribeIndexStatsOpDispenser extends PineconeOpDispenser {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PineconeOp apply(long value) {
|
public PineconeOp apply(long value) {
|
||||||
return new PineconeDescribeIndexStatsOp(pcFunction.apply(value).getConnection(targetFunction.apply(value)),
|
return new PineconeDescribeIndexStatsOp(pcFunction.apply(value)
|
||||||
|
.getConnection(targetFunction.apply(value)),
|
||||||
indexStatsRequestFunc.apply(value));
|
indexStatsRequestFunc.apply(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,8 @@ public class PineconeFetchOpDispenser extends PineconeOpDispenser {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PineconeOp apply(long value) {
|
public PineconeOp apply(long value) {
|
||||||
return new PineconeFetchOp(pcFunction.apply(value).getConnection(targetFunction.apply(value)),
|
return new PineconeFetchOp(pcFunction.apply(value)
|
||||||
|
.getConnection(targetFunction.apply(value)),
|
||||||
fetchRequestFunc.apply(value));
|
fetchRequestFunc.apply(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ public class PineconeDeleteOp extends PineconeOp {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
DeleteResponse response = connection.getBlockingStub().delete(request);
|
DeleteResponse response = connection.getBlockingStub().delete(request);
|
||||||
logger.info(response.toString());
|
logger.debug("Pincecone delete request successful: " + response.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Exception %s caught trying to do delete", e.getMessage());
|
logger.error("Exception %s caught trying to do delete", e.getMessage());
|
||||||
logger.error(e.getStackTrace());
|
logger.error(e.getStackTrace());
|
||||||
|
@ -20,9 +20,12 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
|||||||
import io.pinecone.proto.DescribeIndexStatsRequest;
|
import io.pinecone.proto.DescribeIndexStatsRequest;
|
||||||
import io.pinecone.proto.DescribeIndexStatsResponse;
|
import io.pinecone.proto.DescribeIndexStatsResponse;
|
||||||
import io.pinecone.PineconeConnection;
|
import io.pinecone.PineconeConnection;
|
||||||
|
import io.pinecone.proto.NamespaceSummary;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class PineconeDescribeIndexStatsOp extends PineconeOp {
|
public class PineconeDescribeIndexStatsOp extends PineconeOp {
|
||||||
|
|
||||||
private static final Logger logger = LogManager.getLogger(PineconeDescribeIndexStatsOp.class);
|
private static final Logger logger = LogManager.getLogger(PineconeDescribeIndexStatsOp.class);
|
||||||
@ -44,7 +47,12 @@ public class PineconeDescribeIndexStatsOp extends PineconeOp {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
DescribeIndexStatsResponse response = connection.getBlockingStub().describeIndexStats(request);
|
DescribeIndexStatsResponse response = connection.getBlockingStub().describeIndexStats(request);
|
||||||
// Do soemething with the response...
|
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) {
|
} catch (Exception e) {
|
||||||
logger.error("Exception %s caught trying to do DescribeIndexStats", e.getMessage());
|
logger.error("Exception %s caught trying to do DescribeIndexStats", e.getMessage());
|
||||||
logger.error(e.getStackTrace());
|
logger.error(e.getStackTrace());
|
||||||
|
@ -20,9 +20,12 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
|||||||
import io.pinecone.proto.FetchRequest;
|
import io.pinecone.proto.FetchRequest;
|
||||||
import io.pinecone.PineconeConnection;
|
import io.pinecone.PineconeConnection;
|
||||||
import io.pinecone.proto.FetchResponse;
|
import io.pinecone.proto.FetchResponse;
|
||||||
|
import io.pinecone.proto.Vector;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class PineconeFetchOp extends PineconeOp {
|
public class PineconeFetchOp extends PineconeOp {
|
||||||
|
|
||||||
private static final Logger logger = LogManager.getLogger(PineconeFetchOp.class);
|
private static final Logger logger = LogManager.getLogger(PineconeFetchOp.class);
|
||||||
@ -44,7 +47,11 @@ public class PineconeFetchOp extends PineconeOp {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
FetchResponse response = connection.getBlockingStub().fetch(request);
|
FetchResponse response = connection.getBlockingStub().fetch(request);
|
||||||
// Do soemething with the response...
|
if (logger.isDebugEnabled()) {
|
||||||
|
for (Map.Entry<String, Vector> vectors: response.getVectorsMap().entrySet()) {
|
||||||
|
logger.debug(vectors.getKey() + ": " + vectors.getValue().toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Exception %s caught trying to do Fetch", e.getMessage());
|
logger.error("Exception %s caught trying to do Fetch", e.getMessage());
|
||||||
logger.error(e.getStackTrace());
|
logger.error(e.getStackTrace());
|
||||||
|
@ -20,6 +20,8 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
|||||||
import io.pinecone.proto.QueryRequest;
|
import io.pinecone.proto.QueryRequest;
|
||||||
import io.pinecone.PineconeConnection;
|
import io.pinecone.PineconeConnection;
|
||||||
import io.pinecone.proto.QueryResponse;
|
import io.pinecone.proto.QueryResponse;
|
||||||
|
import io.pinecone.proto.ScoredVector;
|
||||||
|
import io.pinecone.proto.SingleQueryResults;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@ -44,8 +46,13 @@ public class PineconeQueryOp extends PineconeOp {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
QueryResponse response = connection.getBlockingStub().query(request);
|
QueryResponse response = connection.getBlockingStub().query(request);
|
||||||
logger.info("got query result ids: "
|
if (logger.isDebugEnabled()) {
|
||||||
+ response.getResultsList().get(0).getMatchesList());
|
for (SingleQueryResults results : response.getResultsList()) {
|
||||||
|
for (ScoredVector scored : results.getMatchesList()) {
|
||||||
|
logger.debug(scored.getId() + ": " + scored.getScore());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Exception %s caught trying to do Query", e.getMessage());
|
logger.error("Exception %s caught trying to do Query", e.getMessage());
|
||||||
logger.error(e.getStackTrace());
|
logger.error(e.getStackTrace());
|
||||||
|
@ -44,7 +44,7 @@ public class PineconeUpdateOp extends PineconeOp {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
UpdateResponse response = connection.getBlockingStub().update(request);
|
UpdateResponse response = connection.getBlockingStub().update(request);
|
||||||
// Do soemething with the response...
|
logger.debug("UpdateResponse succesful: " + response.toString());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Exception %s caught trying to do Update", e.getMessage());
|
logger.error("Exception %s caught trying to do Update", e.getMessage());
|
||||||
logger.error(e.getStackTrace());
|
logger.error(e.getStackTrace());
|
||||||
|
@ -44,7 +44,7 @@ public class PineconeUpsertOp extends PineconeOp {
|
|||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
UpsertResponse response = connection.getBlockingStub().upsert(request);
|
UpsertResponse response = connection.getBlockingStub().upsert(request);
|
||||||
logger.info("Put " + response.getUpsertedCount() + " vectors into the index");
|
logger.debug("Put " + response.getUpsertedCount() + " vectors into the index");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Exception %s caught trying to do upsert", e.getMessage());
|
logger.error("Exception %s caught trying to do upsert", e.getMessage());
|
||||||
logger.error(e.getStackTrace());
|
logger.error(e.getStackTrace());
|
||||||
|
Loading…
Reference in New Issue
Block a user