Search in sources :

Example 1 with AvroRecordToPinotRowGenerator

use of com.linkedin.pinot.core.realtime.impl.kafka.AvroRecordToPinotRowGenerator in project pinot by linkedin.

the class RealtimeQueriesSentinelTest method setup.

@BeforeClass
public void setup() throws Exception {
    TableDataManagerProvider.setServerMetrics(new ServerMetrics(new MetricsRegistry()));
    PINOT_SCHEMA = getTestSchema();
    PINOT_SCHEMA.setSchemaName("realtimeSchema");
    AVRO_RECORD_TRANSFORMER = new AvroRecordToPinotRowGenerator(PINOT_SCHEMA);
    final IndexSegment indexSegment = getRealtimeSegment();
    setUpTestQueries("testTable");
    CONFIG_BUILDER = new TestingServerPropertiesBuilder("testTable");
    final PropertiesConfiguration serverConf = CONFIG_BUILDER.build();
    serverConf.setDelimiterParsingDisabled(false);
    final FileBasedInstanceDataManager instanceDataManager = FileBasedInstanceDataManager.getInstanceDataManager();
    instanceDataManager.init(new FileBasedInstanceDataManagerConfig(serverConf.subset("pinot.server.instance")));
    instanceDataManager.start();
    instanceDataManager.getTableDataManager("testTable");
    instanceDataManager.getTableDataManager("testTable").addSegment(indexSegment);
    QUERY_EXECUTOR = new ServerQueryExecutorV1Impl(false);
    QUERY_EXECUTOR.init(serverConf.subset("pinot.server.query.executor"), instanceDataManager, new ServerMetrics(new MetricsRegistry()));
}
Also used : MetricsRegistry(com.yammer.metrics.core.MetricsRegistry) AvroRecordToPinotRowGenerator(com.linkedin.pinot.core.realtime.impl.kafka.AvroRecordToPinotRowGenerator) IndexSegment(com.linkedin.pinot.core.indexsegment.IndexSegment) FileBasedInstanceDataManager(com.linkedin.pinot.core.data.manager.offline.FileBasedInstanceDataManager) ServerQueryExecutorV1Impl(com.linkedin.pinot.core.query.executor.ServerQueryExecutorV1Impl) ServerMetrics(com.linkedin.pinot.common.metrics.ServerMetrics) FileBasedInstanceDataManagerConfig(com.linkedin.pinot.core.data.manager.config.FileBasedInstanceDataManagerConfig) PropertiesConfiguration(org.apache.commons.configuration.PropertiesConfiguration) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

ServerMetrics (com.linkedin.pinot.common.metrics.ServerMetrics)1 FileBasedInstanceDataManagerConfig (com.linkedin.pinot.core.data.manager.config.FileBasedInstanceDataManagerConfig)1 FileBasedInstanceDataManager (com.linkedin.pinot.core.data.manager.offline.FileBasedInstanceDataManager)1 IndexSegment (com.linkedin.pinot.core.indexsegment.IndexSegment)1 ServerQueryExecutorV1Impl (com.linkedin.pinot.core.query.executor.ServerQueryExecutorV1Impl)1 AvroRecordToPinotRowGenerator (com.linkedin.pinot.core.realtime.impl.kafka.AvroRecordToPinotRowGenerator)1 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)1 PropertiesConfiguration (org.apache.commons.configuration.PropertiesConfiguration)1 BeforeClass (org.testng.annotations.BeforeClass)1