Skip to content
Browse files

Adding exact flag

  • Loading branch information...
1 parent 3f7ad51 commit f82b9e973440fe656e1bfd54c64da6ccfd7d2cca @rsumbaly committed
Showing with 189 additions and 88 deletions.
  1. +23 −16 clients/python/voldemort/protocol/voldemort_client_pb2.py
  2. +1 −1 contrib/krati/src/java/voldemort/store/krati/KratiStorageEngine.java
  3. +3 −1 src/java/voldemort/VoldemortClientShell.java
  4. +2 −2 src/java/voldemort/client/DefaultStoreClient.java
  5. +2 −2 src/java/voldemort/client/LazyStoreClient.java
  6. +3 −1 src/java/voldemort/client/StoreClient.java
  7. +1 −0 src/java/voldemort/client/protocol/RequestFormat.java
  8. +2 −0 src/java/voldemort/client/protocol/pb/ProtoBuffClientRequestFormat.java
  9. +67 −24 src/java/voldemort/client/protocol/pb/VProto.java
  10. +2 −0 src/java/voldemort/client/protocol/vold/VoldemortNativeClientRequestFormat.java
  11. +5 −1 src/java/voldemort/server/protocol/vold/VoldemortNativeRequestHandler.java
  12. +2 −2 src/java/voldemort/store/DelegatingStore.java
  13. +2 −1 src/java/voldemort/store/Store.java
  14. +1 −1 src/java/voldemort/store/bdb/BdbStorageEngine.java
  15. +2 −2 src/java/voldemort/store/compress/CompressingStore.java
  16. +1 −1 src/java/voldemort/store/configuration/ConfigurationStorageEngine.java
  17. +2 −1 src/java/voldemort/store/http/HttpStore.java
  18. +2 −2 src/java/voldemort/store/logging/LoggingStore.java
  19. +1 −1 src/java/voldemort/store/memory/InMemoryStorageEngine.java
  20. +1 −1 src/java/voldemort/store/metadata/MetadataStore.java
  21. +1 −1 src/java/voldemort/store/mysql/MysqlStorageEngine.java
  22. +1 −0 src/java/voldemort/store/nonblockingstore/NonblockingStore.java
  23. +2 −1 src/java/voldemort/store/nonblockingstore/ThreadPoolBasedNonblockingStoreImpl.java
  24. +18 −2 src/java/voldemort/store/readonly/ReadOnlyStorageEngine.java
  25. +5 −2 src/java/voldemort/store/routed/PipelineRoutedStore.java
  26. +1 −1 src/java/voldemort/store/routed/ThreadPoolRoutedStore.java
  27. +6 −2 src/java/voldemort/store/routed/action/PerformParallelHasKeysRequests.java
  28. +5 −1 src/java/voldemort/store/routed/action/PerformSerialHasKeysRequests.java
  29. +2 −2 src/java/voldemort/store/serialized/SerializingStore.java
  30. +2 −2 src/java/voldemort/store/slop/SlopStorageEngine.java
  31. +6 −3 src/java/voldemort/store/socket/SocketStore.java
  32. +5 −2 src/java/voldemort/store/socket/clientrequest/HasKeysClientRequest.java
  33. +2 −2 src/java/voldemort/store/views/ViewStorageEngine.java
  34. +1 −0 src/proto/voldemort-client.proto
  35. +1 −1 test/common/voldemort/cluster/failuredetector/MutableStoreVerifier.java
  36. +1 −1 test/common/voldemort/store/DoNothingStore.java
  37. +1 −1 test/common/voldemort/store/FailingReadsStore.java
  38. +1 −1 test/common/voldemort/store/FailingStore.java
  39. +1 −1 test/integration/voldemort/store/noop/NoopStorageEngine.java
  40. +2 −2 test/integration/voldemort/store/pausable/PausableStorageEngine.java
View
39 clients/python/voldemort/protocol/voldemort_client_pb2.py
@@ -10,7 +10,7 @@
DESCRIPTOR = descriptor.FileDescriptor(
name='voldemort-client.proto',
package='voldemort',
- serialized_pb='\n\x16voldemort-client.proto\x12\tvoldemort\".\n\nClockEntry\x12\x0f\n\x07node_id\x18\x01 \x02(\x05\x12\x0f\n\x07version\x18\x02 \x02(\x03\"H\n\x0bVectorClock\x12&\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.voldemort.ClockEntry\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\"C\n\tVersioned\x12\r\n\x05value\x18\x01 \x02(\x0c\x12\'\n\x07version\x18\x02 \x02(\x0b\x32\x16.voldemort.VectorClock\"2\n\x05\x45rror\x12\x12\n\nerror_code\x18\x01 \x02(\x05\x12\x15\n\rerror_message\x18\x02 \x02(\t\"D\n\rKeyedVersions\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12&\n\x08versions\x18\x02 \x03(\x0b\x32\x14.voldemort.Versioned\",\n\x0cKeyedBoolean\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\x0f\n\x07present\x18\x02 \x02(\x08\"-\n\nGetRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x12\n\ntransforms\x18\x02 \x01(\x0c\"W\n\x0bGetResponse\x12\'\n\tversioned\x18\x01 \x03(\x0b\x32\x14.voldemort.Versioned\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"_\n\x12GetVersionResponse\x12(\n\x08versions\x18\x01 \x03(\x0b\x32\x16.voldemort.VectorClock\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\x8e\x01\n\rGetAllRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12<\n\ntransforms\x18\x02 \x03(\x0b\x32(.voldemort.GetAllRequest.GetAllTransform\x1a\x31\n\x0fGetAllTransform\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\x11\n\ttransform\x18\x02 \x02(\x0c\"[\n\x0eGetAllResponse\x12(\n\x06values\x18\x01 \x03(\x0b\x32\x18.voldemort.KeyedVersions\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\x1e\n\x0eHasKeysRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\"[\n\x0fHasKeysResponse\x12\'\n\x06values\x18\x01 \x03(\x0b\x32\x17.voldemort.KeyedBoolean\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"V\n\nPutRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\tversioned\x18\x02 \x02(\x0b\x32\x14.voldemort.Versioned\x12\x12\n\ntransforms\x18\x03 \x01(\x0c\".\n\x0bPutResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"E\n\rDeleteRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\x07version\x18\x02 \x02(\x0b\x32\x16.voldemort.VectorClock\"B\n\x0e\x44\x65leteResponse\x12\x0f\n\x07success\x18\x01 \x02(\x08\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\xc6\x02\n\x10VoldemortRequest\x12$\n\x04type\x18\x01 \x02(\x0e\x32\x16.voldemort.RequestType\x12\x1b\n\x0cshould_route\x18\x02 \x02(\x08:\x05\x66\x61lse\x12\r\n\x05store\x18\x03 \x02(\t\x12\"\n\x03get\x18\x04 \x01(\x0b\x32\x15.voldemort.GetRequest\x12(\n\x06getAll\x18\x05 \x01(\x0b\x32\x18.voldemort.GetAllRequest\x12\"\n\x03put\x18\x06 \x01(\x0b\x32\x15.voldemort.PutRequest\x12(\n\x06\x64\x65lete\x18\x07 \x01(\x0b\x32\x18.voldemort.DeleteRequest\x12\x18\n\x10requestRouteType\x18\x08 \x01(\x05\x12*\n\x07hasKeys\x18\t \x01(\x0b\x32\x19.voldemort.HasKeysRequest*W\n\x0bRequestType\x12\x07\n\x03GET\x10\x00\x12\x0b\n\x07GET_ALL\x10\x01\x12\x07\n\x03PUT\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x0f\n\x0bGET_VERSION\x10\x04\x12\x0c\n\x08HAS_KEYS\x10\x05\x42(\n\x1cvoldemort.client.protocol.pbB\x06VProtoH\x01')
+ serialized_pb='\n\x16voldemort-client.proto\x12\tvoldemort\".\n\nClockEntry\x12\x0f\n\x07node_id\x18\x01 \x02(\x05\x12\x0f\n\x07version\x18\x02 \x02(\x03\"H\n\x0bVectorClock\x12&\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.voldemort.ClockEntry\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\"C\n\tVersioned\x12\r\n\x05value\x18\x01 \x02(\x0c\x12\'\n\x07version\x18\x02 \x02(\x0b\x32\x16.voldemort.VectorClock\"2\n\x05\x45rror\x12\x12\n\nerror_code\x18\x01 \x02(\x05\x12\x15\n\rerror_message\x18\x02 \x02(\t\"D\n\rKeyedVersions\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12&\n\x08versions\x18\x02 \x03(\x0b\x32\x14.voldemort.Versioned\",\n\x0cKeyedBoolean\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\x0f\n\x07present\x18\x02 \x02(\x08\"-\n\nGetRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x12\n\ntransforms\x18\x02 \x01(\x0c\"W\n\x0bGetResponse\x12\'\n\tversioned\x18\x01 \x03(\x0b\x32\x14.voldemort.Versioned\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"_\n\x12GetVersionResponse\x12(\n\x08versions\x18\x01 \x03(\x0b\x32\x16.voldemort.VectorClock\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\x8e\x01\n\rGetAllRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12<\n\ntransforms\x18\x02 \x03(\x0b\x32(.voldemort.GetAllRequest.GetAllTransform\x1a\x31\n\x0fGetAllTransform\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\x11\n\ttransform\x18\x02 \x02(\x0c\"[\n\x0eGetAllResponse\x12(\n\x06values\x18\x01 \x03(\x0b\x32\x18.voldemort.KeyedVersions\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"-\n\x0eHasKeysRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12\r\n\x05\x65xact\x18\x02 \x02(\x08\"[\n\x0fHasKeysResponse\x12\'\n\x06values\x18\x01 \x03(\x0b\x32\x17.voldemort.KeyedBoolean\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"V\n\nPutRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\tversioned\x18\x02 \x02(\x0b\x32\x14.voldemort.Versioned\x12\x12\n\ntransforms\x18\x03 \x01(\x0c\".\n\x0bPutResponse\x12\x1f\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x10.voldemort.Error\"E\n\rDeleteRequest\x12\x0b\n\x03key\x18\x01 \x02(\x0c\x12\'\n\x07version\x18\x02 \x02(\x0b\x32\x16.voldemort.VectorClock\"B\n\x0e\x44\x65leteResponse\x12\x0f\n\x07success\x18\x01 \x02(\x08\x12\x1f\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x10.voldemort.Error\"\xc6\x02\n\x10VoldemortRequest\x12$\n\x04type\x18\x01 \x02(\x0e\x32\x16.voldemort.RequestType\x12\x1b\n\x0cshould_route\x18\x02 \x02(\x08:\x05\x66\x61lse\x12\r\n\x05store\x18\x03 \x02(\t\x12\"\n\x03get\x18\x04 \x01(\x0b\x32\x15.voldemort.GetRequest\x12(\n\x06getAll\x18\x05 \x01(\x0b\x32\x18.voldemort.GetAllRequest\x12\"\n\x03put\x18\x06 \x01(\x0b\x32\x15.voldemort.PutRequest\x12(\n\x06\x64\x65lete\x18\x07 \x01(\x0b\x32\x18.voldemort.DeleteRequest\x12\x18\n\x10requestRouteType\x18\x08 \x01(\x05\x12*\n\x07hasKeys\x18\t \x01(\x0b\x32\x19.voldemort.HasKeysRequest*W\n\x0bRequestType\x12\x07\n\x03GET\x10\x00\x12\x0b\n\x07GET_ALL\x10\x01\x12\x07\n\x03PUT\x10\x02\x12\n\n\x06\x44\x45LETE\x10\x03\x12\x0f\n\x0bGET_VERSION\x10\x04\x12\x0c\n\x08HAS_KEYS\x10\x05\x42(\n\x1cvoldemort.client.protocol.pbB\x06VProtoH\x01')
_REQUESTTYPE = descriptor.EnumDescriptor(
name='RequestType',
@@ -45,8 +45,8 @@
],
containing_type=None,
options=None,
- serialized_start=1596,
- serialized_end=1683,
+ serialized_start=1611,
+ serialized_end=1698,
)
@@ -492,6 +492,13 @@
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
+ descriptor.FieldDescriptor(
+ name='exact', full_name='voldemort.HasKeysRequest.exact', index=1,
+ number=2, type=8, cpp_type=7, label=2,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ options=None),
],
extensions=[
],
@@ -502,7 +509,7 @@
is_extendable=False,
extension_ranges=[],
serialized_start=867,
- serialized_end=897,
+ serialized_end=912,
)
@@ -536,8 +543,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=899,
- serialized_end=990,
+ serialized_start=914,
+ serialized_end=1005,
)
@@ -578,8 +585,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=992,
- serialized_end=1078,
+ serialized_start=1007,
+ serialized_end=1093,
)
@@ -606,8 +613,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1080,
- serialized_end=1126,
+ serialized_start=1095,
+ serialized_end=1141,
)
@@ -641,8 +648,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1128,
- serialized_end=1197,
+ serialized_start=1143,
+ serialized_end=1212,
)
@@ -676,8 +683,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1199,
- serialized_end=1265,
+ serialized_start=1214,
+ serialized_end=1280,
)
@@ -760,8 +767,8 @@
options=None,
is_extendable=False,
extension_ranges=[],
- serialized_start=1268,
- serialized_end=1594,
+ serialized_start=1283,
+ serialized_end=1609,
)
View
2 contrib/krati/src/java/voldemort/store/krati/KratiStorageEngine.java
@@ -104,7 +104,7 @@ public void truncate() {
}
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
return StoreUtils.hasKeys(this, keys);
}
View
4 src/java/voldemort/VoldemortClientShell.java
@@ -183,7 +183,7 @@ private static void processCommands(StoreClientFactory factory,
} catch(EndOfFileException e) {
// this is okay, just means we are done reading
}
- Map<Object, Boolean> vals = client.hasKeys(keys);
+ Map<Object, Boolean> vals = client.hasKeys(keys, true);
if(vals.size() > 0) {
for(Map.Entry<Object, Boolean> entry: vals.entrySet()) {
System.out.print(entry.getKey());
@@ -297,6 +297,8 @@ private static void processCommands(StoreClientFactory factory,
System.out.println(PROMPT
+ "getall key1 [key2...] --- Retrieve the value(s) associated with the key(s).");
System.out.println(PROMPT
+ + "haskeys key1 [key2...] --- Boolean to signify if the key exists");
+ System.out.println(PROMPT
+ "delete key --- Remove all values associated with the key.");
System.out.println(PROMPT
+ "preflist key --- Get node preference list for given key.");
View
4 src/java/voldemort/client/DefaultStoreClient.java
@@ -357,7 +357,7 @@ else if(versions.size() == 1)
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
// Pre-populate with all false
Map<K, Boolean> returnMap = new HashMap<K, Boolean>();
for(K key: keys) {
@@ -365,7 +365,7 @@ else if(versions.size() == 1)
}
for(int attempts = 0; attempts < this.metadataRefreshAttempts; attempts++) {
try {
- Map<K, Boolean> items = store.hasKeys(keys);
+ Map<K, Boolean> items = store.hasKeys(keys, exact);
for(Map.Entry<K, Boolean> value: items.entrySet()) {
returnMap.put(value.getKey(), value.getValue());
}
View
4 src/java/voldemort/client/LazyStoreClient.java
@@ -123,8 +123,8 @@ public boolean delete(K key, Version version) {
return getStoreClient().getResponsibleNodes(key);
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
- return getStoreClient().hasKeys(keys);
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
+ return getStoreClient().hasKeys(keys, exact);
}
}
View
4 src/java/voldemort/client/StoreClient.java
@@ -211,9 +211,11 @@
* Given a set of keys, check if it exists
*
* @param keys Set of keys to check
+ * @param exact Do we want an exact answer? If set to false we can get some
+ * false positives as well ( and will be faster )
* @return Map of key to boolean. The guarantee is number of keys = number
* of input keys
*/
- public Map<K, Boolean> hasKeys(Iterable<K> keys);
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact);
}
View
1 src/java/voldemort/client/protocol/RequestFormat.java
@@ -71,6 +71,7 @@ public void writeGetAllRequest(DataOutputStream output,
public void writeHasKeysRequest(DataOutputStream output,
String storeName,
Iterable<ByteArray> keys,
+ boolean exact,
RequestRoutingType routingType) throws IOException;
public boolean isCompleteHasKeysResponse(ByteBuffer buffer);
View
2 src/java/voldemort/client/protocol/pb/ProtoBuffClientRequestFormat.java
@@ -246,12 +246,14 @@ private boolean isCompleteResponse(ByteBuffer buffer) {
public void writeHasKeysRequest(DataOutputStream output,
String storeName,
Iterable<ByteArray> keys,
+ boolean exact,
RequestRoutingType routingType) throws IOException {
StoreUtils.assertValidKeys(keys);
VProto.HasKeysRequest.Builder req = VProto.HasKeysRequest.newBuilder();
for(ByteArray key: keys)
req.addKeys(ByteString.copyFrom(key.get()));
+ req.setExact(exact);
ProtoUtils.writeMessage(output,
VProto.VoldemortRequest.newBuilder()
View
91 src/java/voldemort/client/protocol/pb/VProto.java
@@ -4482,9 +4482,17 @@ public HasKeysRequest getDefaultInstanceForType() {
return keys_.get(index);
}
+ // required bool exact = 2;
+ public static final int EXACT_FIELD_NUMBER = 2;
+ private boolean hasExact;
+ private boolean exact_ = false;
+ public boolean hasExact() { return hasExact; }
+ public boolean getExact() { return exact_; }
+
private void initFields() {
}
public final boolean isInitialized() {
+ if (!hasExact) return false;
return true;
}
@@ -4494,6 +4502,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
for (com.google.protobuf.ByteString element : getKeysList()) {
output.writeBytes(1, element);
}
+ if (hasExact()) {
+ output.writeBool(2, getExact());
+ }
getUnknownFields().writeTo(output);
}
@@ -4512,6 +4523,10 @@ public int getSerializedSize() {
size += dataSize;
size += 1 * getKeysList().size();
}
+ if (hasExact()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(2, getExact());
+ }
size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size;
return size;
@@ -4680,6 +4695,9 @@ public Builder mergeFrom(voldemort.client.protocol.pb.VProto.HasKeysRequest othe
}
result.keys_.addAll(other.keys_);
}
+ if (other.hasExact()) {
+ setExact(other.getExact());
+ }
this.mergeUnknownFields(other.getUnknownFields());
return this;
}
@@ -4709,6 +4727,10 @@ public Builder mergeFrom(
addKeys(input.readBytes());
break;
}
+ case 16: {
+ setExact(input.readBool());
+ break;
+ }
}
}
}
@@ -4754,6 +4776,24 @@ public Builder clearKeys() {
return this;
}
+ // required bool exact = 2;
+ public boolean hasExact() {
+ return result.hasExact();
+ }
+ public boolean getExact() {
+ return result.getExact();
+ }
+ public Builder setExact(boolean value) {
+ result.hasExact = true;
+ result.exact_ = value;
+ return this;
+ }
+ public Builder clearExact() {
+ result.hasExact = false;
+ result.exact_ = false;
+ return this;
+ }
+
// @@protoc_insertion_point(builder_scope:voldemort.HasKeysRequest)
}
@@ -6692,6 +6732,9 @@ public final boolean isInitialized() {
if (hasDelete()) {
if (!getDelete().isInitialized()) return false;
}
+ if (hasHasKeys()) {
+ if (!getHasKeys().isInitialized()) return false;
+ }
return true;
}
@@ -7452,29 +7495,29 @@ public Builder clearHasKeys() {
"m\0321\n\017GetAllTransform\022\013\n\003key\030\001 \002(\014\022\021\n\ttra" +
"nsform\030\002 \002(\014\"[\n\016GetAllResponse\022(\n\006values",
"\030\001 \003(\0132\030.voldemort.KeyedVersions\022\037\n\005erro" +
- "r\030\002 \001(\0132\020.voldemort.Error\"\036\n\016HasKeysRequ" +
- "est\022\014\n\004keys\030\001 \003(\014\"[\n\017HasKeysResponse\022\'\n\006" +
- "values\030\001 \003(\0132\027.voldemort.KeyedBoolean\022\037\n" +
- "\005error\030\002 \001(\0132\020.voldemort.Error\"V\n\nPutReq" +
- "uest\022\013\n\003key\030\001 \002(\014\022\'\n\tversioned\030\002 \002(\0132\024.v" +
- "oldemort.Versioned\022\022\n\ntransforms\030\003 \001(\014\"." +
- "\n\013PutResponse\022\037\n\005error\030\001 \001(\0132\020.voldemort" +
- ".Error\"E\n\rDeleteRequest\022\013\n\003key\030\001 \002(\014\022\'\n\007" +
- "version\030\002 \002(\0132\026.voldemort.VectorClock\"B\n",
- "\016DeleteResponse\022\017\n\007success\030\001 \002(\010\022\037\n\005erro" +
- "r\030\002 \001(\0132\020.voldemort.Error\"\306\002\n\020VoldemortR" +
- "equest\022$\n\004type\030\001 \002(\0162\026.voldemort.Request" +
- "Type\022\033\n\014should_route\030\002 \002(\010:\005false\022\r\n\005sto" +
- "re\030\003 \002(\t\022\"\n\003get\030\004 \001(\0132\025.voldemort.GetReq" +
- "uest\022(\n\006getAll\030\005 \001(\0132\030.voldemort.GetAllR" +
- "equest\022\"\n\003put\030\006 \001(\0132\025.voldemort.PutReque" +
- "st\022(\n\006delete\030\007 \001(\0132\030.voldemort.DeleteReq" +
- "uest\022\030\n\020requestRouteType\030\010 \001(\005\022*\n\007hasKey" +
- "s\030\t \001(\0132\031.voldemort.HasKeysRequest*W\n\013Re",
- "questType\022\007\n\003GET\020\000\022\013\n\007GET_ALL\020\001\022\007\n\003PUT\020\002" +
- "\022\n\n\006DELETE\020\003\022\017\n\013GET_VERSION\020\004\022\014\n\010HAS_KEY" +
- "S\020\005B(\n\034voldemort.client.protocol.pbB\006VPr" +
- "otoH\001"
+ "r\030\002 \001(\0132\020.voldemort.Error\"-\n\016HasKeysRequ" +
+ "est\022\014\n\004keys\030\001 \003(\014\022\r\n\005exact\030\002 \002(\010\"[\n\017HasK" +
+ "eysResponse\022\'\n\006values\030\001 \003(\0132\027.voldemort." +
+ "KeyedBoolean\022\037\n\005error\030\002 \001(\0132\020.voldemort." +
+ "Error\"V\n\nPutRequest\022\013\n\003key\030\001 \002(\014\022\'\n\tvers" +
+ "ioned\030\002 \002(\0132\024.voldemort.Versioned\022\022\n\ntra" +
+ "nsforms\030\003 \001(\014\".\n\013PutResponse\022\037\n\005error\030\001 " +
+ "\001(\0132\020.voldemort.Error\"E\n\rDeleteRequest\022\013" +
+ "\n\003key\030\001 \002(\014\022\'\n\007version\030\002 \002(\0132\026.voldemort",
+ ".VectorClock\"B\n\016DeleteResponse\022\017\n\007succes" +
+ "s\030\001 \002(\010\022\037\n\005error\030\002 \001(\0132\020.voldemort.Error" +
+ "\"\306\002\n\020VoldemortRequest\022$\n\004type\030\001 \002(\0162\026.vo" +
+ "ldemort.RequestType\022\033\n\014should_route\030\002 \002(" +
+ "\010:\005false\022\r\n\005store\030\003 \002(\t\022\"\n\003get\030\004 \001(\0132\025.v" +
+ "oldemort.GetRequest\022(\n\006getAll\030\005 \001(\0132\030.vo" +
+ "ldemort.GetAllRequest\022\"\n\003put\030\006 \001(\0132\025.vol" +
+ "demort.PutRequest\022(\n\006delete\030\007 \001(\0132\030.vold" +
+ "emort.DeleteRequest\022\030\n\020requestRouteType\030" +
+ "\010 \001(\005\022*\n\007hasKeys\030\t \001(\0132\031.voldemort.HasKe",
+ "ysRequest*W\n\013RequestType\022\007\n\003GET\020\000\022\013\n\007GET" +
+ "_ALL\020\001\022\007\n\003PUT\020\002\022\n\n\006DELETE\020\003\022\017\n\013GET_VERSI" +
+ "ON\020\004\022\014\n\010HAS_KEYS\020\005B(\n\034voldemort.client.p" +
+ "rotocol.pbB\006VProtoH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -7582,7 +7625,7 @@ public Builder clearHasKeys() {
internal_static_voldemort_HasKeysRequest_fieldAccessorTable = new
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_voldemort_HasKeysRequest_descriptor,
- new java.lang.String[] { "Keys", },
+ new java.lang.String[] { "Keys", "Exact", },
voldemort.client.protocol.pb.VProto.HasKeysRequest.class,
voldemort.client.protocol.pb.VProto.HasKeysRequest.Builder.class);
internal_static_voldemort_HasKeysResponse_descriptor =
View
2 src/java/voldemort/client/protocol/vold/VoldemortNativeClientRequestFormat.java
@@ -176,6 +176,7 @@ public void writeGetAllRequest(DataOutputStream output,
public void writeHasKeysRequest(DataOutputStream output,
String storeName,
Iterable<ByteArray> keys,
+ boolean exact,
RequestRoutingType routingType) throws IOException {
StoreUtils.assertValidKeys(keys);
output.writeByte(VoldemortOpCode.HAS_KEYS_OP_CODE);
@@ -193,6 +194,7 @@ public void writeHasKeysRequest(DataOutputStream output,
output.writeInt(key.length());
output.write(key.get());
}
+ output.writeBoolean(exact);
}
public Map<ByteArray, Boolean> readHasKeysResponse(DataInputStream stream) throws IOException {
View
6 src/java/voldemort/server/protocol/vold/VoldemortNativeRequestHandler.java
@@ -214,6 +214,9 @@ public boolean isCompleteRequest(final ByteBuffer buffer) {
// Read the keys to skip the bytes.
for(int i = 0; i < numKeys; i++)
readKey(inputStream);
+
+ // Read a boolean for 'exact'
+ inputStream.readBoolean();
break;
}
case VoldemortOpCode.PUT_OP_CODE: {
@@ -342,11 +345,12 @@ private void handleHasKeys(DataInputStream inputStream,
List<ByteArray> keys = new ArrayList<ByteArray>(numKeys);
for(int i = 0; i < numKeys; i++)
keys.add(readKey(inputStream));
+ boolean exact = inputStream.readBoolean();
// execute the operation
Map<ByteArray, Boolean> results = null;
try {
- results = store.hasKeys(keys);
+ results = store.hasKeys(keys, exact);
outputStream.writeShort(0);
} catch(VoldemortException e) {
logger.error(e.getMessage());
View
4 src/java/voldemort/store/DelegatingStore.java
@@ -86,8 +86,8 @@ public String toString() {
return innerStore.getVersions(key);
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
- return innerStore.hasKeys(keys);
+ return innerStore.hasKeys(keys, exact);
}
}
View
3 src/java/voldemort/store/Store.java
@@ -113,8 +113,9 @@
* Given a set of keys, check if it exists
*
* @param keys Set of keys to check
+ * @param exact Do we want an exact answer?
* @return Map of key to boolean
*/
- public Map<K, Boolean> hasKeys(Iterable<K> keys);
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact);
}
View
2 src/java/voldemort/store/bdb/BdbStorageEngine.java
@@ -261,7 +261,7 @@ private Database getBdbDatabase() {
return bdbDatabase;
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
return StoreUtils.hasKeys(this, keys);
}
View
4 src/java/voldemort/store/compress/CompressingStore.java
@@ -174,8 +174,8 @@ public boolean delete(ByteArray key, Version version) throws VoldemortException
return innerStore.delete(deflateKey(key), version);
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
- return innerStore.hasKeys(deflateKeys(keys));
+ return innerStore.hasKeys(deflateKeys(keys), exact);
}
}
View
2 src/java/voldemort/store/configuration/ConfigurationStorageEngine.java
@@ -244,7 +244,7 @@ public boolean isPartitionAware() {
return false;
}
- public Map<String, Boolean> hasKeys(Iterable<String> keys) {
+ public Map<String, Boolean> hasKeys(Iterable<String> keys, boolean exact) {
throw new VoldemortException("Has keys operation not supported in ConfigurationStorageEngine");
}
}
View
3 src/java/voldemort/store/http/HttpStore.java
@@ -210,7 +210,7 @@ public Object getCapability(StoreCapabilityType capability) {
}
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKey(keys);
DataInputStream input = null;
try {
@@ -219,6 +219,7 @@ public Object getCapability(StoreCapabilityType capability) {
requestFormat.writeHasKeysRequest(new DataOutputStream(outputBytes),
storeName,
keys,
+ exact,
reroute);
input = executeRequest(method, outputBytes);
return requestFormat.readHasKeysResponse(input);
View
4 src/java/voldemort/store/logging/LoggingStore.java
@@ -82,13 +82,13 @@ public void close() throws VoldemortException {
}
@Override
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
long startTimeNs = 0;
boolean succeeded = false;
if(logger.isDebugEnabled())
startTimeNs = time.getNanoseconds();
try {
- Map<K, Boolean> l = getInnerStore().hasKeys(keys);
+ Map<K, Boolean> l = getInnerStore().hasKeys(keys, exact);
succeeded = true;
return l;
} finally {
View
2 src/java/voldemort/store/memory/InMemoryStorageEngine.java
@@ -103,7 +103,7 @@ public boolean delete(K key, Version version) {
return StoreUtils.getVersions(get(key, null));
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
return StoreUtils.hasKeys(this, keys);
}
View
2 src/java/voldemort/store/metadata/MetadataStore.java
@@ -448,7 +448,7 @@ public boolean delete(ByteArray key, Version version) throws VoldemortException
return StoreUtils.getAll(this, keys, transforms);
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
return StoreUtils.hasKeys(this, keys);
}
View
2 src/java/voldemort/store/mysql/MysqlStorageEngine.java
@@ -201,7 +201,7 @@ private void delete(Connection connection, byte[] key, byte[] version) throws SQ
}
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
return StoreUtils.hasKeys(this, keys);
}
View
1 src/java/voldemort/store/nonblockingstore/NonblockingStore.java
@@ -74,6 +74,7 @@ public void submitGetAllRequest(Iterable<ByteArray> keys,
long timeoutMs);
public void submitHasKeysRequest(Iterable<ByteArray> keys,
+ boolean exact,
NonblockingStoreCallback callback,
long timeoutMs);
View
3 src/java/voldemort/store/nonblockingstore/ThreadPoolBasedNonblockingStoreImpl.java
@@ -48,12 +48,13 @@ public ThreadPoolBasedNonblockingStoreImpl(ExecutorService executor,
}
public void submitHasKeysRequest(final Iterable<ByteArray> keys,
+ final boolean exact,
final NonblockingStoreCallback callback,
long timeoutMs) {
submit(new StoreRequest<Map<ByteArray, Boolean>>() {
public Map<ByteArray, Boolean> request(Store<ByteArray, byte[], byte[]> store) {
- return innerStore.hasKeys(keys);
+ return innerStore.hasKeys(keys, exact);
}
}, callback, timeoutMs, "has keys");
}
View
20 src/java/voldemort/store/readonly/ReadOnlyStorageEngine.java
@@ -502,18 +502,34 @@ public void truncate() {
}
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
Map<ByteArray, Boolean> results = new HashMap<ByteArray, Boolean>();
try {
fileModificationLock.readLock().lock();
+ List<KeyValueLocation> keysAndValueLocations = Lists.newArrayList();
for(ByteArray key: keys) {
int chunk = fileSet.getChunkForKey(key.get());
int valueLocation = searchStrategy.indexOf(fileSet.indexFileFor(chunk),
fileSet.keyToStorageFormat(key.get()),
fileSet.getIndexFileSize(chunk));
if(valueLocation >= 0) {
- results.put(key, true);
+ if(exact)
+ keysAndValueLocations.add(new KeyValueLocation(chunk, key, valueLocation));
+ else
+ results.put(key, true);
+ }
+ }
+
+ if(exact) {
+ Collections.sort(keysAndValueLocations);
+
+ for(KeyValueLocation keyVal: keysAndValueLocations) {
+ byte[] value = fileSet.readValue(keyVal.getKey().get(),
+ keyVal.getChunk(),
+ keyVal.getValueLocation());
+ if(value.length > 0)
+ results.put(keyVal.getKey(), true);
}
}
return results;
View
7 src/java/voldemort/store/routed/PipelineRoutedStore.java
@@ -372,7 +372,8 @@ private String formatNodeValuesFromGet(List<Response<ByteArray, List<Versioned<b
return pipelineData.getResult();
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) throws VoldemortException {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact)
+ throws VoldemortException {
StoreUtils.assertValidKeys(keys);
long startTimeMs = -1;
@@ -407,11 +408,13 @@ private String formatNodeValuesFromGet(List<Response<ByteArray, List<Versioned<b
Event.INSUFFICIENT_SUCCESSES,
failureDetector,
timeoutConfig.getOperationTimeout(VoldemortOpCode.HAS_KEYS_OP_CODE),
- nonblockingStores));
+ nonblockingStores,
+ exact));
pipeline.addEventAction(Event.INSUFFICIENT_SUCCESSES,
new PerformSerialHasKeysRequests(pipelineData,
Event.COMPLETED,
keys,
+ exact,
failureDetector,
innerStores,
storeDef.getPreferredReads(),
View
2 src/java/voldemort/store/routed/ThreadPoolRoutedStore.java
@@ -941,7 +941,7 @@ private GetAllResult(GetAllCallable callable,
List<R> execute(Store<ByteArray, byte[], byte[]> store, ByteArray key, byte[] transforms);
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
throw new VoldemortException("Unsupported operation hasKeys using thread pool routed store");
}
}
View
8 src/java/voldemort/store/routed/action/PerformParallelHasKeysRequests.java
@@ -47,15 +47,19 @@
private final FailureDetector failureDetector;
+ private final boolean exact;
+
public PerformParallelHasKeysRequests(HasKeysPipelineData pipelineData,
Event completeEvent,
FailureDetector failureDetector,
long timeoutMs,
- Map<Integer, NonblockingStore> nonblockingStores) {
+ Map<Integer, NonblockingStore> nonblockingStores,
+ boolean exact) {
super(pipelineData, completeEvent);
this.failureDetector = failureDetector;
this.timeoutMs = timeoutMs;
this.nonblockingStores = nonblockingStores;
+ this.exact = exact;
}
@SuppressWarnings("unchecked")
@@ -109,7 +113,7 @@ public void requestComplete(Object result, long requestTime) {
+ " request on node " + node.getId());
NonblockingStore store = nonblockingStores.get(node.getId());
- store.submitHasKeysRequest(keys, callback, timeoutMs);
+ store.submitHasKeysRequest(keys, exact, callback, timeoutMs);
}
try {
View
6 src/java/voldemort/store/routed/action/PerformSerialHasKeysRequests.java
@@ -51,9 +51,12 @@
private final int required;
+ private final boolean exact;
+
public PerformSerialHasKeysRequests(HasKeysPipelineData pipelineData,
Event completeEvent,
Iterable<ByteArray> keys,
+ boolean exact,
FailureDetector failureDetector,
Map<Integer, Store<ByteArray, byte[], byte[]>> stores,
int preferred,
@@ -64,6 +67,7 @@ public PerformSerialHasKeysRequests(HasKeysPipelineData pipelineData,
this.stores = stores;
this.preferred = preferred;
this.required = required;
+ this.exact = exact;
}
public void execute(Pipeline pipeline) {
@@ -108,7 +112,7 @@ public void execute(Pipeline pipeline) {
try {
Store<ByteArray, byte[], byte[]> store = stores.get(node.getId());
- Map<ByteArray, Boolean> values = store.hasKeys(Lists.newArrayList(key));
+ Map<ByteArray, Boolean> values = store.hasKeys(Lists.newArrayList(key), exact);
Boolean retrieved = values.get(key);
if(retrieved == null)
View
4 src/java/voldemort/store/serialized/SerializingStore.java
@@ -129,10 +129,10 @@ private ByteArray keyToBytes(K key) {
return result;
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
Map<ByteArray, K> byteKeyToKey = keysToBytes(keys);
- Map<ByteArray, Boolean> storeResult = store.hasKeys(byteKeyToKey.keySet());
+ Map<ByteArray, Boolean> storeResult = store.hasKeys(byteKeyToKey.keySet(), exact);
Map<K, Boolean> result = Maps.newHashMapWithExpectedSize(storeResult.size());
for(Map.Entry<ByteArray, Boolean> mapEntry: storeResult.entrySet()) {
result.put(byteKeyToKey.get(mapEntry.getKey()), mapEntry.getValue());
View
4 src/java/voldemort/store/slop/SlopStorageEngine.java
@@ -103,8 +103,8 @@ public void truncate() {
return slopEngine.getAll(keys, transforms);
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
- return slopEngine.hasKeys(keys);
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
+ return slopEngine.hasKeys(keys, exact);
}
public void put(ByteArray key, Versioned<byte[]> value, byte[] transforms)
View
9 src/java/voldemort/store/socket/SocketStore.java
@@ -140,13 +140,15 @@ public void submitGetAllRequest(Iterable<ByteArray> keys,
}
public void submitHasKeysRequest(Iterable<ByteArray> keys,
+ boolean exact,
NonblockingStoreCallback callback,
long timeoutMs) {
StoreUtils.assertValidKeys(keys);
HasKeysClientRequest clientRequest = new HasKeysClientRequest(storeName,
requestFormat,
requestRoutingType,
- keys);
+ keys,
+ exact);
if(logger.isDebugEnabled())
logger.debug("HASKEYS keyRef: " + System.identityHashCode(keys) + " requestRef: "
+ System.identityHashCode(clientRequest));
@@ -226,12 +228,13 @@ public boolean delete(ByteArray key, Version version) throws VoldemortException
return request(clientRequest, "getAll");
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
StoreUtils.assertValidKeys(keys);
HasKeysClientRequest clientRequest = new HasKeysClientRequest(storeName,
requestFormat,
requestRoutingType,
- keys);
+ keys,
+ exact);
if(logger.isDebugEnabled())
logger.debug("HASKEYS keyRef: " + System.identityHashCode(keys) + " requestRef: "
+ System.identityHashCode(clientRequest));
View
7 src/java/voldemort/store/socket/clientrequest/HasKeysClientRequest.java
@@ -29,13 +29,16 @@
public class HasKeysClientRequest extends AbstractStoreClientRequest<Map<ByteArray, Boolean>> {
private final Iterable<ByteArray> keys;
+ private final boolean exact;
public HasKeysClientRequest(String storeName,
RequestFormat requestFormat,
RequestRoutingType requestRoutingType,
- Iterable<ByteArray> keys) {
+ Iterable<ByteArray> keys,
+ boolean exact) {
super(storeName, requestFormat, requestRoutingType);
this.keys = keys;
+ this.exact = exact;
}
public boolean isCompleteResponse(ByteBuffer buffer) {
@@ -44,7 +47,7 @@ public boolean isCompleteResponse(ByteBuffer buffer) {
@Override
protected void formatRequestInternal(DataOutputStream outputStream) throws IOException {
- requestFormat.writeHasKeysRequest(outputStream, storeName, keys, requestRoutingType);
+ requestFormat.writeHasKeysRequest(outputStream, storeName, keys, exact, requestRoutingType);
}
@Override
View
4 src/java/voldemort/store/views/ViewStorageEngine.java
@@ -222,7 +222,7 @@ public boolean isPartitionAware() {
return target.isPartitionAware();
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
- return target.hasKeys(keys);
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
+ return target.hasKeys(keys, exact);
}
}
View
1 src/proto/voldemort-client.proto
@@ -66,6 +66,7 @@ message GetAllResponse {
message HasKeysRequest {
repeated bytes keys = 1;
+ required bool exact = 2;
}
message HasKeysResponse {
View
2 test/common/voldemort/cluster/failuredetector/MutableStoreVerifier.java
@@ -98,7 +98,7 @@ public String getName() {
public void put(ByteArray key, Versioned<byte[]> value, byte[] transforms)
throws VoldemortException {}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
return null;
}
View
2 test/common/voldemort/store/DoNothingStore.java
@@ -73,7 +73,7 @@ public Object getCapability(StoreCapabilityType capability) {
return null;
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
// Do nothing
return null;
}
View
2 test/common/voldemort/store/FailingReadsStore.java
@@ -37,7 +37,7 @@ public boolean delete(K key, Version version) throws VoldemortException {
throw new VoldemortException("Operation failed");
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
throw new VoldemortException("Operation failed");
}
View
2 test/common/voldemort/store/FailingStore.java
@@ -68,7 +68,7 @@ public void put(K key, Versioned<V> value, T transforms) throws VoldemortExcepti
throw exception;
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
throw exception;
}
View
2 test/integration/voldemort/store/noop/NoopStorageEngine.java
@@ -75,7 +75,7 @@ public void truncate() {
return dataMap;
}
- public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys) {
+ public Map<ByteArray, Boolean> hasKeys(Iterable<ByteArray> keys, boolean exact) {
return StoreUtils.hasKeys(this, keys);
}
View
4 test/integration/voldemort/store/pausable/PausableStorageEngine.java
@@ -69,9 +69,9 @@ private void blockIfNecessary() {
return inner.getAll(keys, transforms);
}
- public Map<K, Boolean> hasKeys(Iterable<K> keys) {
+ public Map<K, Boolean> hasKeys(Iterable<K> keys, boolean exact) {
blockIfNecessary();
- return inner.hasKeys(keys);
+ return inner.hasKeys(keys, exact);
}
public void put(K key, Versioned<V> value, T transforms) {

0 comments on commit f82b9e9

Please sign in to comment.
Something went wrong with that request. Please try again.