Class Defaults


  • public class Defaults
    extends java.lang.Object
    The defaults of basic Vespa configuration variables. Use Defaults.getDefaults() to access the defaults of this runtime environment.
    Author:
    arnej27959, bratseth
    • Method Detail

      • vespaUser

        public java.lang.String vespaUser()
        Get the username to own directories, files and processes
        Returns:
        the vespa user name
      • vespaHostname

        public java.lang.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
      • vespaHome

        public java.lang.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 java.lang.String underVespaHome​(java.lang.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