public boolean isCounter() { return cfm.isCounter(); }
private Row maybeMarkLocalToBeCleared(Row row) { return metadata.isCounter() ? row.markCounterLocalToBeCleared() : row; }
public boolean isCounterCacheEnabled() { return metadata.isCounter() && CacheService.instance.counterCache.getCapacity() > 0; }
public boolean isCounterCacheEnabled() { return metadata.isCounter() && CacheService.instance.counterCache.getCapacity() > 0; }
public AbstractType<?> makeLegacyDefaultValidator() { return isCounter() ? CounterColumnType.instance : (isCompactTable() ? compactValueColumn().type : BytesType.instance); }
public void serialize(CounterCacheKey key, DataOutputPlus out, ColumnFamilyStore cfs) throws IOException { assert(cfs.metadata.isCounter()); out.write(cfs.metadata.ksAndCFBytes); ByteBufferUtil.writeWithLength(key.partitionKey, out); ByteBufferUtil.writeWithLength(key.cellName, out); }
public Unfiltered next() { // Note that in practice we know that IOException will be thrown by hasNext(), because that's // where the actual reading happens, so we don't bother catching RuntimeException here (contrarily // to what we do in hasNext) Unfiltered unfiltered = iterator.next(); return metadata.isCounter() && unfiltered.kind() == Unfiltered.Kind.ROW ? maybeMarkLocalToBeCleared((Row) unfiltered) : unfiltered; }
public void serialize(CounterCacheKey key, DataOutputPlus out, ColumnFamilyStore cfs) throws IOException { assert(cfs.metadata.isCounter()); out.write(cfs.metadata.ksAndCFBytes); ByteBufferUtil.writeWithLength(key.partitionKey, out); ByteBufferUtil.writeWithLength(key.cellName, out); }
public void serialize(CounterCacheKey key, DataOutputPlus out, ColumnFamilyStore cfs) throws IOException { assert(cfs.metadata.isCounter()); out.write(cfs.metadata.ksAndCFBytes); ByteBufferUtil.writeWithLength(key.partitionKey, out); ByteBufferUtil.writeWithLength(key.cellName, out); }
private void invalidateCaches() { CacheService.instance.invalidateKeyCacheForCf(metadata.ksAndCFName); CacheService.instance.invalidateRowCacheForCf(metadata.ksAndCFName); if (metadata.isCounter()) CacheService.instance.invalidateCounterCacheForCf(metadata.ksAndCFName); }
private void invalidateCaches() { CacheService.instance.invalidateKeyCacheForCf(metadata.ksAndCFName); CacheService.instance.invalidateRowCacheForCf(metadata.ksAndCFName); if (metadata.isCounter()) CacheService.instance.invalidateCounterCacheForCf(metadata.ksAndCFName); }
public Unfiltered next() { // Note that in practice we know that IOException will be thrown by hasNext(), because that's // where the actual reading happens, so we don't bother catching RuntimeException here (contrarily // to what we do in hasNext) Unfiltered unfiltered = iterator.next(); return metadata.isCounter() && unfiltered.kind() == Unfiltered.Kind.ROW ? maybeMarkLocalToBeCleared((Row) unfiltered) : unfiltered; }
private void invalidateCaches() { CacheService.instance.invalidateKeyCacheForCf(metadata.ksAndCFName); CacheService.instance.invalidateRowCacheForCf(metadata.ksAndCFName); if (metadata.isCounter()) CacheService.instance.invalidateCounterCacheForCf(metadata.ksAndCFName); }
public void serialize(CounterCacheKey key, DataOutputPlus out, ColumnFamilyStore cfs) throws IOException { assert(cfs.metadata.isCounter()); out.write(cfs.metadata.ksAndCFBytes); ByteBufferUtil.writeWithLength(key.partitionKey, out); ByteBufferUtil.writeWithLength(key.cellName, out); }
private void invalidateCaches() { CacheService.instance.invalidateKeyCacheForCf(metadata.ksAndCFName); CacheService.instance.invalidateRowCacheForCf(metadata.ksAndCFName); if (metadata.isCounter()) CacheService.instance.invalidateCounterCacheForCf(metadata.ksAndCFName); }
public Unfiltered next() { // Note that in practice we know that IOException will be thrown by hasNext(), because that's // where the actual reading happens, so we don't bother catching RuntimeException here (contrarily // to what we do in hasNext) Unfiltered unfiltered = iterator.next(); return metadata.isCounter() && unfiltered.kind() == Unfiltered.Kind.ROW ? maybeMarkLocalToBeCleared((Row) unfiltered) : unfiltered; }
public void addColumn(CellName name, ByteBuffer value, long timestamp, int timeToLive) { assert !metadata().isCounter(); Cell cell = AbstractCell.create(name, value, timestamp, timeToLive, metadata()); addColumn(cell); }
public AbstractType<?> makeLegacyDefaultValidator() { if (isCounter()) return CounterColumnType.instance; else if (isCompactTable()) return isSuper() ? ((MapType)compactValueColumn().type).valueComparator() : compactValueColumn().type; else return BytesType.instance; }
public AbstractType<?> makeLegacyDefaultValidator() { if (isCounter()) return CounterColumnType.instance; else if (isCompactTable()) return isSuper() ? ((MapType)compactValueColumn().type).valueComparator() : compactValueColumn().type; else return BytesType.instance; }
public AbstractType<?> makeLegacyDefaultValidator() { if (isCounter()) return CounterColumnType.instance; else if (isCompactTable()) return isSuper() ? ((MapType)compactValueColumn().type).valueComparator() : compactValueColumn().type; else return BytesType.instance; }