Search in sources :

Example 1 with OfflineSegmentDataManager

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));
}
Also used : OfflineSegmentDataManager(com.linkedin.pinot.core.data.manager.offline.OfflineSegmentDataManager) File(java.io.File) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with OfflineSegmentDataManager

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;
}
Also used : Field(java.lang.reflect.Field) MetricsRegistry(com.yammer.metrics.core.MetricsRegistry) OfflineSegmentDataManager(com.linkedin.pinot.core.data.manager.offline.OfflineSegmentDataManager) TableDataManagerConfig(com.linkedin.pinot.core.data.manager.config.TableDataManagerConfig) OfflineTableDataManager(com.linkedin.pinot.core.data.manager.offline.OfflineTableDataManager) ServerMetrics(com.linkedin.pinot.common.metrics.ServerMetrics)

Aggregations

OfflineSegmentDataManager (com.linkedin.pinot.core.data.manager.offline.OfflineSegmentDataManager)2 ServerMetrics (com.linkedin.pinot.common.metrics.ServerMetrics)1 TableDataManagerConfig (com.linkedin.pinot.core.data.manager.config.TableDataManagerConfig)1 OfflineTableDataManager (com.linkedin.pinot.core.data.manager.offline.OfflineTableDataManager)1 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)1 File (java.io.File)1 Field (java.lang.reflect.Field)1 BeforeClass (org.testng.annotations.BeforeClass)1