Skip to content

Commit 4f89123

Browse files
author
Tom May
committed
Different Cassandra logging for easier cut and paste.
1 parent 4b38423 commit 4f89123

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

plugins/cassandra/src/main/java/org/elasticsearch/cassandra/blobstore/AbstractCassandraBlobContainer.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public AbstractCassandraBlobContainer(BlobPath path, CassandraBlobStore blobStor
7575
}
7676

7777
@Override public boolean blobExists(String blobName) {
78-
logger.debug("TODO blobExists blobKey={}", blobKey(blobName));
78+
logger.debug("TODO blobExists {}", blobKey(blobName));
7979
try {
8080
Cassandra.Client client =
8181
CassandraClientFactory.getCassandraClient();
@@ -95,7 +95,7 @@ public AbstractCassandraBlobContainer(BlobPath path, CassandraBlobStore blobStor
9595
}
9696

9797
@Override public boolean deleteBlob(String blobName) throws IOException {
98-
logger.debug("deleteBlob blobKey={}", blobKey(blobName));
98+
logger.debug("deleteBlob {}", blobKey(blobName));
9999
Cassandra.Client client =
100100
CassandraClientFactory.getCassandraClient();
101101
try {
@@ -142,7 +142,7 @@ public AbstractCassandraBlobContainer(BlobPath path, CassandraBlobStore blobStor
142142
}
143143

144144
@Override public void readBlob(final String blobName, final ReadBlobListener listener) {
145-
logger.debug("readBlob blobKey={}", blobKey(blobName));
145+
logger.debug("readBlob {}", blobKey(blobName));
146146
blobStore.executor().execute(new Runnable() {
147147
@Override public void run() {
148148
Cassandra.Client client = null;
@@ -172,13 +172,13 @@ private void readBlob(Cassandra.Client client, String blobName, ReadBlobListener
172172
ConsistencyLevel.QUORUM);
173173
Column column = columnOrSuperColumn.getColumn();
174174
byte[] blobData = column.getValue();
175-
logger.debug("Read {}, {} bytes", blobKey(blobName), blobData.length);
175+
logger.debug("Read {} bytes: {}", blobKey(blobName), blobData.length);
176176
listener.onPartial(blobData, 0, blobData.length);
177177
listener.onCompleted();
178178
}
179179

180180
@Override public ImmutableMap<String, BlobMetaData> listBlobsByPrefix(@Nullable String blobNamePrefix) throws IOException {
181-
logger.debug("listBlobsByPrefix blobNamePrefix={}", blobKey(blobNamePrefix));
181+
logger.debug("listBlobsByPrefix {}", blobKey(blobNamePrefix));
182182

183183
List<ColumnOrSuperColumn> columns;
184184
Cassandra.Client client = CassandraClientFactory.getCassandraClient();
@@ -216,7 +216,7 @@ private void readBlob(Cassandra.Client client, String blobName, ReadBlobListener
216216
Column column = columnOrSuperColumn.getColumn();
217217
String name = new String(column.getName(), utf8);
218218
long length = Integer.parseInt(new String(column.getValue(), utf8));
219-
logger.debug("name: {}, length: {}", name, length);
219+
logger.debug("name: {} length: {}", name, length);
220220
if (blobNamePrefix == null || name.startsWith(blobNamePrefix)) {
221221
blobsBuilder.put(name, new PlainBlobMetaData(name, length));
222222
}

plugins/cassandra/src/main/java/org/elasticsearch/cassandra/blobstore/CassandraBlobStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public CassandraBlobStore(Settings settings, Executor executor) {
5151

5252
this.bufferSizeInBytes = (int) settings.getAsBytesSize("buffer_size", new ByteSizeValue(100, ByteSizeUnit.KB)).bytes();
5353

54-
logger.debug("CassandraBlobStore executor={}, bufferSizeInBytes={}", executor, bufferSizeInBytes);
54+
logger.debug("CassandraBlobStore executor: {} bufferSizeInBytes: {}", executor, bufferSizeInBytes);
5555
}
5656

5757
@Override public String toString() {
@@ -73,7 +73,7 @@ public int bufferSizeInBytes() {
7373
}
7474

7575
@Override public void delete(BlobPath path) {
76-
logger.debug("TODO delete path={}", path);
76+
logger.debug("TODO delete {}", path);
7777
/* XXX TODO
7878
ObjectListing prevListing = null;
7979
while (true) {

plugins/cassandra/src/main/java/org/elasticsearch/cassandra/blobstore/CassandraImmutableBlobContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public CassandraImmutableBlobContainer(BlobPath path, CassandraBlobStore blobSto
6161
blobStore.executor().execute(new Runnable() {
6262
@Override public void run() {
6363
try {
64-
logger.debug("writeBlob blobKey={}, sizeInBytes={}", blobKey(blobName), sizeInBytes);
64+
logger.debug("writeBlob {} sizeInBytes: {}", blobKey(blobName), sizeInBytes);
6565
Cassandra.Client client =
6666
CassandraClientFactory.getCassandraClient();
6767
try {

0 commit comments

Comments
 (0)