/** * @param args Arguments. */ public static void main(String[] args) { G.start("config/hadoop/default-config.xml"); }
/** * @param args Args. * @throws Exception If failed. */ public static void main(String[] args) throws Exception { G.start("modules/core/src/test/config/jobs-load-server.xml"); } }
@Override public Object call() throws Exception { G.start(cfgs[cfgIdx.getAndIncrement()]); return null; } }, nodesCnt, "test-node-starter");
/** * Starts new grid with given name. Method optimize is not invoked. * * @param igniteInstanceName Ignite instance name. * @return Started grid. * @throws Exception If failed. */ private Ignite startGridNoOptimize(String igniteInstanceName) throws Exception { return G.start(getConfiguration(igniteInstanceName)); } }
/** * Starts up two nodes with specified cache configuration on pre-defined endpoints. * * @param args Command line arguments, none required. * @throws IgniteCheckedException In case of any exception. */ public static void main(String[] args) throws IgniteCheckedException { try (Ignite g = G.start("modules/clients/src/test/resources/spring-server-node.xml")) { U.sleep(Long.MAX_VALUE); } } }
/** * @param args Arguments. * @throws Exception If failed. */ public static void main(String[] args) throws Exception { try { G.start("examples/config/example-cache.xml"); JOptionPane.showMessageDialog(null, "Press OK to stop test node."); } finally { G.stopAll(false); } } }
/** * Starts up two nodes with specified cache configuration on pre-defined endpoints. * * @param args Command line arguments, none required. * @throws IgniteCheckedException In case of any exception. */ public static void main(String[] args) throws IgniteCheckedException { System.setProperty("CLIENTS_MODULE_PATH", U.resolveIgnitePath("modules/clients").getAbsolutePath()); try (Ignite g = G.start("modules/clients/src/test/resources/spring-server-ssl-node.xml")) { U.sleep(Long.MAX_VALUE); } } }
/** * Start a grid with the primary file system. * * @throws Exception If failed. */ private void startPrimary() throws Exception { igfsPrimary = new IgniteFileSystem[NODES_CNT]; for (int i = 0; i < NODES_CNT; i++) { Ignite g = G.start(primaryConfiguration(i)); igfsPrimary[i] = g.fileSystem(IGFS_PRIMARY); } }
/** {@inheritDoc} */ @Override protected void beforeTestsStarted() throws Exception { for (int i = 0; i < NODE_CNT; i++) { Ignite g = G.start(config(i)); if (i + 1 == NODE_CNT) igfs = g.fileSystem("igfs"); } }
@Override public void run() { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setIgniteInstanceName("test1"); try { G.start(cfg); } finally { X.println("States: " + states); } } }));
@Override public Object call() throws Exception { IgniteConfiguration cfg = gridConfiguration(); cfg.setFileSystemConfiguration(igfsConfiguration(IgfsIpcEndpointType.SHMEM, IpcSharedMemoryServerEndpoint.DFLT_IPC_PORT, null)); return G.start(cfg); } }, IgniteException.class, null);
/** * Perform startup. * * @param dfltIgniteInstanceName Default Ignite instance name. * @param dfltIgfsName Default IGFS name. * @throws Exception If failed. */ private void startUp(boolean dfltIgniteInstanceName, boolean dfltIgfsName) throws Exception { Ignite ignite = G.start(gridConfiguration(dfltIgniteInstanceName)); IgniteFileSystem igfs = ignite.fileSystem(dfltIgfsName ? "" : IGFS_NAME); igfs.mkdirs(PATH); }
/** {@inheritDoc} */ @Override protected Ignite startRestNode(String name, @Nullable String addr, @Nullable Integer port) throws Exception { IgniteConfiguration cfg = getConfiguration(name); assert cfg.getConnectorConfiguration() == null; ConnectorConfiguration clientCfg = new ConnectorConfiguration(); if (addr != null) clientCfg.setHost(addr); if (port != null) clientCfg.setPort(port); cfg.setConnectorConfiguration(clientCfg); return G.start(cfg); }
/** * Start a grid with the secondary file system. * * @return Secondary file system handle. * @throws Exception If failed. */ @Nullable private IgniteFileSystem startSecondary() throws Exception { IgniteConfiguration cfg = getConfiguration("grid-secondary", getSecondaryIgfsConfiguration()); cfg.setLocalHost("127.0.0.1"); cfg.setPeerClassLoadingEnabled(false); Ignite secG = G.start(cfg); return secG.fileSystem("igfs-secondary"); } }
/** * Start up routine. * * @throws Exception If failed. */ private void startUp() throws Exception { assert dataNodes() > 0; assert cacheMode() != null; assert atomicityMode() != null; for (int i = 0; i < dataNodes(); i++) G.start(configuration(i)); }
/** * @throws Exception If failed. */ @Test public void testRemoteIfPathModeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); FileSystemConfiguration g2IgfsCfg1 = new FileSystemConfiguration(g1IgfsCfg1); FileSystemConfiguration g2IgfsCfg2 = new FileSystemConfiguration(g1IgfsCfg2); g2IgfsCfg1.setPathModes(Collections.singletonMap("/somePath", DUAL_SYNC)); g2IgfsCfg2.setPathModes(Collections.singletonMap("/somePath", DUAL_SYNC)); g2Cfg.setFileSystemConfiguration(g2IgfsCfg1, g2IgfsCfg2); G.start(g1Cfg); checkGridStartFails(g2Cfg, "Path modes should be the same on all nodes in grid for IGFS", false); }
/** {@inheritDoc} */ @Override protected Object executeJob(int gridSize, String type) { log.info(">>> Starting new grid node [currGridSize=" + gridSize + ", arg=" + type + "]"); if (type == null) throw new IllegalArgumentException("Node type to start should be specified."); IgniteConfiguration cfg = getConfig(type); // Generate unique for this VM Ignite instance name. String igniteInstanceName = cfg.getIgniteInstanceName() + " (" + UUID.randomUUID() + ")"; // Update Ignite instance name (required to be unique). cfg.setIgniteInstanceName(igniteInstanceName); // Start new node in current VM. Ignite g = G.start(cfg); log.info(">>> Grid started [nodeId=" + g.cluster().localNode().id() + ", name='" + g.name() + "']"); return true; }
/** * @throws Exception If failed. */ @Test public void testRemoteIfAffinityMapperGroupSizeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); G.start(g1Cfg); for (FileSystemConfiguration igfsCfg : g2Cfg.getFileSystemConfiguration()) igfsCfg.setDataCacheConfiguration(dataCache(1000)); checkGridStartFails(g2Cfg, "Affinity mapper group size should be the same on all nodes in grid for IGFS", false); }
/** * @throws Exception If failed. */ @Test public void testRemoteIfDataBlockSizeDiffers() throws Exception { IgniteConfiguration g2Cfg = getConfiguration("g2"); FileSystemConfiguration g2IgfsCfg1 = new FileSystemConfiguration(g1IgfsCfg1); g2IgfsCfg1.setBlockSize(g2IgfsCfg1.getBlockSize() + 100); g2Cfg.setFileSystemConfiguration(g2IgfsCfg1, g1IgfsCfg2); G.start(g1Cfg); checkGridStartFails(g2Cfg, "Data block size should be the same on all nodes in grid for IGFS", false); }
/** */ @Test public void testStartStop() { IgniteConfiguration cfg = new IgniteConfiguration(); cfg.setConnectorConfiguration(null); info("Grid start-stop test count: " + COUNT); for (int i = 0; i < COUNT; i++) { info("Starting grid."); try (Ignite g = G.start(cfg)) { assert g != null; info("Stopping grid " + g.cluster().localNode().id()); } } }