rename put to putString to make it easier for ides to find references
This commit is contained in:
@@ -49,8 +49,8 @@ public class CsvReaderCsvToEntryTransformer implements CsvToEntryTransformer {
|
||||
final int chunksize = 1000;
|
||||
Entries entries = new Entries(chunksize);
|
||||
|
||||
final int keyTimestamp = Tags.STRING_COMPRESSOR.put(settings.getTimeColumn());
|
||||
final int keyDuration = Tags.STRING_COMPRESSOR.put(settings.getValueColumn());
|
||||
final int keyTimestamp = Tags.STRING_COMPRESSOR.putString(settings.getTimeColumn());
|
||||
final int keyDuration = Tags.STRING_COMPRESSOR.putString(settings.getValueColumn());
|
||||
final DateTimeFormatter dateParser = createDateParser(settings.getDateTimePattern());
|
||||
final Tags additionalTags = initAdditionalTags(settings);
|
||||
|
||||
@@ -101,7 +101,7 @@ public class CsvReaderCsvToEntryTransformer implements CsvToEntryTransformer {
|
||||
|
||||
final String renameTo = settings.getColumnDefinitions().getRenameTo(columnName);
|
||||
final String renamedColumn = renameTo != null ? renameTo : columnName;
|
||||
compressedHeaders[i] = Tags.STRING_COMPRESSOR.put(renamedColumn);
|
||||
compressedHeaders[i] = Tags.STRING_COMPRESSOR.putString(renamedColumn);
|
||||
final EnumSet<PostProcessors> postProcessors = settings.getColumnDefinitions()
|
||||
.getPostProcessors(columnName);
|
||||
final Function<String, String> postProcessFunction = PostProcessors.toFunction(postProcessors);
|
||||
@@ -134,7 +134,7 @@ public class CsvReaderCsvToEntryTransformer implements CsvToEntryTransformer {
|
||||
duration = Long.parseLong(val);
|
||||
} else if (!val.isEmpty()) {
|
||||
final Function<String, String> postProcess = postProcessersForColumns.get(i);
|
||||
final int value = Tags.STRING_COMPRESSOR.put(val, postProcess);
|
||||
final int value = Tags.STRING_COMPRESSOR.putString(val, postProcess);
|
||||
|
||||
tagsBuilder.add(key, value);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ public interface CsvToEntryTransformer {
|
||||
default Tags initAdditionalTags(final CsvReaderSettings settings) {
|
||||
final TagsBuilder tags = new TagsBuilder();
|
||||
for (final java.util.Map.Entry<String, String> entry : settings.getAdditionalTags().entrySet()) {
|
||||
final int field = Tags.STRING_COMPRESSOR.put(entry.getKey());
|
||||
final int value = Tags.STRING_COMPRESSOR.put(entry.getValue());
|
||||
final int field = Tags.STRING_COMPRESSOR.putString(entry.getKey());
|
||||
final int value = Tags.STRING_COMPRESSOR.putString(entry.getValue());
|
||||
tags.add(field, value);
|
||||
}
|
||||
return tags.build();
|
||||
|
||||
@@ -72,12 +72,12 @@ public class JsonToEntryTransformer implements LineToEntryTransformer {
|
||||
// ignore: we only support key/value tags
|
||||
break;
|
||||
default:
|
||||
final int keyAsInt = Tags.STRING_COMPRESSOR.put(key);
|
||||
final int keyAsInt = Tags.STRING_COMPRESSOR.putString(key);
|
||||
final int valueAsInt;
|
||||
if (value instanceof String) {
|
||||
valueAsInt = Tags.STRING_COMPRESSOR.put((String) value);
|
||||
valueAsInt = Tags.STRING_COMPRESSOR.putString((String) value);
|
||||
} else if (value != null) {
|
||||
valueAsInt = Tags.STRING_COMPRESSOR.put(String.valueOf(value));
|
||||
valueAsInt = Tags.STRING_COMPRESSOR.putString(String.valueOf(value));
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ class NoCopyCsvToEntryTransformer implements CsvToEntryTransformer {
|
||||
int lineCounter = 0;
|
||||
|
||||
final byte[] buffer = new byte[4096 * 16];
|
||||
final int keyTimestamp = stringCompressor.put(settings.getTimeColumn());
|
||||
final int keyDuration = stringCompressor.put(settings.getValueColumn());
|
||||
final int keyTimestamp = stringCompressor.putString(settings.getTimeColumn());
|
||||
final int keyDuration = stringCompressor.putString(settings.getValueColumn());
|
||||
final FastISODateParser dateParser = new FastISODateParser();
|
||||
|
||||
Tags additionalTags = initAdditionalTags(settings);
|
||||
@@ -148,7 +148,7 @@ class NoCopyCsvToEntryTransformer implements CsvToEntryTransformer {
|
||||
|
||||
final String renameTo = settings.getColumnDefinitions().getRenameTo(columnName);
|
||||
final String renamedColumn = renameTo != null ? renameTo : columnName;
|
||||
columns[i] = stringCompressor.put(renamedColumn);
|
||||
columns[i] = stringCompressor.putString(renamedColumn);
|
||||
final EnumSet<PostProcessors> postProcessors = settings.getColumnDefinitions()
|
||||
.getPostProcessors(columnName);
|
||||
final Function<String, String> postProcessFunction = PostProcessors.toFunction(postProcessors);
|
||||
@@ -190,8 +190,8 @@ class NoCopyCsvToEntryTransformer implements CsvToEntryTransformer {
|
||||
duration = parseLong(line, lastSeparatorPosition + 1, separatorPosition);
|
||||
} else if (lastSeparatorPosition + 1 < separatorPosition) { // value is not empty
|
||||
final Function<String, String> postProcess = postProcessersForColumns.get(i);
|
||||
final int value = stringCompressor.put(line, lastSeparatorPosition + 1, separatorPosition,
|
||||
postProcess);
|
||||
final int value = stringCompressor.putStringFromBytes(line, lastSeparatorPosition + 1,
|
||||
separatorPosition, postProcess);
|
||||
|
||||
tagsBuilder.add(key, value);
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@ public class TagMatchExtractor {
|
||||
if (matcher.find() && matcher.groupCount() >= 1) {
|
||||
final String group = matcher.group(1);
|
||||
|
||||
Tags.STRING_COMPRESSOR.put(tagMatcher.tag());
|
||||
Tags.STRING_COMPRESSOR.put(group);
|
||||
Tags.STRING_COMPRESSOR.putString(tagMatcher.tag());
|
||||
Tags.STRING_COMPRESSOR.putString(group);
|
||||
System.out.println(tagMatcher.tag() + " -> " + group);
|
||||
|
||||
final Tag tag = Tags.STRING_COMPRESSOR.createTag(tagMatcher.tag(), group);
|
||||
|
||||
Reference in New Issue
Block a user