Package com.yahoo.vespa.defaults
Class Defaults
- java.lang.Object
-
- com.yahoo.vespa.defaults.Defaults
-
public class Defaults extends Object
The defaults of basic Vespa configuration variables. Use Defaults.getDefaults() to access the defaults of this runtime environment.- Author:
- arnej27959, bratseth
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Defaults
getDefaults()
Returns the defaults of this runtime environmentString
temporaryApplicationStorage()
Returns the path where a Vespa application can store arbitrary files on the node.String
underVespaHome(String path)
Returns an absolute path produced by prepending vespaHome to the argument if it is relative.int
vespaConfigProxyRpcPort()
int
vespaConfigServerHttpPort()
int
vespaConfigServerRpcPort()
String
vespaHome()
Returns the path to the root under which Vespa should read and write files.String
vespaHostname()
Compute the host name that identifies myself.int
vespaPortBase()
Returns the base for port numbers where the Vespa services should listen.String
vespaUser()
Get the username to own directories, files and processesint
vespaWebServicePort()
Returns the port number where Vespa web services should be available.
-
-
-
Method Detail
-
vespaUser
public String vespaUser()
Get the username to own directories, files and processes- Returns:
- the vespa user name
-
vespaHostname
public String 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
public String 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
public String 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
public String underVespaHome(String path)
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
public static Defaults getDefaults()
Returns the defaults of this runtime environment
-
-