extract CSV reading code to new file
Refactoring to prepare the addition of CSV parsing rules. The parsing rules will contain information about which columns to ingest or ignore. This will be used to add the ability to upload files via HTTP post in addition to the TcpIngestor.
This commit is contained in:
@@ -267,7 +267,7 @@ public class TcpIngestorTest {
|
||||
Instant.ofEpochMilli(1).atOffset(ZoneOffset.UTC).format(DateTimeFormatter.ISO_ZONED_DATE_TIME));
|
||||
entry.put("duration", 1);
|
||||
entry.put("host", "someHost");
|
||||
entry.put(TcpIngestor.Handler.COLUM_IGNORE_PREFIX + "ignored", "ignoredValue");
|
||||
entry.put(CsvToEntryTransformer.COLUM_IGNORE_PREFIX + "ignored", "ignoredValue");
|
||||
|
||||
PdbTestUtil.sendAsCsv(entry);
|
||||
} catch (final Exception e) {
|
||||
@@ -284,9 +284,9 @@ public class TcpIngestorTest {
|
||||
|
||||
public void testCsvIngestorHandlesDurationAtEnd() throws Exception {
|
||||
|
||||
String host = "someHost";
|
||||
long value1 = 222;
|
||||
long value2 = 1;
|
||||
final String host = "someHost";
|
||||
final long value1 = 222;
|
||||
final long value2 = 1;
|
||||
try (TcpIngestor ingestor = new TcpIngestor(dataDirectory)) {
|
||||
|
||||
ingestor.start();
|
||||
|
||||
Reference in New Issue
Block a user