The services parameter overrides the doradus.yaml file parameter
default_services, starting only the given optional services. The example above starts Doradus with the OLAP storage service. But the REST, Task Manager, and other optional services are not initialized. Note that Doradus always initializes the DB and Schema services, which are required. See the
doradus.yaml file
default_services option for a description of optional services that may be requested.
The services parameter must include full package name of each service. At least one storage service must be initialized otherwise
startEmbedded() will throw a
RuntimeException. If multiple storage services are provided, the first one becomes the default for new applications created via the embedded Doradus instance that do not explicitly declare a storage service.
Although startEmbedded() returns when all requested and requires services have started, a service may not be immediately ready to use. For example, the internal database service is not ready until a connection to Cassandra is established. Until it does, the schema service and all storage services also will not be ready. To ensure that a needed service is ready to use, the application can call the
waitForFullService() method. For example, to wait for the
OLAPService to be ready: