mirror of https://github.com/apache/cassandra
r/m memtable_flush_after_mins
patch by Patricio Echague; reviewed by jbellis for CASSANDRA-2427 git-svn-id: https://svn.apache.org/repos/asf/cassandra/trunk@1134504 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9ae39872f2
commit
e1a1ec5dbe
|
|
@ -149,6 +149,11 @@ concurrent_writes: 32
|
|||
# If set to 0, only the old flush thresholds are used.
|
||||
# memtable_total_space_in_mb: 2048
|
||||
|
||||
# Total space to use for commitlogs.
|
||||
# if space gets above this value, Cassandra will flush every dirty CF
|
||||
# in the oldest segment and remove it.
|
||||
# commitlog_total_space_in_mb: 4096
|
||||
|
||||
# This sets the amount of memtable flush writer threads. These will
|
||||
# be blocked by disk io, and each one will hold a memtable in memory
|
||||
# while blocked. If you have a large heap and many data directories,
|
||||
|
|
|
|||
|
|
@ -334,5 +334,21 @@ public class AuthenticationException extends Exception implements org.apache.thr
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -379,5 +379,21 @@ public class AuthenticationRequest implements org.apache.thrift.TBase<Authentica
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -334,5 +334,21 @@ public class AuthorizationException extends Exception implements org.apache.thri
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -2856,5 +2856,23 @@ public class CfDef implements org.apache.thrift.TBase<CfDef, CfDef._Fields>, jav
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -639,5 +639,23 @@ public class Column implements org.apache.thrift.TBase<Column, Column._Fields>,
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -647,5 +647,21 @@ public class ColumnDef implements org.apache.thrift.TBase<ColumnDef, ColumnDef._
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -632,5 +632,21 @@ public class ColumnOrSuperColumn implements org.apache.thrift.TBase<ColumnOrSupe
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -444,5 +444,21 @@ public class ColumnParent implements org.apache.thrift.TBase<ColumnParent, Colum
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -555,5 +555,21 @@ public class ColumnPath implements org.apache.thrift.TBase<ColumnPath, ColumnPat
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -438,5 +438,23 @@ public class CounterColumn implements org.apache.thrift.TBase<CounterColumn, Cou
|
|||
// alas, we cannot check 'value' because it's a primitive and you chose the non-beans generator.
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -477,5 +477,21 @@ public class CounterSuperColumn implements org.apache.thrift.TBase<CounterSuperC
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -574,5 +574,23 @@ public class CqlResult implements org.apache.thrift.TBase<CqlResult, CqlResult._
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -480,5 +480,21 @@ public class CqlRow implements org.apache.thrift.TBase<CqlRow, CqlRow._Fields>,
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -529,5 +529,23 @@ public class Deletion implements org.apache.thrift.TBase<Deletion, Deletion._Fie
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -575,5 +575,23 @@ public class IndexClause implements org.apache.thrift.TBase<IndexClause, IndexCl
|
|||
// alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -563,5 +563,21 @@ public class IndexExpression implements org.apache.thrift.TBase<IndexExpression,
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -335,5 +335,21 @@ public class InvalidRequestException extends Exception implements org.apache.thr
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -438,5 +438,23 @@ public class KeyCount implements org.apache.thrift.TBase<KeyCount, KeyCount._Fie
|
|||
// alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -746,5 +746,23 @@ public class KeyRange implements org.apache.thrift.TBase<KeyRange, KeyRange._Fie
|
|||
// alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -484,5 +484,21 @@ public class KeySlice implements org.apache.thrift.TBase<KeySlice, KeySlice._Fie
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -901,5 +901,23 @@ public class KsDef implements org.apache.thrift.TBase<KsDef, KsDef._Fields>, jav
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -428,5 +428,21 @@ public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fie
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,5 +231,21 @@ public class NotFoundException extends Exception implements org.apache.thrift.TB
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,5 +231,21 @@ public class SchemaDisagreementException extends Exception implements org.apache
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -473,5 +473,21 @@ public class SlicePredicate implements org.apache.thrift.TBase<SlicePredicate, S
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -659,5 +659,23 @@ public class SliceRange implements org.apache.thrift.TBase<SliceRange, SliceRang
|
|||
// alas, we cannot check 'count' because it's a primitive and you chose the non-beans generator.
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
|
||||
__isset_bit_vector = new BitSet(1);
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -483,5 +483,21 @@ public class SuperColumn implements org.apache.thrift.TBase<SuperColumn, SuperCo
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,5 +231,21 @@ public class TimedOutException extends Exception implements org.apache.thrift.TB
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -562,5 +562,21 @@ public class TokenRange implements org.apache.thrift.TBase<TokenRange, TokenRang
|
|||
}
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,5 +231,21 @@ public class UnavailableException extends Exception implements org.apache.thrift
|
|||
// check for required fields
|
||||
}
|
||||
|
||||
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
|
||||
try {
|
||||
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||
try {
|
||||
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
|
||||
} catch (org.apache.thrift.TException te) {
|
||||
throw new java.io.IOException(te);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ protocol InterNode {
|
|||
union { null, int } max_compaction_threshold = null;
|
||||
union { int, null } row_cache_save_period_in_seconds = 0;
|
||||
union { int, null } key_cache_save_period_in_seconds = 3600;
|
||||
union { int, null } memtable_flush_after_mins = 60;
|
||||
union { null, int } memtable_throughput_in_mb = null;
|
||||
union { null, double} memtable_operations_in_millions = null;
|
||||
union { null, double} merge_shards_chance = null;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ public class CliClient
|
|||
COLUMN_METADATA,
|
||||
MEMTABLE_OPERATIONS,
|
||||
MEMTABLE_THROUGHPUT,
|
||||
MEMTABLE_FLUSH_AFTER,
|
||||
DEFAULT_VALIDATION_CLASS,
|
||||
MIN_COMPACTION_THRESHOLD,
|
||||
MAX_COMPACTION_THRESHOLD,
|
||||
|
|
@ -1183,9 +1182,6 @@ public class CliClient
|
|||
case MEMTABLE_OPERATIONS:
|
||||
cfDef.setMemtable_operations_in_millions(Double.parseDouble(mValue));
|
||||
break;
|
||||
case MEMTABLE_FLUSH_AFTER:
|
||||
cfDef.setMemtable_flush_after_mins(Integer.parseInt(mValue));
|
||||
break;
|
||||
case MEMTABLE_THROUGHPUT:
|
||||
cfDef.setMemtable_throughput_in_mb(Integer.parseInt(mValue));
|
||||
break;
|
||||
|
|
@ -1679,8 +1675,8 @@ public class CliClient
|
|||
sessionState.out.printf(" Columns sorted by: %s%s%n", cf_def.comparator_type, cf_def.column_type.equals("Super") ? "/" + cf_def.subcomparator_type : "");
|
||||
sessionState.out.printf(" Row cache size / save period in seconds: %s/%s%n", cf_def.row_cache_size, cf_def.row_cache_save_period_in_seconds);
|
||||
sessionState.out.printf(" Key cache size / save period in seconds: %s/%s%n", cf_def.key_cache_size, cf_def.key_cache_save_period_in_seconds);
|
||||
sessionState.out.printf(" Memtable thresholds: %s/%s/%s (millions of ops/MB/minutes)%n",
|
||||
cf_def.memtable_operations_in_millions, cf_def.memtable_throughput_in_mb, cf_def.memtable_flush_after_mins);
|
||||
sessionState.out.printf(" Memtable thresholds: %s/%s (millions of ops/MB)%n",
|
||||
cf_def.memtable_operations_in_millions, cf_def.memtable_throughput_in_mb);
|
||||
sessionState.out.printf(" GC grace seconds: %s%n", cf_def.gc_grace_seconds);
|
||||
sessionState.out.printf(" Compaction min/max thresholds: %s/%s%n", cf_def.min_compaction_threshold, cf_def.max_compaction_threshold);
|
||||
sessionState.out.printf(" Read repair chance: %s%n", cf_def.read_repair_chance);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ public final class CFMetaData
|
|||
public final static int DEFAULT_GC_GRACE_SECONDS = 864000;
|
||||
public final static int DEFAULT_MIN_COMPACTION_THRESHOLD = 4;
|
||||
public final static int DEFAULT_MAX_COMPACTION_THRESHOLD = 32;
|
||||
public final static int DEFAULT_MEMTABLE_LIFETIME_IN_MINS = 60 * 24;
|
||||
public final static int DEFAULT_MEMTABLE_THROUGHPUT_IN_MB = sizeMemtableThroughput();
|
||||
public final static double DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS = sizeMemtableOperations(DEFAULT_MEMTABLE_THROUGHPUT_IN_MB);
|
||||
public final static double DEFAULT_MERGE_SHARDS_CHANCE = 0.1;
|
||||
|
|
@ -162,7 +161,6 @@ public final class CFMetaData
|
|||
private int maxCompactionThreshold; // default 32
|
||||
private int rowCacheSavePeriodInSeconds; // default 0 (off)
|
||||
private int keyCacheSavePeriodInSeconds; // default 3600 (1 hour)
|
||||
private int memtableFlushAfterMins; // default 60
|
||||
private int memtableThroughputInMb; // default based on heap size
|
||||
private double memtableOperationsInMillions; // default based on throughput
|
||||
private double mergeShardsChance; // default 0.1, chance [0.0, 1.0] of merging old shards during replication
|
||||
|
|
@ -185,7 +183,6 @@ public final class CFMetaData
|
|||
public CFMetaData maxCompactionThreshold(int prop) {maxCompactionThreshold = prop; return this;}
|
||||
public CFMetaData rowCacheSavePeriod(int prop) {rowCacheSavePeriodInSeconds = prop; return this;}
|
||||
public CFMetaData keyCacheSavePeriod(int prop) {keyCacheSavePeriodInSeconds = prop; return this;}
|
||||
public CFMetaData memTime(int prop) {memtableFlushAfterMins = prop; return this;}
|
||||
public CFMetaData memSize(int prop) {memtableThroughputInMb = prop; return this;}
|
||||
public CFMetaData memOps(double prop) {memtableOperationsInMillions = prop; return this;}
|
||||
public CFMetaData mergeShardsChance(double prop) {mergeShardsChance = prop; return this;}
|
||||
|
|
@ -236,7 +233,6 @@ public final class CFMetaData
|
|||
gcGraceSeconds = DEFAULT_GC_GRACE_SECONDS;
|
||||
minCompactionThreshold = DEFAULT_MIN_COMPACTION_THRESHOLD;
|
||||
maxCompactionThreshold = DEFAULT_MAX_COMPACTION_THRESHOLD;
|
||||
memtableFlushAfterMins = DEFAULT_MEMTABLE_LIFETIME_IN_MINS;
|
||||
memtableThroughputInMb = DEFAULT_MEMTABLE_THROUGHPUT_IN_MB;
|
||||
memtableOperationsInMillions = DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS;
|
||||
mergeShardsChance = DEFAULT_MERGE_SHARDS_CHANCE;
|
||||
|
|
@ -291,7 +287,6 @@ public final class CFMetaData
|
|||
.gcGraceSeconds(parent.gcGraceSeconds)
|
||||
.minCompactionThreshold(parent.minCompactionThreshold)
|
||||
.maxCompactionThreshold(parent.maxCompactionThreshold)
|
||||
.memTime(parent.memtableFlushAfterMins)
|
||||
.memSize(parent.memtableThroughputInMb)
|
||||
.memOps(parent.memtableOperationsInMillions);
|
||||
}
|
||||
|
|
@ -321,7 +316,6 @@ public final class CFMetaData
|
|||
.maxCompactionThreshold(oldCFMD.maxCompactionThreshold)
|
||||
.rowCacheSavePeriod(oldCFMD.rowCacheSavePeriodInSeconds)
|
||||
.keyCacheSavePeriod(oldCFMD.keyCacheSavePeriodInSeconds)
|
||||
.memTime(oldCFMD.memtableFlushAfterMins)
|
||||
.memSize(oldCFMD.memtableThroughputInMb)
|
||||
.memOps(oldCFMD.memtableOperationsInMillions)
|
||||
.columnMetadata(oldCFMD.column_metadata)
|
||||
|
|
@ -371,7 +365,6 @@ public final class CFMetaData
|
|||
cf.max_compaction_threshold = maxCompactionThreshold;
|
||||
cf.row_cache_save_period_in_seconds = rowCacheSavePeriodInSeconds;
|
||||
cf.key_cache_save_period_in_seconds = keyCacheSavePeriodInSeconds;
|
||||
cf.memtable_flush_after_mins = memtableFlushAfterMins;
|
||||
cf.memtable_throughput_in_mb = memtableThroughputInMb;
|
||||
cf.memtable_operations_in_millions = memtableOperationsInMillions;
|
||||
cf.merge_shards_chance = mergeShardsChance;
|
||||
|
|
@ -434,7 +427,6 @@ public final class CFMetaData
|
|||
if (cf.max_compaction_threshold != null) { newCFMD.maxCompactionThreshold(cf.max_compaction_threshold); }
|
||||
if (cf.row_cache_save_period_in_seconds != null) { newCFMD.rowCacheSavePeriod(cf.row_cache_save_period_in_seconds); }
|
||||
if (cf.key_cache_save_period_in_seconds != null) { newCFMD.keyCacheSavePeriod(cf.key_cache_save_period_in_seconds); }
|
||||
if (cf.memtable_flush_after_mins != null) { newCFMD.memTime(cf.memtable_flush_after_mins); }
|
||||
if (cf.memtable_throughput_in_mb != null) { newCFMD.memSize(cf.memtable_throughput_in_mb); }
|
||||
if (cf.memtable_operations_in_millions != null) { newCFMD.memOps(cf.memtable_operations_in_millions); }
|
||||
if (cf.merge_shards_chance != null) { newCFMD.mergeShardsChance(cf.merge_shards_chance); }
|
||||
|
|
@ -543,11 +535,6 @@ public final class CFMetaData
|
|||
return keyCacheSavePeriodInSeconds;
|
||||
}
|
||||
|
||||
public int getMemtableFlushAfterMins()
|
||||
{
|
||||
return memtableFlushAfterMins;
|
||||
}
|
||||
|
||||
public int getMemtableThroughputInMb()
|
||||
{
|
||||
return memtableThroughputInMb;
|
||||
|
|
@ -610,7 +597,6 @@ public final class CFMetaData
|
|||
.append(column_metadata, rhs.column_metadata)
|
||||
.append(rowCacheSavePeriodInSeconds, rhs.rowCacheSavePeriodInSeconds)
|
||||
.append(keyCacheSavePeriodInSeconds, rhs.keyCacheSavePeriodInSeconds)
|
||||
.append(memtableFlushAfterMins, rhs.memtableFlushAfterMins)
|
||||
.append(memtableThroughputInMb, rhs.memtableThroughputInMb)
|
||||
.append(memtableOperationsInMillions, rhs.memtableOperationsInMillions)
|
||||
.append(mergeShardsChance, rhs.mergeShardsChance)
|
||||
|
|
@ -642,7 +628,6 @@ public final class CFMetaData
|
|||
.append(column_metadata)
|
||||
.append(rowCacheSavePeriodInSeconds)
|
||||
.append(keyCacheSavePeriodInSeconds)
|
||||
.append(memtableFlushAfterMins)
|
||||
.append(memtableThroughputInMb)
|
||||
.append(memtableOperationsInMillions)
|
||||
.append(mergeShardsChance)
|
||||
|
|
@ -679,8 +664,6 @@ public final class CFMetaData
|
|||
cf_def.setRow_cache_save_period_in_seconds(CFMetaData.DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS);
|
||||
if (!cf_def.isSetKey_cache_save_period_in_seconds())
|
||||
cf_def.setKey_cache_save_period_in_seconds(CFMetaData.DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS);
|
||||
if (!cf_def.isSetMemtable_flush_after_mins())
|
||||
cf_def.setMemtable_flush_after_mins(CFMetaData.DEFAULT_MEMTABLE_LIFETIME_IN_MINS);
|
||||
if (!cf_def.isSetMemtable_throughput_in_mb())
|
||||
cf_def.setMemtable_throughput_in_mb(CFMetaData.DEFAULT_MEMTABLE_THROUGHPUT_IN_MB);
|
||||
if (!cf_def.isSetMemtable_operations_in_millions())
|
||||
|
|
@ -716,7 +699,6 @@ public final class CFMetaData
|
|||
if (cf_def.isSetMax_compaction_threshold()) { newCFMD.maxCompactionThreshold(cf_def.max_compaction_threshold); }
|
||||
if (cf_def.isSetRow_cache_save_period_in_seconds()) { newCFMD.rowCacheSavePeriod(cf_def.row_cache_save_period_in_seconds); }
|
||||
if (cf_def.isSetKey_cache_save_period_in_seconds()) { newCFMD.keyCacheSavePeriod(cf_def.key_cache_save_period_in_seconds); }
|
||||
if (cf_def.isSetMemtable_flush_after_mins()) { newCFMD.memTime(cf_def.memtable_flush_after_mins); }
|
||||
if (cf_def.isSetMemtable_throughput_in_mb()) { newCFMD.memSize(cf_def.memtable_throughput_in_mb); }
|
||||
if (cf_def.isSetMemtable_operations_in_millions()) { newCFMD.memOps(cf_def.memtable_operations_in_millions); }
|
||||
if (cf_def.isSetMerge_shards_chance()) { newCFMD.mergeShardsChance(cf_def.merge_shards_chance); }
|
||||
|
|
@ -776,7 +758,6 @@ public final class CFMetaData
|
|||
maxCompactionThreshold = cf_def.max_compaction_threshold;
|
||||
rowCacheSavePeriodInSeconds = cf_def.row_cache_save_period_in_seconds;
|
||||
keyCacheSavePeriodInSeconds = cf_def.key_cache_save_period_in_seconds;
|
||||
memtableFlushAfterMins = cf_def.memtable_flush_after_mins;
|
||||
memtableThroughputInMb = cf_def.memtable_throughput_in_mb;
|
||||
memtableOperationsInMillions = cf_def.memtable_operations_in_millions;
|
||||
mergeShardsChance = cf_def.merge_shards_chance;
|
||||
|
|
@ -895,7 +876,6 @@ public final class CFMetaData
|
|||
def.setMax_compaction_threshold(cfm.maxCompactionThreshold);
|
||||
def.setRow_cache_save_period_in_seconds(cfm.rowCacheSavePeriodInSeconds);
|
||||
def.setKey_cache_save_period_in_seconds(cfm.keyCacheSavePeriodInSeconds);
|
||||
def.setMemtable_flush_after_mins(cfm.memtableFlushAfterMins);
|
||||
def.setMemtable_throughput_in_mb(cfm.memtableThroughputInMb);
|
||||
def.setMemtable_operations_in_millions(cfm.memtableOperationsInMillions);
|
||||
def.setMerge_shards_chance(cfm.mergeShardsChance);
|
||||
|
|
@ -942,7 +922,6 @@ public final class CFMetaData
|
|||
def.max_compaction_threshold = cfm.maxCompactionThreshold;
|
||||
def.row_cache_save_period_in_seconds = cfm.rowCacheSavePeriodInSeconds;
|
||||
def.key_cache_save_period_in_seconds = cfm.keyCacheSavePeriodInSeconds;
|
||||
def.memtable_flush_after_mins = cfm.memtableFlushAfterMins;
|
||||
def.memtable_throughput_in_mb = cfm.memtableThroughputInMb;
|
||||
def.memtable_operations_in_millions = cfm.memtableOperationsInMillions;
|
||||
def.merge_shards_chance = cfm.mergeShardsChance;
|
||||
|
|
@ -982,7 +961,6 @@ public final class CFMetaData
|
|||
newDef.key_cache_save_period_in_seconds = def.getKey_cache_save_period_in_seconds();
|
||||
newDef.key_cache_size = def.getKey_cache_size();
|
||||
newDef.max_compaction_threshold = def.getMax_compaction_threshold();
|
||||
newDef.memtable_flush_after_mins = def.getMemtable_flush_after_mins();
|
||||
newDef.memtable_operations_in_millions = def.getMemtable_operations_in_millions();
|
||||
newDef.memtable_throughput_in_mb = def.getMemtable_throughput_in_mb();
|
||||
newDef.min_compaction_threshold = def.getMin_compaction_threshold();
|
||||
|
|
@ -1052,8 +1030,6 @@ public final class CFMetaData
|
|||
|
||||
public static void validateMemtableSettings(org.apache.cassandra.db.migration.avro.CfDef cf_def) throws ConfigurationException
|
||||
{
|
||||
if (cf_def.memtable_flush_after_mins != null)
|
||||
DatabaseDescriptor.validateMemtableFlushPeriod(cf_def.memtable_flush_after_mins);
|
||||
if (cf_def.memtable_throughput_in_mb != null)
|
||||
DatabaseDescriptor.validateMemtableThroughput(cf_def.memtable_throughput_in_mb);
|
||||
if (cf_def.memtable_operations_in_millions != null)
|
||||
|
|
@ -1118,7 +1094,6 @@ public final class CFMetaData
|
|||
.append("maxCompactionThreshold", maxCompactionThreshold)
|
||||
.append("rowCacheSavePeriodInSeconds", rowCacheSavePeriodInSeconds)
|
||||
.append("keyCacheSavePeriodInSeconds", keyCacheSavePeriodInSeconds)
|
||||
.append("memtableFlushAfterMins", memtableFlushAfterMins)
|
||||
.append("memtableThroughputInMb", memtableThroughputInMb)
|
||||
.append("memtableOperationsInMillions", memtableOperationsInMillions)
|
||||
.append("mergeShardsChance", mergeShardsChance)
|
||||
|
|
|
|||
|
|
@ -1059,12 +1059,6 @@ public class DatabaseDescriptor
|
|||
throw new ConfigurationException("memtable_operations_in_millions must be less than " + Long.MAX_VALUE / 1024 * 1024);
|
||||
}
|
||||
|
||||
public static void validateMemtableFlushPeriod(int minutes) throws ConfigurationException
|
||||
{
|
||||
if (minutes <= 0)
|
||||
throw new ConfigurationException("memtable_flush_after_mins must be greater than 0.");
|
||||
}
|
||||
|
||||
public static boolean incrementalBackupsEnabled()
|
||||
{
|
||||
return conf.incremental_backups;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public class CreateColumnFamilyStatement
|
|||
private static final String KW_MAXCOMPACTIONTHRESHOLD = "max_compaction_threshold";
|
||||
private static final String KW_ROWCACHESAVEPERIODSECS = "row_cache_save_period_in_seconds";
|
||||
private static final String KW_KEYCACHESAVEPERIODSECS = "key_cache_save_period_in_seconds";
|
||||
private static final String KW_MEMTABLEFLUSHINMINS = "memtable_flush_after_mins";
|
||||
private static final String KW_MEMTABLESIZEINMB = "memtable_throughput_in_mb";
|
||||
private static final String KW_MEMTABLEOPSINMILLIONS = "memtable_operations_in_millions";
|
||||
private static final String KW_REPLICATEONWRITE = "replicate_on_write";
|
||||
|
|
@ -84,7 +83,6 @@ public class CreateColumnFamilyStatement
|
|||
keywords.add(KW_MAXCOMPACTIONTHRESHOLD);
|
||||
keywords.add(KW_ROWCACHESAVEPERIODSECS);
|
||||
keywords.add(KW_KEYCACHESAVEPERIODSECS);
|
||||
keywords.add(KW_MEMTABLEFLUSHINMINS);
|
||||
keywords.add(KW_MEMTABLESIZEINMB);
|
||||
keywords.add(KW_MEMTABLEOPSINMILLIONS);
|
||||
keywords.add(KW_REPLICATEONWRITE);
|
||||
|
|
@ -144,13 +142,9 @@ public class CreateColumnFamilyStatement
|
|||
}
|
||||
|
||||
// Validate memtable settings
|
||||
Integer memMins = getPropertyInt(KW_MEMTABLEFLUSHINMINS, null);
|
||||
Integer memMb = getPropertyInt(KW_MEMTABLESIZEINMB, null);
|
||||
Double memOps = getPropertyDouble(KW_MEMTABLEOPSINMILLIONS, null);
|
||||
|
||||
if ((memMins != null) && (memMins <= 0))
|
||||
throw new InvalidRequestException(String.format("%s must be non-negative and greater than zero",
|
||||
KW_MEMTABLEFLUSHINMINS));
|
||||
|
||||
if ((memMb != null) && (memMb <= 0))
|
||||
throw new InvalidRequestException(String.format("%s must be non-negative and greater than zero",
|
||||
KW_MEMTABLESIZEINMB));
|
||||
|
|
@ -262,7 +256,6 @@ public class CreateColumnFamilyStatement
|
|||
.maxCompactionThreshold(getPropertyInt(KW_MAXCOMPACTIONTHRESHOLD, CFMetaData.DEFAULT_MAX_COMPACTION_THRESHOLD))
|
||||
.rowCacheSavePeriod(getPropertyInt(KW_ROWCACHESAVEPERIODSECS, CFMetaData.DEFAULT_ROW_CACHE_SAVE_PERIOD_IN_SECONDS))
|
||||
.keyCacheSavePeriod(getPropertyInt(KW_KEYCACHESAVEPERIODSECS, CFMetaData.DEFAULT_KEY_CACHE_SAVE_PERIOD_IN_SECONDS))
|
||||
.memTime(getPropertyInt(KW_MEMTABLEFLUSHINMINS, CFMetaData.DEFAULT_MEMTABLE_LIFETIME_IN_MINS))
|
||||
.memSize(getPropertyInt(KW_MEMTABLESIZEINMB, CFMetaData.DEFAULT_MEMTABLE_THROUGHPUT_IN_MB))
|
||||
.memOps(getPropertyDouble(KW_MEMTABLEOPSINMILLIONS, CFMetaData.DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS))
|
||||
.mergeShardsChance(0.0)
|
||||
|
|
|
|||
|
|
@ -153,7 +153,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
private volatile DefaultInteger minCompactionThreshold;
|
||||
private volatile DefaultInteger maxCompactionThreshold;
|
||||
private volatile AbstractCompactionStrategy compactionStrategy;
|
||||
private volatile DefaultInteger memtime;
|
||||
private volatile DefaultInteger memsize;
|
||||
private volatile DefaultDouble memops;
|
||||
private volatile DefaultInteger rowCacheSaveInSeconds;
|
||||
|
|
@ -201,9 +200,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
if (!maxCompactionThreshold.isModified())
|
||||
for (ColumnFamilyStore cfs : concatWithIndexes())
|
||||
cfs.maxCompactionThreshold = new DefaultInteger(metadata.getMaxCompactionThreshold());
|
||||
if (!memtime.isModified())
|
||||
for (ColumnFamilyStore cfs : concatWithIndexes())
|
||||
cfs.memtime = new DefaultInteger(metadata.getMemtableFlushAfterMins());
|
||||
if (!memsize.isModified())
|
||||
for (ColumnFamilyStore cfs : concatWithIndexes())
|
||||
cfs.memsize = new DefaultInteger(metadata.getMemtableThroughputInMb());
|
||||
|
|
@ -254,7 +250,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
this.minCompactionThreshold = new DefaultInteger(metadata.getMinCompactionThreshold());
|
||||
this.maxCompactionThreshold = new DefaultInteger(metadata.getMaxCompactionThreshold());
|
||||
this.compactionStrategy = metadata.createCompactionStrategyInstance(this);
|
||||
this.memtime = new DefaultInteger(metadata.getMemtableFlushAfterMins());
|
||||
this.memsize = new DefaultInteger(metadata.getMemtableThroughputInMb());
|
||||
this.memops = new DefaultDouble(metadata.getMemtableOperationsInMillions());
|
||||
this.rowCacheSaveInSeconds = new DefaultInteger(metadata.getRowCacheSavePeriodInSeconds());
|
||||
|
|
@ -709,11 +704,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
binaryMemtable.get().put(key, buffer);
|
||||
}
|
||||
|
||||
public void forceFlushIfExpired()
|
||||
{
|
||||
if (getMemtableThreadSafe().isExpired())
|
||||
forceFlush();
|
||||
}
|
||||
|
||||
public Future<?> forceFlush()
|
||||
{
|
||||
|
|
@ -1967,19 +1957,6 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
|
|||
return getMinimumCompactionThreshold() <= 0 || getMaximumCompactionThreshold() <= 0;
|
||||
}
|
||||
|
||||
public int getMemtableFlushAfterMins()
|
||||
{
|
||||
return memtime.value();
|
||||
}
|
||||
public void setMemtableFlushAfterMins(int time)
|
||||
{
|
||||
if (time <= 0)
|
||||
{
|
||||
throw new RuntimeException("MemtableFlushAfterMins must be greater than 0.");
|
||||
}
|
||||
this.memtime.set(time);
|
||||
}
|
||||
|
||||
public int getMemtableThroughputInMB()
|
||||
{
|
||||
return memsize.value();
|
||||
|
|
|
|||
|
|
@ -209,9 +209,6 @@ public interface ColumnFamilyStoreMBean
|
|||
*/
|
||||
public void disableAutoCompaction();
|
||||
|
||||
public int getMemtableFlushAfterMins();
|
||||
public void setMemtableFlushAfterMins(int time);
|
||||
|
||||
public int getMemtableThroughputInMB();
|
||||
public void setMemtableThroughputInMB(int size) throws ConfigurationException;
|
||||
|
||||
|
|
|
|||
|
|
@ -395,8 +395,4 @@ public class Memtable implements Comparable<Memtable>, IFlushable
|
|||
columnFamilies.clear();
|
||||
}
|
||||
|
||||
public boolean isExpired()
|
||||
{
|
||||
return System.currentTimeMillis() > creationTime + cfs.getMemtableFlushAfterMins() * 60 * 1000L;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ import org.apache.cassandra.utils.ByteBufferUtil;
|
|||
import org.apache.cassandra.utils.NodeId;
|
||||
import org.cliffc.high_scale_lib.NonBlockingHashMap;
|
||||
|
||||
/**
|
||||
* It represents a Keyspace.
|
||||
*/
|
||||
public class Table
|
||||
{
|
||||
public static final String SYSTEM_TABLE = "system";
|
||||
|
|
@ -92,7 +95,6 @@ public class Table
|
|||
/* ColumnFamilyStore per column family */
|
||||
private final Map<Integer, ColumnFamilyStore> columnFamilyStores = new ConcurrentHashMap<Integer, ColumnFamilyStore>();
|
||||
private final Object[] indexLocks;
|
||||
private ScheduledFuture<?> flushTask;
|
||||
private volatile AbstractReplicationStrategy replicationStrategy;
|
||||
|
||||
public static Table open(String table)
|
||||
|
|
@ -127,7 +129,6 @@ public class Table
|
|||
Table t = instances.remove(table);
|
||||
if (t != null)
|
||||
{
|
||||
t.flushTask.cancel(false);
|
||||
for (ColumnFamilyStore cfs : t.getColumnFamilyStores())
|
||||
t.unloadCf(cfs);
|
||||
}
|
||||
|
|
@ -306,17 +307,6 @@ public class Table
|
|||
initCf(cfm.cfId, cfm.cfName);
|
||||
}
|
||||
|
||||
Runnable runnable = new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
for (ColumnFamilyStore cfs : columnFamilyStores.values())
|
||||
{
|
||||
cfs.forceFlushIfExpired();
|
||||
}
|
||||
}
|
||||
};
|
||||
flushTask = StorageService.tasks.scheduleWithFixedDelay(runnable, 10, 10, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
public void createReplicationStrategy(KSMetaData ksm) throws ConfigurationException
|
||||
|
|
|
|||
|
|
@ -677,8 +677,6 @@ public class ThriftValidation
|
|||
|
||||
public static void validateMemtableSettings(org.apache.cassandra.thrift.CfDef cf_def) throws ConfigurationException
|
||||
{
|
||||
if (cf_def.isSetMemtable_flush_after_mins())
|
||||
DatabaseDescriptor.validateMemtableFlushPeriod(cf_def.memtable_flush_after_mins);
|
||||
if (cf_def.isSetMemtable_throughput_in_mb())
|
||||
DatabaseDescriptor.validateMemtableThroughput(cf_def.memtable_throughput_in_mb);
|
||||
if (cf_def.isSetMemtable_operations_in_millions())
|
||||
|
|
|
|||
|
|
@ -441,15 +441,6 @@ commands:
|
|||
terms of I/O for the key cache. Row cache saving is much more expensive and
|
||||
has limited use.
|
||||
|
||||
- memtable_flush_after: Maximum number of minutes to leave a dirty
|
||||
memtable unflushed. This value needs to be large enough that it won't cause
|
||||
a flush storm of all your memtables flushing at once because none have
|
||||
hit the size or count thresholds yet. For production a larger value such
|
||||
as 1440 is recommended. Default is 60.
|
||||
|
||||
NOTE: While any affected column families have unflushed data from a commit
|
||||
log segment, that segment cannot be deleted.
|
||||
|
||||
- memtable_operations: Number of operations in millions before the memtable
|
||||
is flushed. Default is memtable_throughput / 64 * 0.3
|
||||
|
||||
|
|
@ -691,15 +682,6 @@ commands:
|
|||
terms of I/O for the key cache. Row cache saving is much more expensive and
|
||||
has limited use.
|
||||
|
||||
- memtable_flush_after: Maximum number of minutes to leave a dirty
|
||||
memtable unflushed. This value needs to be large enough that it won't cause
|
||||
a flush storm of all your memtables flushing at once because none have
|
||||
hit the size or count thresholds yet. For production a larger value such
|
||||
as 1440 is recommended. Default is 60.
|
||||
|
||||
NOTE: While any affected column families have unflushed data from a commit
|
||||
log segment, that segment cannot be deleted.
|
||||
|
||||
- memtable_operations: Number of operations in millions before the memtable
|
||||
is flushed. Default is memtable_throughput / 64 * 0.3
|
||||
|
||||
|
|
@ -709,6 +691,10 @@ commands:
|
|||
- read_repair_chance: Probability (0.0-1.0) with which to perform read
|
||||
repairs for any read operation. Default is 1.0 to enable read repair.
|
||||
|
||||
Note that disabling read repair entirely means that the dynamic snitch
|
||||
will not have any latency information from all the replicas to recognize
|
||||
when one is performing worse than usual.
|
||||
|
||||
- rows_cached: Maximum number of rows whose entire contents we
|
||||
cache in memory. Valid values are either a double between 0 and 1 (
|
||||
inclusive on both ends) denoting what fraction should be cached. Or an
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@ public class DefsTest extends CleanupHelper
|
|||
.maxCompactionThreshold(500)
|
||||
.rowCacheSavePeriod(500)
|
||||
.keyCacheSavePeriod(500)
|
||||
.memTime(500)
|
||||
.memSize(500)
|
||||
.memOps(500.0)
|
||||
.mergeShardsChance(0.0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue