[RocksJava] Removed deprecated skipLogErrorOnRecovery methods.

As annonunced these options are not used anymore so these are
removed from code.
main
fyrz 10 years ago
parent 566f652716
commit 5b7131c751
  1. 44
      java/rocksjni/options.cc
  2. 19
      java/src/main/java/org/rocksdb/DBOptions.java
  3. 25
      java/src/main/java/org/rocksdb/DBOptionsInterface.java
  4. 18
      java/src/main/java/org/rocksdb/Options.java
  5. 15
      java/src/test/java/org/rocksdb/DBOptionsTest.java
  6. 15
      java/src/test/java/org/rocksdb/OptionsTest.java

@ -890,28 +890,6 @@ void Java_org_rocksdb_Options_setIsFdCloseOnExec(
static_cast<bool>(is_fd_close_on_exec); static_cast<bool>(is_fd_close_on_exec);
} }
/*
* Class: org_rocksdb_Options
* Method: skipLogErrorOnRecovery
* Signature: (J)Z
*/
jboolean Java_org_rocksdb_Options_skipLogErrorOnRecovery(
JNIEnv* env, jobject jobj, jlong jhandle) {
return reinterpret_cast<rocksdb::Options*>(jhandle)
->skip_log_error_on_recovery;
}
/*
* Class: org_rocksdb_Options
* Method: setSkipLogErrorOnRecovery
* Signature: (JZ)V
*/
void Java_org_rocksdb_Options_setSkipLogErrorOnRecovery(
JNIEnv* env, jobject jobj, jlong jhandle, jboolean skip) {
reinterpret_cast<rocksdb::Options*>(jhandle)->skip_log_error_on_recovery =
static_cast<bool>(skip);
}
/* /*
* Class: org_rocksdb_Options * Class: org_rocksdb_Options
* Method: statsDumpPeriodSec * Method: statsDumpPeriodSec
@ -3697,28 +3675,6 @@ jboolean Java_org_rocksdb_DBOptions_isFdCloseOnExec(
return reinterpret_cast<rocksdb::DBOptions*>(jhandle)->is_fd_close_on_exec; return reinterpret_cast<rocksdb::DBOptions*>(jhandle)->is_fd_close_on_exec;
} }
/*
* Class: org_rocksdb_DBOptions
* Method: setSkipLogErrorOnRecovery
* Signature: (JZ)V
*/
void Java_org_rocksdb_DBOptions_setSkipLogErrorOnRecovery(
JNIEnv* env, jobject jobj, jlong jhandle, jboolean skip) {
reinterpret_cast<rocksdb::DBOptions*>(jhandle)->skip_log_error_on_recovery =
static_cast<bool>(skip);
}
/*
* Class: org_rocksdb_DBOptions
* Method: skipLogErrorOnRecovery
* Signature: (J)Z
*/
jboolean Java_org_rocksdb_DBOptions_skipLogErrorOnRecovery(
JNIEnv* env, jobject jobj, jlong jhandle) {
return reinterpret_cast<rocksdb::DBOptions*>(jhandle)
->skip_log_error_on_recovery;
}
/* /*
* Class: org_rocksdb_DBOptions * Class: org_rocksdb_DBOptions
* Method: setStatsDumpPeriodSec * Method: setStatsDumpPeriodSec

@ -494,22 +494,6 @@ public class DBOptions extends RocksObject implements DBOptionsInterface {
return isFdCloseOnExec(nativeHandle_); return isFdCloseOnExec(nativeHandle_);
} }
@Override
@Deprecated
public DBOptions setSkipLogErrorOnRecovery(
final boolean skip) {
assert(isInitialized());
setSkipLogErrorOnRecovery(nativeHandle_, skip);
return this;
}
@Override
@Deprecated
public boolean skipLogErrorOnRecovery() {
assert(isInitialized());
return skipLogErrorOnRecovery(nativeHandle_);
}
@Override @Override
public DBOptions setStatsDumpPeriodSec( public DBOptions setStatsDumpPeriodSec(
final int statsDumpPeriodSec) { final int statsDumpPeriodSec) {
@ -670,9 +654,6 @@ public class DBOptions extends RocksObject implements DBOptionsInterface {
private native void setIsFdCloseOnExec( private native void setIsFdCloseOnExec(
long handle, boolean isFdCloseOnExec); long handle, boolean isFdCloseOnExec);
private native boolean isFdCloseOnExec(long handle); private native boolean isFdCloseOnExec(long handle);
private native void setSkipLogErrorOnRecovery(
long handle, boolean skip);
private native boolean skipLogErrorOnRecovery(long handle);
private native void setStatsDumpPeriodSec( private native void setStatsDumpPeriodSec(
long handle, int statsDumpPeriodSec); long handle, int statsDumpPeriodSec);
private native int statsDumpPeriodSec(long handle); private native int statsDumpPeriodSec(long handle);

@ -715,31 +715,6 @@ public interface DBOptionsInterface {
*/ */
boolean isFdCloseOnExec(); boolean isFdCloseOnExec();
/**
* Skip log corruption error on recovery (If client is ok with
* losing most recent changes)
* Default: false
*
* @param skip true if log corruption errors are skipped during recovery.
* @return the instance of the current Object.
*
* @deprecated will be removed in RocksDB 3.11.0. Not used anymore.
*/
@Deprecated
Object setSkipLogErrorOnRecovery(boolean skip);
/**
* Skip log corruption error on recovery (If client is ok with
* losing most recent changes)
* Default: false
*
* @return true if log corruption errors are skipped during recovery.
*
* @deprecated will be removed in RocksDB 3.11.0. Not used anymore.
*/
@Deprecated
boolean skipLogErrorOnRecovery();
/** /**
* if not zero, dump rocksdb.stats to LOG every stats_dump_period_sec * if not zero, dump rocksdb.stats to LOG every stats_dump_period_sec
* Default: 3600 (1 hour) * Default: 3600 (1 hour)

@ -556,21 +556,6 @@ public class Options extends RocksObject
return this; return this;
} }
@Override
@Deprecated
public boolean skipLogErrorOnRecovery() {
assert(isInitialized());
return skipLogErrorOnRecovery(nativeHandle_);
}
@Override
@Deprecated
public Options setSkipLogErrorOnRecovery(final boolean skip) {
assert(isInitialized());
setSkipLogErrorOnRecovery(nativeHandle_, skip);
return this;
}
@Override @Override
public int statsDumpPeriodSec() { public int statsDumpPeriodSec() {
assert(isInitialized()); assert(isInitialized());
@ -1189,9 +1174,6 @@ public class Options extends RocksObject
private native void setIsFdCloseOnExec( private native void setIsFdCloseOnExec(
long handle, boolean isFdCloseOnExec); long handle, boolean isFdCloseOnExec);
private native boolean isFdCloseOnExec(long handle); private native boolean isFdCloseOnExec(long handle);
private native void setSkipLogErrorOnRecovery(
long handle, boolean skip);
private native boolean skipLogErrorOnRecovery(long handle);
private native void setStatsDumpPeriodSec( private native void setStatsDumpPeriodSec(
long handle, int statsDumpPeriodSec); long handle, int statsDumpPeriodSec);
private native int statsDumpPeriodSec(long handle); private native int statsDumpPeriodSec(long handle);

@ -473,21 +473,6 @@ public class DBOptionsTest {
} }
} }
@Test
public void skipLogErrorOnRecovery() {
DBOptions opt = null;
try {
opt = new DBOptions();
boolean boolValue = rand.nextBoolean();
opt.setSkipLogErrorOnRecovery(boolValue);
assertThat(opt.skipLogErrorOnRecovery()).isEqualTo(boolValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
@Test @Test
public void statsDumpPeriodSec() { public void statsDumpPeriodSec() {
DBOptions opt = null; DBOptions opt = null;

@ -920,21 +920,6 @@ public class OptionsTest {
} }
} }
@Test
public void skipLogErrorOnRecovery() {
Options opt = null;
try {
opt = new Options();
boolean boolValue = rand.nextBoolean();
opt.setSkipLogErrorOnRecovery(boolValue);
assertThat(opt.skipLogErrorOnRecovery()).isEqualTo(boolValue);
} finally {
if (opt != null) {
opt.dispose();
}
}
}
@Test @Test
public void statsDumpPeriodSec() { public void statsDumpPeriodSec() {
Options opt = null; Options opt = null;

Loading…
Cancel
Save