Permalink
Browse files

Dial down logging

  • Loading branch information...
justinsb committed Dec 18, 2013
1 parent c27c747 commit d7400fb6de13d6dbb2d6321a6d9b69f6f5806b3e
@@ -6,7 +6,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.cloudata.util.Hex;
import com.google.common.base.Preconditions;
import com.google.common.base.Throwables;
import com.google.protobuf.ByteString;
@@ -74,7 +73,7 @@ public boolean contains(ByteBuffer buffer) {
}
for (int i = 0; i < keyspaceIdPrefix.size(); i++) {
if (buffer.get(buffer.position() + i) != keyspaceIdPrefix.byteAt(i)) {
log.debug("Mismatch: {} vs {}", Hex.forDebug(buffer), Hex.forDebug(keyspaceIdPrefix));
// log.debug("Mismatch: {} vs {}", Hex.forDebug(buffer), Hex.forDebug(keyspaceIdPrefix));
return false;
}
}
@@ -33,6 +33,8 @@
private static final int MASTERPAGE_SLOTS = 8;
private static final boolean DUMP_PAGES = false;
private MmapPageStore(MappedByteBuffer buffer, boolean uniqueKeys) {
this.buffer = buffer;
this.uniqueKeys = uniqueKeys;
@@ -156,11 +158,15 @@ public PageRecord fetchPage(Page parent, int pageNumber) {
throw new IllegalStateException();
}
log.info("Fetched page {}: {}", pageNumber, page);
if (log.isDebugEnabled()) {
log.debug("Fetched page {}: {}", pageNumber, page);
}
synchronized (System.out) {
page.dump(System.out);
System.out.flush();
if (DUMP_PAGES) {
synchronized (System.out) {
page.dump(System.out);
System.out.flush();
}
}
return new PageRecord(page, space);
@@ -34,7 +34,7 @@ public ByteBuffer getPageSlice() {
slice.position(offset + HEADER_SIZE);
slice.limit(offset + HEADER_SIZE + length);
log.info("Buffer: {} - {}", offset + HEADER_SIZE, offset + HEADER_SIZE + length);
// log.info("Buffer: {} - {}", offset + HEADER_SIZE, offset + HEADER_SIZE + length);
return slice.slice().asReadOnlyBuffer();
}

0 comments on commit d7400fb

Please sign in to comment.