@Test public void testRemoveIndex() throws IOException { try (FilePerIndexDirectory fpi = new FilePerIndexDirectory(TEMP_DIR, segmentMetadata, ReadMode.mmap)) { fpi.newBuffer("col1", ColumnIndexType.FORWARD_INDEX, 1024); fpi.newBuffer("col2", ColumnIndexType.DICTIONARY, 100); Assert.assertTrue(fpi.getFileFor("col1", ColumnIndexType.FORWARD_INDEX).exists()); Assert.assertTrue(fpi.getFileFor("col2", ColumnIndexType.DICTIONARY).exists()); Assert.assertTrue(fpi.isIndexRemovalSupported()); fpi.removeIndex("col1", ColumnIndexType.FORWARD_INDEX); Assert.assertFalse(fpi.getFileFor("col1", ColumnIndexType.FORWARD_INDEX).exists()); } }
@Override public void removeIndex(String columnName, ColumnIndexType indexType) { File indexFile = getFileFor(columnName, indexType); indexFile.delete(); }
FilePerIndexDirectory extends ColumnIndexDirectory { @Override public void removeIndex(String columnName, ColumnIndexType indexType) { File indexFile = getFileFor(columnName, indexType); indexFile.delete(); } }
FilePerIndexDirectory extends ColumnIndexDirectory { @Override public void removeIndex(String columnName, ColumnIndexType indexType) { File indexFile = getFileFor(columnName, indexType); indexFile.delete(); } protected  FilePerIndexDirectory(File segmentDirectory, SegmentMetadataImpl metadata, ReadMode readMode); }
FilePerIndexDirectory extends ColumnIndexDirectory { @Override public void removeIndex(String columnName, ColumnIndexType indexType) { File indexFile = getFileFor(columnName, indexType); indexFile.delete(); } protected  FilePerIndexDirectory(File segmentDirectory, SegmentMetadataImpl metadata, ReadMode readMode); @Override PinotDataBuffer getBuffer(String column, ColumnIndexType type); @Override PinotDataBuffer newBuffer(String column, ColumnIndexType type, long sizeBytes); @Override boolean hasIndexFor(String column, ColumnIndexType type); @Override void close(); @Override void removeIndex(String columnName, ColumnIndexType indexType); @Override boolean isIndexRemovalSupported(); }
FilePerIndexDirectory extends ColumnIndexDirectory { @Override public void removeIndex(String columnName, ColumnIndexType indexType) { File indexFile = getFileFor(columnName, indexType); indexFile.delete(); } protected  FilePerIndexDirectory(File segmentDirectory, SegmentMetadataImpl metadata, ReadMode readMode); @Override PinotDataBuffer getBuffer(String column, ColumnIndexType type); @Override PinotDataBuffer newBuffer(String column, ColumnIndexType type, long sizeBytes); @Override boolean hasIndexFor(String column, ColumnIndexType type); @Override void close(); @Override void removeIndex(String columnName, ColumnIndexType indexType); @Override boolean isIndexRemovalSupported();  }