Search in sources :

Example 1 with TokenVerifierImpl

use of io.pravega.segmentstore.server.host.delegationtoken.TokenVerifierImpl in project pravega by pravega.

the class ServiceStarter method start.

// endregion
// region Service Operation
public void start() throws Exception {
    Exceptions.checkNotClosed(this.closed, this);
    log.info("Initializing metrics provider ...");
    MetricsProvider.initialize(builderConfig.getConfig(MetricsConfig::builder));
    statsProvider = MetricsProvider.getMetricsProvider();
    statsProvider.start();
    log.info("Initializing ZooKeeper Client ...");
    this.zkClient = createZKClient();
    log.info("Initializing Service Builder ...");
    this.serviceBuilder.initialize();
    log.info("Creating StreamSegmentService ...");
    StreamSegmentStore service = this.serviceBuilder.createStreamSegmentService();
    log.info("Creating Segment Stats recorder ...");
    segmentStatsFactory = new SegmentStatsFactory();
    SegmentStatsRecorder statsRecorder = segmentStatsFactory.createSegmentStatsRecorder(service, builderConfig.getConfig(AutoScalerConfig::builder));
    TokenVerifierImpl tokenVerifier = new TokenVerifierImpl(builderConfig.getConfig(AutoScalerConfig::builder));
    this.listener = new PravegaConnectionListener(this.serviceConfig.isEnableTls(), this.serviceConfig.getListeningIPAddress(), this.serviceConfig.getListeningPort(), service, statsRecorder, tokenVerifier, this.serviceConfig.getCertFile(), this.serviceConfig.getKeyFile());
    this.listener.startListening();
    log.info("PravegaConnectionListener started successfully.");
    log.info("StreamSegmentService started.");
}
Also used : StreamSegmentStore(io.pravega.segmentstore.contracts.StreamSegmentStore) SegmentStatsRecorder(io.pravega.segmentstore.server.host.stat.SegmentStatsRecorder) SegmentStatsFactory(io.pravega.segmentstore.server.host.stat.SegmentStatsFactory) TokenVerifierImpl(io.pravega.segmentstore.server.host.delegationtoken.TokenVerifierImpl) PravegaConnectionListener(io.pravega.segmentstore.server.host.handler.PravegaConnectionListener)

Aggregations

StreamSegmentStore (io.pravega.segmentstore.contracts.StreamSegmentStore)1 TokenVerifierImpl (io.pravega.segmentstore.server.host.delegationtoken.TokenVerifierImpl)1 PravegaConnectionListener (io.pravega.segmentstore.server.host.handler.PravegaConnectionListener)1 SegmentStatsFactory (io.pravega.segmentstore.server.host.stat.SegmentStatsFactory)1 SegmentStatsRecorder (io.pravega.segmentstore.server.host.stat.SegmentStatsRecorder)1