attach-ds command

The attach-ds command attaches and starts an Endeca data store.

Running the attach-ds command makes the Endeca Server know about an Endeca data store and its parameters. That is, the Endeca data store is registered with the Endeca Server.

The main pre-requisite for this command is that the data files for the specified Endeca data store must exist. This means that:
  • You can run this command to re-attach a detached Endeca data store (that is, a data store against which the detach-ds command has been run). In this use case, the detached Endeca data store's data files are re-used.
  • You can run this command to create a new Endeca data store by pointing (via the --data-files option) to the data files of another Endeca data store. In this use case, both Endeca data stores are using the same data files. For example, if you are using the Endeca Clustering feature, you would use this method to create a follower node that is using the same data files as the leader node.

In both use cases, the Endeca data store's Dgraph process is started, thus making the data store open for use.

The syntax for the attach-ds command is:
endeca-cmd attach-ds <datastore-name> [global-options] [attach-options]
where datastore-name is the name of an existing, detached Endeca data store.
The <attach-options> are optional, and defaults will be used for omitted options.
Attach Option Meaning
--ws-port <num> Specifies the Web service port number to be used for the Endeca data store's Dgraph process. The port number cannot be in use by any other process on the machine (including another Endeca data store). Defaults to a port number in the default range specified on the Endeca Server.
--bulk-load-port <num> Specifies the port number for bulk load ingest operations for the Endeca data store's Dgraph process. This port number must be different from the port specified by the --ws-port flag and cannot be in use by any other process on the machine. If the --bulk-load-port flag is not used, then the bulk load port number defaults to a port number in the default range specified on the Endeca Server.
--data-files <path> Specifies the absolute path of an existing data files directory to use. Use this option for:
  • A detached data store whose data files are not in default location configured in the Endeca Server.
  • A new data store that will use the data files from another data store.
--startup-timeout <seconds> Specifies the maximum length of time (in seconds) that is allowed for the Endeca data store's Dgraph process to start up. Default is 60 seconds.
--shutdown-timeout <seconds> Specifies the maximum length of time (in seconds) that is allowed for the Endeca data store's Dgraph process to shut down. Default is 60 seconds.
--args --usage Provides a list of the Dgraph process flags.
--args <dgraph-flags> Specifies a list of Dgraph flags that will be used for the Endeca data store's Dgraph process. The --args flag must be the last flag on the command line as all of its arguments are passed on to the Dgraph process.

attach-ds errors

If datastore-name does not exist, the Endeca Server returns an error message similar to this example:
Data files don't exist: C:\Endeca\Apps\bikes_indexes

This error can also occur if the Endeca data store does exist but is in a non-default location. In this case, use the --data-files flag, as in the example below.

attach-ds examples

Example 1:
endeca-cmd attach-ds books
attaches an Endeca data store named books in the default location and starts it. The Endeca data store's Dgraph port and bulk load port numbers are assigned by the Endeca Server, and both the startup and shutdown timeout settings are 60 seconds. This is the simplest use case because it uses no attach flags.
Example 2:
endeca-cmd attach-ds wine --data-files c:\myapps\wine --args --threads 6
attaches an Endeca data store named wine in the C:\MyApps directory. The command also uses the --args flag to set the thread count at 6.