Class HanaConfig

    • Method Detail

      • getMountsDirectory

        public String getMountsDirectory()
        Return the path to the container-external mounts directory that can be used by the HANA docker container to store its data.

        The directory must be created before starting the docker container, for example, like this:

         sudo mkdir -p /data/<directory_name>
         sudo chown 12000:79 /data/<directory_name>
         
        Returns:
        The path to the external directory
      • setMountsDirectory

        public void setMountsDirectory​(String mountsDirectory)
        Set the path to the container-external mounts directory that can be used by the HANA docker image to store its data.
        Parameters:
        mountsDirectory - The path to the external directory
      • getPasswordsUrl

        public URL getPasswordsUrl()
        Return the URL of the file containing the default password(s) for the HANA database users.

        The file must contain passwords in a JSON format, for example:

         {
           "master_password" : "HXEHana1"
         }
         
        If the file is located in the container-external mounts directory (see getMountsDirectory()), the URL should be file:///hana/mounts/<file_name>.json
        Returns:
        The URL of the file containing the default password(s) for the HANA database users.
      • setPasswordsUrl

        public void setPasswordsUrl​(URL passwordsUrl)
        Set the URL of the file containing the default password(s) for the HANA database users.
        Parameters:
        passwordsUrl - The URL of the file containing the default password(s) for the HANA database users.
      • getInstanceNumber

        public String getInstanceNumber()
        Return the container-external instance number of the HANA database. A different instance number is necessary when running more than one instance of HANA on one host. The instance number can range from 00 to 99. The default instance number is 90.
        Returns:
        The container-external instance number of the HANA database.
      • setInstanceNumber

        public void setInstanceNumber​(String instanceNumber)
        Set the container-external instance number of the HANA database.
        Parameters:
        instanceNumber - The container-external instance number of the HANA database.
      • isAgreeToSapLicense

        public boolean isAgreeToSapLicense()
        Returns whether the user agrees to the SAP license for the HANA docker image.
        Returns:
        true if the user agrees to the license, false otherwise.
      • setAgreeToSapLicense

        public void setAgreeToSapLicense​(boolean agreeToSapLicense)
        Set whether the user agrees to the SAP license for the HANA docker image.
        Parameters:
        agreeToSapLicense - Whether the user agrees to the license or not
      • checkLicenseAgreement

        public boolean checkLicenseAgreement​(Properties properties)
        Check if the user has agreed to the SAP license
        Parameters:
        properties - The properties to check
        Returns:
        true if the user has agreed to the license, false otherwise
      • checkLicenseAgreement

        public static boolean checkLicenseAgreement()
        Check if the user has agreed to the SAP license
        Returns:
        true if the user has agreed to the license, false otherwise