Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Minor modifications from code review

  • Loading branch information...
commit 9508f9dd12fa39892db2128d63704af708fbd1ed 1 parent 2194411
@xstevens xstevens authored
View
2  src/main/java/com/mozilla/bagheera/consumer/KafkaLoggerConsumer.java
@@ -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();
View
3  src/main/java/com/mozilla/bagheera/http/Bagheera.java
@@ -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();
@@ -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);
View
4 src/main/java/com/mozilla/bagheera/http/BagheeraHttpRequest.java
@@ -37,8 +37,8 @@
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) {
View
4 src/main/java/com/mozilla/bagheera/http/SubmissionHandler.java
@@ -67,8 +67,8 @@
// 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();
View
2  src/main/java/com/mozilla/bagheera/producer/KafkaProducer.java
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.