Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BOOKKEEPER-1084: Make variables finale if necessary #172

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.bookkeeper.client;

/*
*
* Licensed to the Apache Software Foundation (ASF) under one
Expand All @@ -20,6 +18,7 @@
* under the License.
*
*/
package org.apache.bookkeeper.client;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
Expand All @@ -31,7 +30,6 @@
* the entry content.
*
*/

public class LedgerEntry {
long ledgerId;
long entryId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*
*/
class PendingReadOp implements Enumeration<LedgerEntry>, ReadEntryCallback {
private final static Logger LOG = LoggerFactory.getLogger(PendingReadOp.class);
private static final Logger LOG = LoggerFactory.getLogger(PendingReadOp.class);

final int speculativeReadTimeout;
final private ScheduledExecutorService scheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
import org.apache.bookkeeper.proto.BookkeeperProtocol.StatusCode;
import org.apache.bookkeeper.proto.BookkeeperProtocol.WriteLacRequest;
import org.apache.bookkeeper.proto.BookkeeperProtocol.WriteLacResponse;

import org.apache.bookkeeper.stats.NullStatsLogger;
import org.apache.bookkeeper.stats.OpStatsLogger;
import org.apache.bookkeeper.stats.StatsLogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

public class LedgerInputStream extends InputStream {
private final static Logger LOG = LoggerFactory.getLogger(LedgerInputStream.class);
private LedgerHandle lh;
private final LedgerHandle lh;
private ByteBuffer bytebuff;
byte[] bbytes;
long lastEntry = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public class LedgerOutputStream extends OutputStream {
private final static Logger LOG = LoggerFactory.getLogger(LedgerOutputStream.class);
private LedgerHandle lh;
private final LedgerHandle lh;
private ByteBuffer bytebuff;
byte[] bbytes;
int defaultSize = 1024 * 1024; // 1MB default size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@

/**
* This class tests BookieClient. It just sends the a new entry to itself.
*
*
*
*/

class LoopbackClient implements WriteCallback {
private final static Logger LOG = LoggerFactory.getLogger(LoopbackClient.class);

private static final Logger LOG = LoggerFactory.getLogger(LoopbackClient.class);

BookieClient client;
static int recvTimeout = 2000;
long begin = 0;
Expand Down Expand Up @@ -81,6 +79,7 @@ void write(long ledgerId, long entry, byte[] data, BookieSocketAddress addr, Wri
client.addEntry(addr, ledgerId, passwd, entry, Unpooled.wrappedBuffer(data), cb, ctx, BookieProtocol.FLAG_NONE);
}

@Override
public void writeComplete(int rc, long ledgerId, long entryId, BookieSocketAddress addr, Object ctx) {
Counter counter = (Counter) ctx;
counter.increment();
Expand Down