use of org.apache.druid.io.ZeroCopyByteArrayOutputStream in project druid by druid-io.
the class IndexMergerV9 method makeColumn.
private void makeColumn(final FileSmoosher v9Smoosher, final String columnName, final ColumnDescriptor serdeficator) throws IOException {
ZeroCopyByteArrayOutputStream specBytes = new ZeroCopyByteArrayOutputStream();
SERIALIZER_UTILS.writeString(specBytes, mapper.writeValueAsString(serdeficator));
try (SmooshedWriter channel = v9Smoosher.addWithSmooshedWriter(columnName, specBytes.size() + serdeficator.getSerializedSize())) {
specBytes.writeTo(channel);
serdeficator.writeTo(channel, v9Smoosher);
}
}
Aggregations