use of com.linkedin.pinot.common.config.AbstractTableConfig in project pinot by linkedin.
the class LLRealtimeSegmentDataManagerTest method createFakeSegmentManager.
private FakeLLRealtimeSegmentDataManager createFakeSegmentManager() throws Exception {
LLCRealtimeSegmentZKMetadata segmentZKMetadata = createZkMetadata();
AbstractTableConfig tableConfig = createTableConfig();
InstanceZKMetadata instanceZKMetadata = new InstanceZKMetadata();
RealtimeTableDataManager tableDataManager = createTableDataManager();
String resourceDir = _segmentDir;
Schema schema = Schema.fromString(makeSchema());
ServerMetrics serverMetrics = new ServerMetrics(new MetricsRegistry());
FakeLLRealtimeSegmentDataManager segmentDataManager = new FakeLLRealtimeSegmentDataManager(segmentZKMetadata, tableConfig, instanceZKMetadata, tableDataManager, resourceDir, schema, serverMetrics);
return segmentDataManager;
}
use of com.linkedin.pinot.common.config.AbstractTableConfig in project pinot by linkedin.
the class UpdateSegmentState method getAllTenantTables.
public List<String> getAllTenantTables() throws Exception {
String tableConfigPath = "/CONFIGS/TABLE";
List<ZNRecord> tableConfigs = _propertyStore.getChildren(tableConfigPath, null, 0);
List<String> tables = new ArrayList<>(128);
for (ZNRecord znRecord : tableConfigs) {
AbstractTableConfig tableConfig = AbstractTableConfig.fromZnRecord(znRecord);
if (tableConfig.getTenantConfig().getServer().equals(_tenantName)) {
tables.add(tableConfig.getTableName());
}
}
return tables;
}
use of com.linkedin.pinot.common.config.AbstractTableConfig in project pinot by linkedin.
the class PerfBenchmarkDriver method configureTable.
public void configureTable(String tableName, List<String> invertedIndexColumns) throws Exception {
String jsonString = ControllerRequestBuilderUtil.buildCreateOfflineTableJSON(tableName, _serverTenantName, _brokerTenantName, _numReplicas, _segmentAssignmentStrategy).toString();
AbstractTableConfig offlineTableConfig = AbstractTableConfig.init(jsonString);
offlineTableConfig.getValidationConfig().setRetentionTimeUnit("DAYS");
offlineTableConfig.getValidationConfig().setRetentionTimeValue("");
IndexingConfig indexingConfig = offlineTableConfig.getIndexingConfig();
indexingConfig.setLoadMode(_loadMode);
indexingConfig.setSegmentFormatVersion(_segmentFormatVersion);
if (invertedIndexColumns != null && !invertedIndexColumns.isEmpty()) {
indexingConfig.setInvertedIndexColumns(invertedIndexColumns);
}
_helixResourceManager.addTable(offlineTableConfig);
}
Aggregations