diff --git a/core/src/main/java/com/yahoo/ycsb/Status.java b/core/src/main/java/com/yahoo/ycsb/Status.java index bc32b86c65d273d76bb702b6ae27b22b4d2cd609..5e5b3a887d3f3bb6c871c950977ab2585c3fc28f 100644 --- a/core/src/main/java/com/yahoo/ycsb/Status.java +++ b/core/src/main/java/com/yahoo/ycsb/Status.java @@ -87,6 +87,6 @@ public class Status { public static final Status BAD_REQUEST = new Status("BAD_REQUEST", "The request was not valid."); public static final Status FORBIDDEN = new Status("FORBIDDEN", "The operation is forbidden."); public static final Status SERVICE_UNAVAILABLE = new Status("SERVICE_UNAVAILABLE", "Dependant service for the current binding is not available."); - + public static final Status BATCHED_OK = new Status("BATCHED_OK", "The operation has been batched by the binding to be executed later."); } diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java b/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java index 89eb7d250080530b309d3ed7861ab975b70162fa..a50b915a3243eee2795261ca58460966583a091b 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/AsyncMongoDbClient.java @@ -286,7 +286,7 @@ public class AsyncMongoDbClient extends DB { batchedWriteCount += 1; if (batchedWriteCount < batchSize) { - return OptionsSupport.BATCHED_OK; + return Status.BATCHED_OK; } long count = collection.write(batchedWrite); diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java b/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java index 1db8f0e1cfcd0e7d28fa52b6c73b34ddf77803a8..2b7cb114fe7a7c09ccdee7d27cede1221c612bbc 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/MongoDbClient.java @@ -286,7 +286,7 @@ public class MongoDbClient extends DB { } bulkInserts.clear(); } else { - return OptionsSupport.BATCHED_OK; + return Status.BATCHED_OK; } } return Status.OK; diff --git a/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java b/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java index c8aacd464f76946fa670f377ff0c0f853232b3ea..62092a0d10a51e4384156235f4a59504585ea853 100644 --- a/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java +++ b/mongodb/src/main/java/com/yahoo/ycsb/db/OptionsSupport.java @@ -18,8 +18,6 @@ package com.yahoo.ycsb.db; import java.util.Properties; -import com.yahoo.ycsb.Status; - /** * OptionsSupport provides methods for handling legacy options. * @@ -27,13 +25,6 @@ import com.yahoo.ycsb.Status; */ public final class OptionsSupport { - /** - * Status used for operations that have not been send to the server and have - * only been batched by the client. - */ - public static final Status BATCHED_OK = new Status("BATCHED_OK", - "The operation has been batched by the binding."); - /** Value for an unavailable property. */ private static final String UNAVAILABLE = "n/a";