Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: voldemort/voldemort
base: master
...
head fork: voldemort/voldemort
compare: 17964e69a598f21edc70602e5b47ce1138ecbc01
  • 5 commits
  • 9 files changed
  • 0 commit comments
  • 2 contributors
View
6 .classpath
@@ -42,8 +42,6 @@
<classpathentry kind="lib" path="lib/protobuf-java-2.3.0.jar"/>
<classpathentry kind="lib" path="contrib/ec2-testing/lib/typica.jar"/>
<classpathentry kind="lib" path="lib/libthrift-0.2.0.jar"/>
- <classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>
- <classpathentry kind="lib" path="lib/je-4.0.103.jar"/>
<classpathentry kind="lib" path="lib/paranamer-2.1.jar"/>
<classpathentry kind="lib" path="lib/jackson-mapper-asl-1.4.0.jar"/>
<classpathentry kind="lib" path="lib/jackson-core-asl-1.4.0.jar"/>
@@ -52,5 +50,7 @@
<classpathentry kind="lib" path="contrib/krati/lib/krati-0.3.4.jar"/>
<classpathentry kind="lib" path="lib/jna.jar"/>
<classpathentry kind="lib" path="lib/mockito-all-1.8.5.jar" />
- <classpathentry kind="output" path="classes"/>
+ <classpathentry kind="lib" path="lib/google-collect-1.0-rc2.jar"/>
+ <classpathentry kind="lib" path="lib/je-4.0.92.jar"/>
+ <classpathentry kind="output" path="classes"/>
</classpath>
View
2  build.properties
@@ -34,4 +34,4 @@ tomcat.manager.password=tomcat
tomcat.context=/voldemort
## Release
-curr.release=0.81
+curr.release=0.92
View
BIN  lib/google-collect-1.0-rc2.jar
Binary file not shown
View
BIN  lib/google-collect-1.0.jar
Binary file not shown
View
BIN  lib/je-4.0.103.jar
Binary file not shown
View
BIN  lib/je-4.0.92.jar
Binary file not shown
View
26 src/java/voldemort/server/VoldemortConfig.java
@@ -69,6 +69,8 @@
private boolean bdbOneEnvPerStore;
private int bdbCleanerMinFileUtilization;
private int bdbCleanerMinUtilization;
+ private int bdbCleanerLookAheadCacheSize;
+
private boolean bdbCursorPreload;
private int bdbCleanerThreads;
private long bdbLockTimeoutMs;
@@ -109,6 +111,7 @@
private RequestFormatType requestFormatType;
private boolean enableSlop;
+ private boolean enableSlopPusherJob;
private boolean enableRepair;
private boolean enableGui;
private boolean enableHttpServer;
@@ -196,6 +199,7 @@ public VoldemortConfig(Props props) {
this.bdbCleanerMinFileUtilization = props.getInt("bdb.cleaner.min.file.utilization", 5);
this.bdbCleanerMinUtilization = props.getInt("bdb.cleaner.minUtilization", 50);
this.bdbCleanerThreads = props.getInt("bdb.cleaner.threads", 1);
+ this.bdbCleanerLookAheadCacheSize = props.getInt("bdb.cleaner.lookahead.cache.size", 8192);
this.bdbLockTimeoutMs = props.getLong("bdb.lock.timeout.ms", 500);
// enabling preload make cursor slow for insufficient bdb cache size.
@@ -255,6 +259,7 @@ public VoldemortConfig(Props props) {
this.enableJmx = props.getBoolean("jmx.enable", true);
this.enablePipelineRoutedStore = props.getBoolean("enable.pipeline.routed.store", true);
this.enableSlop = props.getBoolean("slop.enable", true);
+ this.enableSlopPusherJob = props.getBoolean("slop.pusher.enable", true);
this.slopMaxWriteBytesPerSec = props.getBytes("slop.write.byte.per.sec", 10 * 1000 * 1000);
this.enableVerboseLogging = props.getBoolean("enable.verbose.logging", true);
this.enableStatTracking = props.getBoolean("enable.stat.tracking", true);
@@ -264,11 +269,10 @@ public VoldemortConfig(Props props) {
this.enableGossip = props.getBoolean("enable.gossip", false);
this.enableRebalanceService = props.getBoolean("enable.rebalancing", true);
this.enableGrandfather = props.getBoolean("enable.grandfather", true);
- this.enableRepair = props.getBoolean("enable.repair", true);
+ this.enableRepair = props.getBoolean("enable.repair", false);
this.gossipInterval = props.getInt("gossip.interval.ms", 30 * 1000);
- this.enableSlop = props.getBoolean("slop.enable", true);
this.slopMaxWriteBytesPerSec = props.getBytes("slop.write.byte.per.sec", 10 * 1000 * 1000);
this.slopMaxReadBytesPerSec = props.getBytes("slop.read.byte.per.sec", 10 * 1000 * 1000);
this.slopStoreType = props.getString("slop.store.engine", BdbStorageConfiguration.TYPE_NAME);
@@ -555,6 +559,16 @@ public final void setBdbCleanerThreads(int bdbCleanerThreads) {
this.bdbCleanerThreads = bdbCleanerThreads;
}
+ public int getBdbCleanerLookAheadCacheSize() {
+ return bdbCleanerLookAheadCacheSize;
+ }
+
+ public final void setBdbCleanerLookAheadCacheSize(int bdbCleanerLookAheadCacheSize) {
+ if(bdbCleanerLookAheadCacheSize < 0)
+ throw new IllegalArgumentException("bdbCleanerLookAheadCacheSize should be at least 0");
+ this.bdbCleanerLookAheadCacheSize = bdbCleanerLookAheadCacheSize;
+ }
+
/**
*
* The lock timeout for all transactional and non-transactional operations.
@@ -936,6 +950,14 @@ public void setEnableSlop(boolean enableSlop) {
this.enableSlop = enableSlop;
}
+ public boolean isSlopPusherJobEnabled() {
+ return enableSlopPusherJob;
+ }
+
+ public void setEnableSlopPusherJob(boolean enableSlopPusherJob) {
+ this.enableSlopPusherJob = enableSlopPusherJob;
+ }
+
public boolean isRepairEnabled() {
return this.enableRepair;
}
View
76 src/java/voldemort/server/storage/StorageService.java
@@ -203,45 +203,47 @@ protected void startInner() {
registerEngine(slopEngine);
storeRepository.setSlopStore(slopEngine);
- // Now initialize the pusher job after some time
- GregorianCalendar cal = new GregorianCalendar();
- cal.add(Calendar.SECOND,
- (int) (voldemortConfig.getSlopFrequencyMs() / Time.MS_PER_SECOND));
- Date nextRun = cal.getTime();
- logger.info("Initializing slop pusher job type " + voldemortConfig.getPusherType()
- + " at " + nextRun);
-
- scheduler.schedule("slop",
- (voldemortConfig.getPusherType()
- .compareTo(BlockingSlopPusherJob.TYPE_NAME) == 0) ? new BlockingSlopPusherJob(storeRepository,
- metadata,
- failureDetector,
- voldemortConfig,
- scanPermits)
- : new StreamingSlopPusherJob(storeRepository,
- metadata,
- failureDetector,
- voldemortConfig,
- scanPermits),
- nextRun,
- voldemortConfig.getSlopFrequencyMs());
-
- /*
- * Register the repairer thread only if slop pusher job is also
- * enabled
- */
- if(voldemortConfig.isRepairEnabled()) {
+
+ if(voldemortConfig.isSlopPusherJobEnabled()) {
+ // Now initialize the pusher job after some time
+ GregorianCalendar cal = new GregorianCalendar();
cal.add(Calendar.SECOND,
- (int) (voldemortConfig.getRepairFrequencyMs() / Time.MS_PER_SECOND));
- nextRun = cal.getTime();
- logger.info("Initializing repair job " + voldemortConfig.getPusherType() + " at "
- + nextRun);
- RepairJob job = new RepairJob(storeRepository, metadata, scanPermits);
-
- JmxUtils.registerMbean(job, JmxUtils.createObjectName(job.getClass()));
- scheduler.schedule("repair", job, nextRun, voldemortConfig.getRepairFrequencyMs());
+ (int) (voldemortConfig.getSlopFrequencyMs() / Time.MS_PER_SECOND));
+ Date nextRun = cal.getTime();
+ logger.info("Initializing slop pusher job type " + voldemortConfig.getPusherType()
+ + " at " + nextRun);
+
+ scheduler.schedule("slop",
+ (voldemortConfig.getPusherType()
+ .compareTo(BlockingSlopPusherJob.TYPE_NAME) == 0) ? new BlockingSlopPusherJob(storeRepository,
+ metadata,
+ failureDetector,
+ voldemortConfig,
+ scanPermits)
+ : new StreamingSlopPusherJob(storeRepository,
+ metadata,
+ failureDetector,
+ voldemortConfig,
+ scanPermits),
+ nextRun,
+ voldemortConfig.getSlopFrequencyMs());
+
+ /*
+ * Register the repairer thread only if slop pusher job is also
+ * enabled
+ */
+ if(voldemortConfig.isRepairEnabled()) {
+ cal.add(Calendar.SECOND,
+ (int) (voldemortConfig.getRepairFrequencyMs() / Time.MS_PER_SECOND));
+ nextRun = cal.getTime();
+ logger.info("Initializing repair job " + voldemortConfig.getPusherType() + " at "
+ + nextRun);
+ RepairJob job = new RepairJob(storeRepository, metadata, scanPermits);
+
+ JmxUtils.registerMbean(job, JmxUtils.createObjectName(job.getClass()));
+ scheduler.schedule("repair", job, nextRun, voldemortConfig.getRepairFrequencyMs());
+ }
}
-
}
List<StoreDefinition> storeDefs = new ArrayList<StoreDefinition>(this.metadata.getStoreDefList());
View
2  src/java/voldemort/store/bdb/BdbStorageConfiguration.java
@@ -90,6 +90,8 @@ public BdbStorageConfiguration(VoldemortConfig config) {
Integer.toString(config.getBdbCleanerMinUtilization()));
environmentConfig.setConfigParam(EnvironmentConfig.CLEANER_THREADS,
Integer.toString(config.getBdbCleanerThreads()));
+ environmentConfig.setConfigParam(EnvironmentConfig.CLEANER_LOOK_AHEAD_CACHE_SIZE,
+ Integer.toString(config.getBdbCleanerLookAheadCacheSize()));
environmentConfig.setLockTimeout(config.getBdbLockTimeoutMs(), TimeUnit.MILLISECONDS);
databaseConfig = new DatabaseConfig();
databaseConfig.setAllowCreate(true);

No commit comments for this range

Something went wrong with that request. Please try again.