skip entries if we cannot search for the pdb file
Happened when the project was 'http:'.
This commit is contained in:
@@ -23,12 +23,10 @@ import org.lucares.pdb.api.GroupResult;
|
||||
import org.lucares.pdb.api.Result;
|
||||
import org.lucares.pdb.api.Tags;
|
||||
import org.lucares.pdb.datastore.DataStore;
|
||||
import org.lucares.pdb.datastore.lang.SyntaxException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class PerformanceDb implements AutoCloseable {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(PerformanceDb.class);
|
||||
private final static Logger METRICS_LOGGER = LoggerFactory.getLogger("org.lucares.metrics.ingestion.block");
|
||||
@@ -77,13 +75,13 @@ public class PerformanceDb implements AutoCloseable {
|
||||
break;
|
||||
}
|
||||
final Entry entry = entryOptional.get();
|
||||
|
||||
final Tags tags = entry.getTags();
|
||||
final OffsetDateTime date = entry.getDate();
|
||||
|
||||
final PdbWriter writer = tagsToFile.getWriter(date, tags);
|
||||
|
||||
try {
|
||||
|
||||
final Tags tags = entry.getTags();
|
||||
final OffsetDateTime date = entry.getDate();
|
||||
|
||||
final PdbWriter writer = tagsToFile.getWriter(date, tags);
|
||||
|
||||
writer.write(entry);
|
||||
count++;
|
||||
|
||||
@@ -102,14 +100,9 @@ public class PerformanceDb implements AutoCloseable {
|
||||
LOGGER.debug("flushed all files: " + (System.currentTimeMillis() - startFlush) + "ms");
|
||||
}
|
||||
|
||||
} catch (final InvalidValueException e) {
|
||||
try {
|
||||
final ObjectMapper objectMapper = new ObjectMapper();
|
||||
LOGGER.info("skipping entry, because of invalid value: " + e.getMessage() + " : "
|
||||
+ objectMapper.writeValueAsString(entry));
|
||||
} catch (final JsonProcessingException e1) {
|
||||
LOGGER.error("Failed to write error message.", e1);
|
||||
}
|
||||
} catch (final InvalidValueException | SyntaxException e) {
|
||||
|
||||
LOGGER.info("skipping entry: " + e.getMessage() + " : " + entry);
|
||||
LOGGER.debug("", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user