Fix bug in UnScSigned-off-by: xh931076284 <931076284@qq.com> (#1336)
Fix HdfsEnv::UnSchedule() API error
This commit is contained in:
parent
c4ffd74608
commit
cba883c538
@ -106,7 +106,7 @@ class HdfsEnv : public Env {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual int UnSchedule(void* tag, Priority pri) {
|
virtual int UnSchedule(void* tag, Priority pri) {
|
||||||
posixEnv->UnSchedule(tag, pri);
|
return posixEnv->UnSchedule(tag, pri);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void StartThread(void (*function)(void* arg), void* arg) {
|
virtual void StartThread(void (*function)(void* arg), void* arg) {
|
||||||
|
@ -4371,6 +4371,20 @@ jlong Java_org_rocksdb_DBOptions_writeThreadSlowYieldUsec(
|
|||||||
write_thread_slow_yield_usec;
|
write_thread_slow_yield_usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Java_org_rocksdb_DBOptions_setDelayedWriteRate(
|
||||||
|
JNIEnv* env, jobject jobj, jlong jhandle, jlong delay_write_rate){
|
||||||
|
|
||||||
|
reinterpret_cast<rocksdb::DBOptions*>(jhandle)->
|
||||||
|
delayed_write_rate = static_cast<int64_t>(delay_write_rate);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
jlong Java_org_rocksdb_DBOptions_delayedWriteRate(
|
||||||
|
JNIEnv* env, jobject jobj, jlong jhandle){
|
||||||
|
|
||||||
|
return reinterpret_cast<rocksdb::DBOptions*>(jhandle)->
|
||||||
|
delayed_write_rate;
|
||||||
|
}
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// rocksdb::WriteOptions
|
// rocksdb::WriteOptions
|
||||||
|
|
||||||
|
@ -604,6 +604,17 @@ public class DBOptions extends RocksObject implements DBOptionsInterface {
|
|||||||
|
|
||||||
static final int DEFAULT_NUM_SHARD_BITS = -1;
|
static final int DEFAULT_NUM_SHARD_BITS = -1;
|
||||||
|
|
||||||
|
public DBOptions setDelayedWriteRate(final long delayedWriteRate){
|
||||||
|
assert(isOwningHandle());
|
||||||
|
setDelayedWriteRate(nativeHandle_, delayedWriteRate);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long delayedWriteRate(){
|
||||||
|
return delayedWriteRate(nativeHandle_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Private constructor to be used by
|
* <p>Private constructor to be used by
|
||||||
* {@link #getDBOptionsFromProps(java.util.Properties)}</p>
|
* {@link #getDBOptionsFromProps(java.util.Properties)}</p>
|
||||||
@ -725,6 +736,9 @@ public class DBOptions extends RocksObject implements DBOptionsInterface {
|
|||||||
long writeThreadSlowYieldUsec);
|
long writeThreadSlowYieldUsec);
|
||||||
private native long writeThreadSlowYieldUsec(long handle);
|
private native long writeThreadSlowYieldUsec(long handle);
|
||||||
|
|
||||||
|
private native void setDelayedWriteRate(long handle, long delayedWriteRate);
|
||||||
|
private native long delayedWriteRate(long handle);
|
||||||
|
|
||||||
int numShardBits_;
|
int numShardBits_;
|
||||||
RateLimiterConfig rateLimiterConfig_;
|
RateLimiterConfig rateLimiterConfig_;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user