Starting the Dgraph process as the leader node

When you start the data store without specifying a follower node flag for the Dgraph process, this node serves as the leader node.

The leader node must be started first (before any of the follower nodes have been started).

Before starting the leader node, ensure that the Cluster Coordinator service is running on this node. Note the host name and port of your Cluster Coordinator service, so that you can specify them when starting the Dgraph as the leader node.

You configure one and only one leader node in a cluster. Therefore, if you want to start the Dgraph process as the leader, do not specify the --follower flag for it. The Dgraph process instance that is started without the --follower flag becomes the leader node. You also do not specify a name for the leader node.

To create the data store and start the Dgraph process as the leader node:

  1. Go to the directory Oracle\Endeca\Server\<version>\endeca-cmd.
    You can now start the data store from this directory. Alternatively, use Environment Variables to include the .jar file located in this directory in your full file path.
  2. Create the data store and start the Dgraph process on the node with the create-ds command as in the following example:
    endeca-cmd create-ds MyDataStore 
    --ws-port 5555 
    --data-files z:\shared_MyDataStore\MyDataStore 
    --args  
      --coordinator_port 2181
      --coordinator_host My_cluster_coordinator_server.com 
      --threads 16  
      --log c:\MyDataStore\dgraph1.log 
      --out c:\MyDataStore\dgraph1.out
    In this example:
    • MyDataStore is the name of this Endeca data store (which will be the leader).
    • 5555 is the Dgraph process port. This is the port of the leader node.
    • z:\shared_MyDataStore\MyDataStore is the location of the data files for this data store, which reside on a shared file system. All nodes in your cluster must point to the same location of the data files on a shared file system and have access to it (with the leader node having write access, and follower nodes having read access).
    • The lines after the --args flag represent the flags that you are specifying for the Dgraph process hosted on this Oracle Endeca Server for your data store.
    • 2181 is the port used by the Cluster Coordinator (if you haven't changed it after installing the Cluster Coordinator).
    • My_cluster_coordinator_server.com is the host name used by the Cluster Coordinator. This is the host name of the leader node.
    • Specifying the location for --log and --out is optional. If not specified, the default endeca-server\logs directory is used to store the logs.
    Once the Dgraph process is running on the leader node, this node receives updates to the data files and configuration. The Cluster Coordinator propagates updates to the follower nodes.
  3. Note the leader node's port and host name.
    You will need to reference this information in the configuration for applications that need to send data and updates to the leader node, such as Integrator and Studio.

Now that you have started the leader node, you can add one or more follower nodes.