Skip to content

Commit 9de0926

Browse files
committed
replace ArrayList in tankResponse
1 parent c203734 commit 9de0926

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Tool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static void main(String[] args) throws Exception {
9191
System.out.println("Error, topic " + tr.getTopic() + " does not exist !");
9292
} else if (tr.getError() == TankClient.ERROR_NO_SUCH_PARTITION) {
9393
System.out.println(
94-
"Error, topic " + tr.getTopic() + " doe not have a partition " + tr.getPartition());
94+
"Error, topic " + tr.getTopic() + " does not have a partition " + tr.getPartition());
9595
} else {
9696
System.out.println(
9797
"Unknown error for topic: " + tr.getTopic() + " partition: " + tr.getPartition());
@@ -110,7 +110,7 @@ public static void main(String[] args) throws Exception {
110110
response = tc.consume(consume);
111111
consume = new TankRequest(TankClient.CONSUME_REQ);
112112
for (TankResponse tr : response) {
113-
System.out.println("topic: " + tr.getTopic() + " partition: " + tr.getPartition());
113+
//System.out.println("topic: " + tr.getTopic() + " partition: " + tr.getPartition());
114114
for (TankMessage tm : tr.getMessages()) {
115115
System.out.println("seq: " + tm.getSeqId()
116116
+ " ts: " + tm.getTimestamp()

logging.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
handlers= java.util.logging.ConsoleHandler
22
.level = ALL
3-
java.util.logging.ConsoleHandler.level = FINE
3+
java.util.logging.ConsoleHandler.level = INFO
44
#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
55
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

src/gr/phaistosnetworks/tank/TankResponse.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package gr.phaistosnetworks.tank;
22

33
import java.util.ArrayList;
4+
import java.util.List;
45

56
/**
67
* Response data per partition / topic combo.
@@ -26,7 +27,7 @@ void addMessage(TankMessage message) {
2627
/**
2728
* Returns the messages.
2829
*/
29-
public ArrayList<TankMessage> getMessages() {
30+
public List<TankMessage> getMessages() {
3031
return messages;
3132
}
3233

@@ -99,7 +100,7 @@ public long getNextSeqId() {
99100
}
100101
}
101102

102-
private ArrayList<TankMessage> messages;
103+
private List<TankMessage> messages;
103104
private String topic;
104105
private long partition = 0L;
105106
private boolean hasError = false;

0 commit comments

Comments
 (0)