mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
only report result size when result is not null
This commit is contained in:
parent
45bd31b77e
commit
3792865f43
@ -11,7 +11,7 @@ import com.amazonaws.services.dynamodbv2.document.spec.GetItemSpec;
|
|||||||
*/
|
*/
|
||||||
public class DDBGetItemOp extends DynamoDBOp {
|
public class DDBGetItemOp extends DynamoDBOp {
|
||||||
private final Table table;
|
private final Table table;
|
||||||
private GetItemSpec getItemSpec;
|
private final GetItemSpec getItemSpec;
|
||||||
private long resultSize=-1;
|
private long resultSize=-1;
|
||||||
|
|
||||||
public DDBGetItemOp(DynamoDB ddb, Table table, GetItemSpec getItemSpec) {
|
public DDBGetItemOp(DynamoDB ddb, Table table, GetItemSpec getItemSpec) {
|
||||||
@ -23,7 +23,9 @@ public class DDBGetItemOp extends DynamoDBOp {
|
|||||||
@Override
|
@Override
|
||||||
public Item apply(long value) {
|
public Item apply(long value) {
|
||||||
Item result = table.getItem(getItemSpec);
|
Item result = table.getItem(getItemSpec);
|
||||||
resultSize=result.numberOfAttributes();
|
if (result!=null) {
|
||||||
|
resultSize=result.numberOfAttributes();
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user