Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Commit

Permalink
Minor modifications from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
xstevens committed Feb 13, 2013
1 parent 2194411 commit 9508f9d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

public class KafkaLoggerConsumer {

private static final Logger LOG = Logger.getLogger(KafkaHBaseConsumer.class);
private static final Logger LOG = Logger.getLogger(KafkaLoggerConsumer.class);

public static void main(String[] args) {
OptionFactory optFactory = OptionFactory.getInstance();
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/mozilla/bagheera/http/Bagheera.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static void main(String[] args) throws Exception {

propUrl = Bagheera.class.getResource(KAFKA_PROPERTIES_RESOURCE_NAME);
if (propUrl == null) {
throw new IllegalArgumentException("Could not find the properites file: " + "/kafka.producer.properties");
throw new IllegalArgumentException("Could not find the properites file: " + KAFKA_PROPERTIES_RESOURCE_NAME);
}

in = propUrl.openStream();
Expand Down Expand Up @@ -106,6 +106,7 @@ public void releaseExternalResources() {
pipeFactory = new HttpServerPipelineFactory(props, producer);
server.setPipelineFactory(pipeFactory);
server.setOption("tcpNoDelay", tcpNoDelay);
// disable keep-alive so client connections don't hang around
server.setOption("keepAlive", false);
Channel ch = server.bind(new InetSocketAddress(port));
allChannels.add(ch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public class BagheeraHttpRequest extends DefaultHttpRequest {
public static final int NAMESPACE_PATH_IDX = 1;
public static final int ID_PATH_IDX = 2;

private String endpoint;
private String namespace;
private final String endpoint;
private final String namespace;
private String id;

public BagheeraHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public class SubmissionHandler extends SimpleChannelUpstreamHandler {
// REST endpoints
private static final String ENDPOINT_SUBMIT = "submit";

private MetricsManager metricsManager;
private Producer producer;
private final MetricsManager metricsManager;
private final Producer producer;

public SubmissionHandler(Validator validator, Producer producer) {
this.metricsManager = MetricsManager.getInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

public class KafkaProducer implements com.mozilla.bagheera.producer.Producer {

private Producer<String,BagheeraMessage> producer;
private final Producer<String,BagheeraMessage> producer;

public KafkaProducer(Properties props) {
ProducerConfig config = new ProducerConfig(props);
Expand Down

0 comments on commit 9508f9d

Please sign in to comment.