use of com.linkedin.pinot.core.data.manager.offline.OfflineSegmentDataManager in project pinot by linkedin.
the class BaseMultiValueQueriesTest method loadSegment.
@BeforeClass
public void loadSegment() throws Exception {
File indexSegmentDir = new File(INDEX_DIR, SEGMENT_NAME);
_indexSegment = ColumnarSegmentLoader.load(indexSegmentDir, ReadMode.heap);
_segmentDataManagers = Arrays.<SegmentDataManager>asList(new OfflineSegmentDataManager(_indexSegment), new OfflineSegmentDataManager(_indexSegment));
}
use of com.linkedin.pinot.core.data.manager.offline.OfflineSegmentDataManager in project pinot by linkedin.
the class OfflineTableDataManagerTest method makeTestableManager.
private OfflineTableDataManager makeTestableManager() throws Exception {
OfflineTableDataManager tableDataManager = new OfflineTableDataManager();
TableDataManagerConfig config;
{
config = mock(TableDataManagerConfig.class);
when(config.getTableName()).thenReturn(tableName);
when(config.getDataDir()).thenReturn(_tmpDir.getAbsolutePath());
when(config.getReadMode()).thenReturn(readMode.toString());
when(config.getIndexLoadingConfigMetadata()).thenReturn(null);
}
tableDataManager.init(config, new ServerMetrics(new MetricsRegistry()), null);
tableDataManager.start();
Field segsMapField = AbstractTableDataManager.class.getDeclaredField("_segmentsMap");
segsMapField.setAccessible(true);
_internalSegMap = (Map<String, OfflineSegmentDataManager>) segsMapField.get(tableDataManager);
return tableDataManager;
}
Aggregations