|
22 | 22 | import org.apache.paimon.compression.BlockCompressionType; |
23 | 23 | import org.apache.paimon.compression.BlockCompressor; |
24 | 24 | import org.apache.paimon.fs.PositionOutputStream; |
25 | | -import org.apache.paimon.lookup.sort.SortLookupStoreFooter; |
26 | 25 | import org.apache.paimon.memory.MemorySegment; |
27 | 26 | import org.apache.paimon.memory.MemorySlice; |
28 | 27 | import org.apache.paimon.options.MemorySize; |
@@ -191,38 +190,6 @@ public BlockHandle writeIndexBlock() throws IOException { |
191 | 190 | return indexBlock; |
192 | 191 | } |
193 | 192 |
|
194 | | - public void close() throws IOException { |
195 | | - // flush current data block |
196 | | - flush(); |
197 | | - |
198 | | - LOG.info("Number of record: {}", recordCount); |
199 | | - |
200 | | - // write bloom filter |
201 | | - @Nullable BloomFilterHandle bloomFilterHandle = null; |
202 | | - if (bloomFilter != null) { |
203 | | - MemorySegment buffer = bloomFilter.getBuffer(); |
204 | | - bloomFilterHandle = |
205 | | - new BloomFilterHandle( |
206 | | - out.getPos(), buffer.size(), bloomFilter.expectedEntries()); |
207 | | - writeSlice(MemorySlice.wrap(buffer)); |
208 | | - LOG.info("Bloom filter size: {} bytes", bloomFilter.getBuffer().size()); |
209 | | - } |
210 | | - |
211 | | - // write index block |
212 | | - BlockHandle indexBlockHandle = writeBlock(indexBlockWriter); |
213 | | - |
214 | | - // write footer |
215 | | - SortLookupStoreFooter footer = |
216 | | - new SortLookupStoreFooter(bloomFilterHandle, indexBlockHandle); |
217 | | - MemorySlice footerEncoding = SortLookupStoreFooter.writeFooter(footer); |
218 | | - writeSlice(footerEncoding); |
219 | | - |
220 | | - // do not need to close outputStream, since it will be closed by outer classes |
221 | | - |
222 | | - LOG.info("totalUncompressedSize: {}", MemorySize.ofBytes(totalUncompressedSize)); |
223 | | - LOG.info("totalCompressedSize: {}", MemorySize.ofBytes(totalCompressedSize)); |
224 | | - } |
225 | | - |
226 | 193 | public void writeSlice(MemorySlice slice) throws IOException { |
227 | 194 | out.write(slice.getHeapMemory(), slice.offset(), slice.length()); |
228 | 195 | } |
|
0 commit comments