remove useless config, and make sure file writer is flush.
This commit is contained in:
parent
fe1702da36
commit
24f133d8e2
|
|
@ -13,16 +13,6 @@ public class Config {
|
|||
}
|
||||
|
||||
|
||||
public static class DataConsumer {
|
||||
|
||||
public static int CHANNEL_SIZE = 10;
|
||||
|
||||
public static int BUFFER_SIZE = 1000;
|
||||
|
||||
public static int CONSUMER_SIZE = 5;
|
||||
}
|
||||
|
||||
|
||||
public static class DataFile {
|
||||
public static String PATH = "/data/file";
|
||||
|
||||
|
|
|
|||
|
|
@ -20,12 +20,14 @@ public class DataFileWriter {
|
|||
}
|
||||
|
||||
IndexMetaCollection collections = new IndexMetaCollection();
|
||||
for (SpanData data : spanData) {
|
||||
collections.add(dataFile.write(data));
|
||||
try {
|
||||
for (SpanData data : spanData) {
|
||||
collections.add(dataFile.write(data));
|
||||
}
|
||||
}finally {
|
||||
dataFile.flush();
|
||||
}
|
||||
|
||||
dataFile.flush();
|
||||
|
||||
return collections;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue