use of org.apache.ignite.internal.managers.systemview.walker.PartitionStateViewWalker in project ignite by apache.
the class GridCacheProcessor method start.
/**
* {@inheritDoc}
*/
@SuppressWarnings({ "unchecked" })
@Override
public void start() throws IgniteCheckedException {
ctx.internalSubscriptionProcessor().registerMetastorageListener(recovery);
ctx.internalSubscriptionProcessor().registerDatabaseListener(recovery);
cachesInfo = new ClusterCachesInfo(ctx);
DeploymentMode depMode = ctx.config().getDeploymentMode();
if (!F.isEmpty(ctx.config().getCacheConfiguration())) {
if (depMode != CONTINUOUS && depMode != SHARED)
U.warn(log, "Deployment mode for cache is not CONTINUOUS or SHARED " + "(it is recommended that you change deployment mode and restart): " + depMode);
}
Collection<CacheStoreSessionListener> sessionListeners = CU.startStoreSessionListeners(ctx, ctx.config().getCacheStoreSessionListenerFactories());
sharedCtx = createSharedContext(ctx, sessionListeners);
locCfgMgr = new GridLocalConfigManager(this, ctx);
transactions = new IgniteTransactionsImpl(sharedCtx, null, false);
// Start shared managers.
for (GridCacheSharedManager mgr : sharedCtx.managers()) mgr.start(sharedCtx);
if (!ctx.isDaemon() && (!CU.isPersistenceEnabled(ctx.config())) || ctx.config().isClientMode()) {
CacheJoinNodeDiscoveryData data = locCfgMgr.restoreCacheConfigurations();
if (data != null)
cachesInfo.onStart(data);
}
if (log.isDebugEnabled())
log.debug("Started cache processor.");
ctx.state().cacheProcessorStarted();
ctx.systemView().registerFiltrableView(CACHE_GRP_PAGE_LIST_VIEW, CACHE_GRP_PAGE_LIST_VIEW_DESC, new CachePagesListViewWalker(), this::pagesListViewSupplier, Function.identity());
ctx.systemView().registerFiltrableView(PART_STATES_VIEW, PART_STATES_VIEW_DESC, new PartitionStateViewWalker(), this::partStatesViewSupplier, Function.identity());
ctx.systemView().registerView(CACHE_GRP_IO_VIEW, CACHE_GRP_IO_VIEW_DESC, new CacheGroupIoViewWalker(), () -> F.view(cacheGrps.values(), grp -> !grp.systemCache()), grpCtx -> {
MetricRegistry mreg = ctx.metric().registry(metricName(IoStatisticsType.CACHE_GROUP.metricGroupName(), grpCtx.cacheOrGroupName()));
return new CacheGroupIoView(grpCtx, mreg);
});
}
Aggregations