def get_jvm_args(self, daemon_language, storlet_path, storlet_name,
                     pool_size, uds_path, log_level, container_id):
        """
        Check the input parameters, produce the list
        of arguments for JVM process launch

        :param daemon_language: Language the storlet is written on.
                                Now (01-Dec-2014) only Java is supported.
        :param storlet_path: Path to the folder where storlet JRE file is
        :param storlet_name: Storlet main class name
        :param pool_size: Number of threads that storlet daemon's thread
                          pool provides
        :param uds_path: Path to pipe daemon is going to listen to
        :param log_level: Logger verbosity level
        :param container_id: container id

        :returns: A tuple including the following three elements
                  - Error code, 0 if successful
                  - Error description
                  - A list of the JVM arguments
        """

        str_library_path = "/opt/ibm"
        str_prfx = "/opt/ibm/"

        # TODO(takashi): refactor this with using ':'.join
        str_dmn_clspth = str_prfx + ':'
        str_dmn_clspth = str_dmn_clspth + str_prfx + \
            'logback-classic-1.1.2.jar:'
        str_dmn_clspth = str_dmn_clspth + str_prfx + 'logback-core-1.1.2.jar:'
        str_dmn_clspth = str_dmn_clspth + str_prfx + 'slf4j-api-1.7.7.jar:'
        str_dmn_clspth = str_dmn_clspth + str_prfx + 'json_simple-1.1.jar:'
        str_dmn_clspth = str_dmn_clspth + str_prfx + 'SBusJavaFacade.jar:'
        str_dmn_clspth = str_dmn_clspth + str_prfx + 'SCommon.jar:'
        str_dmn_clspth = str_dmn_clspth + str_prfx + 'SDaemon.jar:'

        str_dmn_clspth = str_dmn_clspth + storlet_path

        self.logger.debug('START_DAEMON: daemon lang = %s' % daemon_language)
        self.logger.debug('START_DAEMON: str_dmn_clspth = %s' % str_dmn_clspth)
        self.logger.debug('START_DAEMON: storlet_name = %s' % storlet_name)
        self.logger.debug('START_DAEMON: pool_size = %d' % pool_size)
        self.logger.debug('START_DAEMON: uds_path = %s' % uds_path)
        self.logger.debug('START_DAEMON: log_level = %s' % log_level)

        # We know the Daemon class and its dependencies
        str_daemon_main_class = "com.ibm.storlet.daemon.SDaemon"

        n_error_id = 0
        error_text = ''
        pargs = []
        if daemon_language == "java":
            self.logger.debug('START_DAEMON:preparing arguments')
            # Setting two environmental variables
            # The path strings are corrupted if passed is pargs list below
            if os.environ.get('CLASSPATH'):
                str_dmn_clspth = os.environ['CLASSPATH'] + ':' \
                    + str_dmn_clspth
            if os.environ.get('LD_LIBRARY_PATH'):
                str_library_path = os.environ['LD_LIBRARY_PATH'] + ':' \
                    + str_library_path
            os.environ['CLASSPATH'] = str_dmn_clspth
            os.environ['LD_LIBRARY_PATH'] = str_library_path
            pargs = [str('/usr/bin/java'),
                     str(str_daemon_main_class),
                     str(storlet_name),
                     str(uds_path),
                     str(log_level),
                     str('%d' % pool_size),
                     str(container_id)]
            str_pargs = ' '.join(map(str, pargs))
            self.logger.debug('START_DAEMON: pargs = %s' % str_pargs)
        else:
            n_error_id = -1
            error_text = "Got unsupported daemon language %s" % pargs
            self.logger.error(error_text)

        return n_error_id, error_text, pargs
dataset/ETHPy150Open openstack/storlets/Engine/storlet_daemon_factory/daemon_factory.py/daemon_factory.get_jvm_args/original