fix null pointer exception

filename were generated without '$', but the parsing code expected
the '$'.
This commit is contained in:
2018-03-28 19:34:48 +02:00
parent 9f37243ba3
commit 22c99f8517
3 changed files with 4 additions and 4 deletions

View File

@@ -45,11 +45,11 @@ public class FolderStorage {
ensureCapacity();
String filename = filenamePrefix + filenameSuffix;
String filename = filenamePrefix + "$" + filenameSuffix;
int index = 1;
Path newFile = currentDirectory.resolve(filename);
while (Files.exists(newFile)) {
filename = filenamePrefix + index++ + filenameSuffix;
filename = filenamePrefix + "$" + index++ + filenameSuffix;
newFile = currentDirectory.resolve(filename);
}
Files.createFile(newFile);

View File

@@ -142,7 +142,7 @@ public class TcpIngestor implements Ingestor, AutoCloseable, DisposableBean {
default:
if (value instanceof String) {
tags.add(key, (String) value);
} else {
} else if (value != null) {
tags.add(key, String.valueOf(value));
}
break;

View File

@@ -63,7 +63,7 @@ public class PerformanceDb implements AutoCloseable {
public void put(final BlockingIterator<Entry> entries) throws WriteException {
final Duration timeBetweenSyncs = Duration.ofSeconds(1);
final Duration timeBetweenSyncs = Duration.ofSeconds(10);
long count = 0;
long insertionsSinceLastSync = 0;