dsCfg.setPageSize(memCfg.getPageSize()); dsCfg.setSystemRegionInitialSize(memCfg.getSystemCacheInitialSize()); dsCfg.setSystemRegionMaxSize(memCfg.getSystemCacheMaxSize());
/** * @param rmt Remote node to check. * @throws IgniteCheckedException If check failed. */ private void checkMemoryConfiguration(ClusterNode rmt) throws IgniteCheckedException { ClusterNode locNode = ctx.discovery().localNode(); if (ctx.config().isClientMode() || locNode.isDaemon() || rmt.isClient() || rmt.isDaemon()) return; DataStorageConfiguration dsCfg = null; Object dsCfgBytes = rmt.attribute(IgniteNodeAttributes.ATTR_DATA_STORAGE_CONFIG); if (dsCfgBytes instanceof byte[]) dsCfg = new JdkMarshaller().unmarshal((byte[])dsCfgBytes, U.resolveClassLoader(ctx.config())); if (dsCfg == null) { // Try to use legacy memory configuration. MemoryConfiguration memCfg = rmt.attribute(IgniteNodeAttributes.ATTR_MEMORY_CONFIG); if (memCfg != null) { dsCfg = new DataStorageConfiguration(); // All properties that are used in validation should be converted here. dsCfg.setPageSize(memCfg.getPageSize()); } } if (dsCfg != null) { DataStorageConfiguration locDsCfg = ctx.config().getDataStorageConfiguration(); if (dsCfg.getPageSize() != locDsCfg.getPageSize()) { throw new IgniteCheckedException("Memory configuration mismatch (fix configuration or set -D" + IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system property) [rmtNodeId=" + rmt.id() + ", locPageSize = " + locDsCfg.getPageSize() + ", rmtPageSize = " + dsCfg.getPageSize() + "]"); } } }
w.writeInt(cfg.getPageSize()); w.writeInt(cfg.getConcurrencyLevel()); w.writeString(cfg.getDefaultMemoryPolicyName());
dsCfg.setPageSize(memCfg.getPageSize()); dsCfg.setSystemRegionInitialSize(memCfg.getSystemCacheInitialSize()); dsCfg.setSystemRegionMaxSize(memCfg.getSystemCacheMaxSize());
/** * @param rmt Remote node to check. * @throws IgniteCheckedException If check failed. */ private void checkMemoryConfiguration(ClusterNode rmt) throws IgniteCheckedException { ClusterNode locNode = ctx.discovery().localNode(); if (ctx.config().isClientMode() || locNode.isDaemon() || rmt.isClient() || rmt.isDaemon()) return; DataStorageConfiguration dsCfg = null; Object dsCfgBytes = rmt.attribute(IgniteNodeAttributes.ATTR_DATA_STORAGE_CONFIG); if (dsCfgBytes instanceof byte[]) dsCfg = new JdkMarshaller().unmarshal((byte[])dsCfgBytes, U.resolveClassLoader(ctx.config())); if (dsCfg == null) { // Try to use legacy memory configuration. MemoryConfiguration memCfg = rmt.attribute(IgniteNodeAttributes.ATTR_MEMORY_CONFIG); if (memCfg != null) { dsCfg = new DataStorageConfiguration(); // All properties that are used in validation should be converted here. dsCfg.setPageSize(memCfg.getPageSize()); } } if (dsCfg != null) { DataStorageConfiguration locDsCfg = ctx.config().getDataStorageConfiguration(); if (dsCfg.getPageSize() != locDsCfg.getPageSize()) { throw new IgniteCheckedException("Memory configuration mismatch (fix configuration or set -D" + IGNITE_SKIP_CONFIGURATION_CONSISTENCY_CHECK + "=true system property) [rmtNodeId=" + rmt.id() + ", locPageSize = " + locDsCfg.getPageSize() + ", rmtPageSize = " + dsCfg.getPageSize() + "]"); } } }
w.writeInt(cfg.getPageSize()); w.writeInt(cfg.getConcurrencyLevel()); w.writeString(cfg.getDefaultMemoryPolicyName());