Skip to content

Commit

Permalink
replace ArrayList in tankResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrambovitis committed Aug 30, 2016
1 parent c203734 commit 9de0926
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Tool.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static void main(String[] args) throws Exception {
System.out.println("Error, topic " + tr.getTopic() + " does not exist !");
} else if (tr.getError() == TankClient.ERROR_NO_SUCH_PARTITION) {
System.out.println(
"Error, topic " + tr.getTopic() + " doe not have a partition " + tr.getPartition());
"Error, topic " + tr.getTopic() + " does not have a partition " + tr.getPartition());
} else {
System.out.println(
"Unknown error for topic: " + tr.getTopic() + " partition: " + tr.getPartition());
Expand All @@ -110,7 +110,7 @@ public static void main(String[] args) throws Exception {
response = tc.consume(consume);
consume = new TankRequest(TankClient.CONSUME_REQ);
for (TankResponse tr : response) {
System.out.println("topic: " + tr.getTopic() + " partition: " + tr.getPartition());
//System.out.println("topic: " + tr.getTopic() + " partition: " + tr.getPartition());
for (TankMessage tm : tr.getMessages()) {
System.out.println("seq: " + tm.getSeqId()
+ " ts: " + tm.getTimestamp()
Expand Down
2 changes: 1 addition & 1 deletion logging.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
handlers= java.util.logging.ConsoleHandler
.level = ALL
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.level = INFO
#java.util.logging.SimpleFormatter.format=%1$tb %1$td, %1$tY %1$tl:%1$tM:%1$tS %1$Tp %2$s %4$s: %5$s%n
java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %2$s %5$s%6$s%n
5 changes: 3 additions & 2 deletions src/gr/phaistosnetworks/tank/TankResponse.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package gr.phaistosnetworks.tank;

import java.util.ArrayList;
import java.util.List;

/**
* Response data per partition / topic combo.
Expand All @@ -26,7 +27,7 @@ void addMessage(TankMessage message) {
/**
* Returns the messages.
*/
public ArrayList<TankMessage> getMessages() {
public List<TankMessage> getMessages() {
return messages;
}

Expand Down Expand Up @@ -99,7 +100,7 @@ public long getNextSeqId() {
}
}

private ArrayList<TankMessage> messages;
private List<TankMessage> messages;
private String topic;
private long partition = 0L;
private boolean hasError = false;
Expand Down

0 comments on commit 9de0926

Please sign in to comment.