Package com.yahoo.vespa.defaults
Class Defaults
java.lang.Object
com.yahoo.vespa.defaults.Defaults
The defaults of basic Vespa configuration variables.
Use Defaults.getDefaults() to access the defaults of this runtime environment.
- Author:
- arnej27959, bratseth
-
Method Summary
Modifier and TypeMethodDescriptionstatic Defaults
Returns the defaults of this runtime environmentReturns the path where a Vespa application can store arbitrary files on the node.underVespaHome
(String path) Returns an absolute path produced by prepending vespaHome to the argument if it is relative.int
Returns port number used by config proxy server (RPC protocol)int
Returns port number used by cloud config server (REST api on HTTP)int
Returns port number used by cloud config server (for its RPC protocol)Returns the path to the root under which Vespa should read and write files.Compute the host name that identifies myself.int
Returns the base for port numbers where the Vespa services should listen.Get the username to own directories, files and processes.int
Returns the port number where Vespa web services should be available.
-
Method Details
-
vespaUser
Get the username to own directories, files and processes.- Returns:
- the vespa user name
-
vespaHostname
Compute the host name that identifies myself. Detection of the hostname is now done before starting any Vespa programs and provided in the environment variable VESPA_HOSTNAME; if that variable isn't set a default of "localhost" is always returned.- Returns:
- the vespa host name
-
temporaryApplicationStorage
Returns the path where a Vespa application can store arbitrary files on the node. This path is persistent during the lifetime of this node. The application must be able to recreate required files on its own (e.g. by downloading them from a remote source) if missing.- Returns:
- the local application storage path
-
vespaHome
Returns the path to the root under which Vespa should read and write files. Will not end with a "/".- Returns:
- the vespa home directory
-
underVespaHome
Returns an absolute path produced by prepending vespaHome to the argument if it is relative. If the path starts by "/" (absolute) or "./" (explicitly relative - useful for tests), it is returned as-is.- Parameters:
path
- the path to prepend vespaHome to unless it is absolute- Returns:
- the given path string with the root path given from vespaHome() prepended, unless the given path is absolute, in which case it is be returned as-is
-
vespaWebServicePort
public int vespaWebServicePort()Returns the port number where Vespa web services should be available.- Returns:
- the vespa webservice port
-
vespaPortBase
public int vespaPortBase()Returns the base for port numbers where the Vespa services should listen.- Returns:
- the vespa base number for ports
-
vespaConfigServerRpcPort
public int vespaConfigServerRpcPort()Returns port number used by cloud config server (for its RPC protocol) -
vespaConfigServerHttpPort
public int vespaConfigServerHttpPort()Returns port number used by cloud config server (REST api on HTTP) -
vespaConfigProxyRpcPort
public int vespaConfigProxyRpcPort()Returns port number used by config proxy server (RPC protocol) -
getDefaults
Returns the defaults of this runtime environment
-