Permalink
Browse files

Fixing SlowStorageEngine and FileBackedCachingStorageEngine build issues

  • Loading branch information...
1 parent 5e48136 commit 3d51f8598d28ddb9ac2793bf7f815f184568fad3 @vinothchandar vinothchandar committed Oct 19, 2012
@@ -443,7 +443,7 @@ public void openSystemStore(StoreDefinition storeDef) {
+ " but " + storeDef.getType()
+ " storage engine has not been enabled.");
- final StorageEngine<ByteArray, byte[], byte[]> engine = config.getStore(storeDef);
+ final StorageEngine<ByteArray, byte[], byte[]> engine = config.getStore(storeDef, null);
// Noted that there is no read-only processing as for user stores.
@@ -16,6 +16,7 @@
package voldemort.store.configuration;
+import voldemort.routing.RoutingStrategy;
import voldemort.server.VoldemortConfig;
import voldemort.store.StorageConfiguration;
import voldemort.store.StorageEngine;
@@ -38,7 +39,8 @@ public FileBackedCachingStorageConfiguration(VoldemortConfig config) {
this.inputPath = config.getMetadataDirectory();
}
- public StorageEngine<ByteArray, byte[], byte[]> getStore(StoreDefinition storeDef) {
+ public StorageEngine<ByteArray, byte[], byte[]> getStore(StoreDefinition storeDef,
+ RoutingStrategy strategy) {
return new FileBackedCachingStorageEngine(storeDef.getName(), inputPath);
}
@@ -51,5 +53,4 @@ public void close() {}
public void update(StoreDefinition storeDef) {
}
-
}
@@ -333,4 +333,19 @@ public void close() {}
}
+ @Override
+ public ClosableIterator<Pair<ByteArray, Versioned<byte[]>>> entries(int partition) {
+ throw new UnsupportedOperationException("Partition based entries scan not supported for this storage type");
+ }
+
+ @Override
+ public ClosableIterator<ByteArray> keys(int partition) {
+ throw new UnsupportedOperationException("Partition based keys scan not supported for this storage type");
+ }
+
+ @Override
+ public boolean isPartitionScanSupported() {
+ return false;
+ }
+
}
@@ -17,6 +17,7 @@
import voldemort.VoldemortException;
import voldemort.common.OpTimeMap;
+import voldemort.routing.RoutingStrategy;
import voldemort.server.VoldemortConfig;
import voldemort.store.StorageConfiguration;
import voldemort.store.StorageEngine;
@@ -39,7 +40,8 @@ public SlowStorageConfiguration(VoldemortConfig config) {
this.voldemortConfig = config;
}
- public StorageEngine<ByteArray, byte[], byte[]> getStore(StoreDefinition storeDef) {
+ public StorageEngine<ByteArray, byte[], byte[]> getStore(StoreDefinition storeDef,
+ RoutingStrategy strategy) {
if(voldemortConfig != null) {
return new SlowStorageEngine<ByteArray, byte[], byte[]>(new InMemoryStorageEngine<ByteArray, byte[], byte[]>(storeDef.getName()),
this.voldemortConfig.testingGetSlowQueueingDelays(),
@@ -146,4 +146,19 @@ public Object getCapability(StoreCapabilityType capability) {
return innerStorageEngine.getCapability(capability);
}
+ @Override
+ public ClosableIterator<Pair<K, Versioned<V>>> entries(int partition) {
+ return innerStorageEngine.entries(partition);
+ }
+
+ @Override
+ public ClosableIterator<K> keys(int partition) {
+ return innerStorageEngine.keys(partition);
+ }
+
+ @Override
+ public boolean isPartitionScanSupported() {
+ return innerStorageEngine.isPartitionScanSupported();
+ }
+
}

0 comments on commit 3d51f85

Please sign in to comment.