apache-ignite
93 строки · 2.4 Кб
1// Licensed to the Apache Software Foundation (ASF) under one or more
2// contributor license agreements. See the NOTICE file distributed with
3// this work for additional information regarding copyright ownership.
4// The ASF licenses this file to You under the Apache License, Version 2.0
5// (the "License"); you may not use this file except in compliance with
6// the License. You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15You can start a node from the command line using the default configuration or by passing a custom configuration file.
16You can start as many nodes as you like and they will all automatically discover each other.
17
18Navigate into the `bin` folder of the Ignite installation directory from the command shell.
19Your command might look like this:
20
21[tabs]
22--
23
24tab:Unix[]
25[source,shell]
26----
27cd {IGNITE_HOME}/bin/
28----
29
30tab:Windows[]
31[source,shell]
32----
33cd {IGNITE_HOME}\bin\
34----
35
36--
37
38
39Start a node with a custom configuration file that is passed as a parameter to `ignite.sh|bat` like this:
40
41
42[tabs]
43--
44
45tab:Unix[]
46[source,shell]
47----
48./ignite.sh ../examples/config/example-ignite.xml
49----
50
51tab:Windows[]
52[source,shell]
53----
54ignite.bat ..\examples\config\example-ignite.xml
55----
56--
57
58
59You will see output similar to this:
60
61....
62[08:53:45] Ignite node started OK (id=7b30bc8e)
63[08:53:45] Topology snapshot [ver=1, locNode=7b30bc8e, servers=1, clients=0, state=ACTIVE, CPUs=4, offheap=1.6GB, heap=2.0GB]
64....
65
66Open another tab from your command shell and run the same command again:
67
68[tabs]
69--
70tab:Unix[]
71[source,shell]
72----
73./ignite.sh ../examples/config/example-ignite.xml
74----
75
76tab:Windows[]
77[source,shell]
78----
79ignite.bat ..\examples\config\example-ignite.xml
80----
81
82--
83
84Check the `Topology snapshot` line in the output.
85Now you have a cluster of two server nodes with more CPUs and RAM available cluster-wide:
86
87....
88[08:54:34] Ignite node started OK (id=3a30b7a4)
89[08:54:34] Topology snapshot [ver=2, locNode=3a30b7a4, servers=2, clients=0, state=ACTIVE, CPUs=4, offheap=3.2GB, heap=4.0GB]
90....
91
92
93NOTE: By default, `ignite.sh|bat` starts a node with the default configuration file: `config/default-config.xml`.
94