Skip to content

Commit

Permalink
Expose BerkeleyDB JE read buffer configuration (see http://www.oracle…
Browse files Browse the repository at this point in the history
  • Loading branch information
afeinberg committed Dec 9, 2011
1 parent d650098 commit 4556518
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/java/voldemort/server/VoldemortConfig.java
Expand Up @@ -76,6 +76,8 @@ public class VoldemortConfig implements Serializable {
private int bdbCleanerThreads;
private long bdbLockTimeoutMs;
private int bdbLockNLockTables;
private int bdbLogFaultReadSize;
private int bdbLogIteratorReadSize;
private boolean bdbFairLatches;
private long bdbStatsCacheTtlMs;

Expand Down Expand Up @@ -206,6 +208,8 @@ public VoldemortConfig(Props props) {
this.bdbCleanerLookAheadCacheSize = props.getInt("bdb.cleaner.lookahead.cache.size", 8192);
this.bdbLockTimeoutMs = props.getLong("bdb.lock.timeout.ms", 500);
this.bdbLockNLockTables = props.getInt("bdb.lock.nLockTables", 1);
this.bdbLogFaultReadSize = props.getInt("bdb.log.fault.read.size", 2048);
this.bdbLogIteratorReadSize = props.getInt("bdb.log.iterator.read.size", 8192);
this.bdbFairLatches = props.getBoolean("bdb.fair.latches", false);
this.bdbCheckpointerHighPriority = props.getBoolean("bdb.checkpointer.high.priority", false);
this.bdbCleanerMaxBatchFiles = props.getInt("bdb.cleaner.max.batch.files", 0);
Expand Down Expand Up @@ -648,6 +652,22 @@ public int getBdbLockNLockTables() {
return bdbLockNLockTables;
}

public void setBdbLogFaultReadSize(int bdbLogFaultReadSize) {
this.bdbLogFaultReadSize = bdbLogFaultReadSize;
}

public int getBdbLogFaultReadSize() {
return bdbLogFaultReadSize;
}

public void setBdbLogIteratorReadSize(int bdbLogIteratorReadSize) {
this.bdbLogIteratorReadSize = bdbLogIteratorReadSize;
}

public int getBdbLogIteratorReadSize() {
return bdbLogIteratorReadSize;
}

public boolean getBdbFairLatches() {
return bdbFairLatches;
}
Expand Down
4 changes: 4 additions & 0 deletions src/java/voldemort/store/bdb/BdbStorageConfiguration.java
Expand Up @@ -101,6 +101,10 @@ public BdbStorageConfiguration(VoldemortConfig config) {
Boolean.toString(config.getBdbCheckpointerHighPriority()));
environmentConfig.setConfigParam(EnvironmentConfig.CLEANER_MAX_BATCH_FILES,
Integer.toString(config.getBdbCleanerMaxBatchFiles()));
environmentConfig.setConfigParam(EnvironmentConfig.LOG_FAULT_READ_SIZE,
Integer.toString(config.getBdbLogFaultReadSize()));
environmentConfig.setConfigParam(EnvironmentConfig.LOG_ITERATOR_READ_SIZE,
Integer.toString(config.getBdbLogIteratorReadSize()));

environmentConfig.setLockTimeout(config.getBdbLockTimeoutMs(), TimeUnit.MILLISECONDS);
databaseConfig = new DatabaseConfig();
Expand Down

0 comments on commit 4556518

Please sign in to comment.