Get the configured hive.execution.engine. If not set it will default to the default value of HiveConf
762076
public String getHiveExecutionEngine() {
        String executionEngine = hiveConfSystemOverride.get(HiveConf.ConfVars.HIVE_EXECUTION_ENGINE.varname);
        return executionEngine == null ? HiveConf.ConfVars.HIVE_EXECUTION_ENGINE.getDefaultValue() : executionEngine;
    }
1251443
function getEngine(name) {
            if (!dbconfig.has(name)) {
                d.fatal("Trying to access data storage that is not configured:", name);
            }
            var conf = dbconfig.get(name);
            if (!conf.engine) {
                conf.engine = engine(conf.url);
            }
            return conf.engine;
        }
1011787
SessionHandle getSessionHandle(TOpenSessionReq req, TOpenSessionResp res)
      throws HiveSQLException, LoginException, IOException {
    String userName = getUserName(req);
    String ipAddress = getIpAddress();
    TProtocolVersion protocol = getMinVersion(CLIService.SERVER_VERSION,
        req.getClient_protocol());
    SessionHandle sessionHandle;
    if (cliService.getHiveConf().getBoolVar(ConfVars.HIVE_SERVER2_ENABLE_DOAS) &&
        (userName != null)) {
      String delegationTokenStr = getDelegationToken(userName);
      sessionHandle = cliService.openSessionWithImpersonation(protocol, userName,
          req.getPassword(), ipAddress, req.getConfiguration(), delegationTokenStr);
    } else {
      sessionHandle = cliService.openSession(protocol, userName, req.getPassword(),
          ipAddress, req.getConfiguration());
    }
    res.setServerProtocolVersion(protocol);
    return sessionHandle;
  }
445254
def _get_engine_filesystem_config(file_types, args, conf_args):
    
    file_types = [x.replace("_container", "") for x in list(file_types)]
    out = ""
    if "gcp" in file_types:
        out += _AUTH_CONFIG_GOOGLE
    if "s3" in file_types:
        out += _AUTH_CONFIG_AWS % conf_args["cloud_region"]
    if "gcp" in file_types or "http" in file_types or "s3" in file_types:
        out += "engine {\n"
        out += "  filesystems {\n"
        if "gcp" in file_types:
            out += '    gcs {\n'
            out += '      auth = "gcp-auth"\n'
            if args.cloud_project:
                out += '      project = "%s"\n' % args.cloud_project
            out += '    }\n'
        if "http" in file_types:
            out += '    http {}\n'
        if "s3" in file_types:
            out += '    s3 { auth = "default" }'
        out += "  }\n"
        out += "}\n"

    return out
457990
def engine(self):
        """"""

        if not self._engine:

            if 'postgres' in self.driver:

                if 'connect_args' not in self.engine_kwargs:
                    self.engine_kwargs['connect_args'] = {
                        'application_name': '{}:{}'.format(self._application_prefix, os.getpid())
                    }

                # For most use, a small pool is good to prevent connection exhaustion, but these settings may
                # be too low for the main public web application.

                self._engine = create_engine(self.dsn, echo=self._echo,
                                             pool_size=5, max_overflow=5, **self.engine_kwargs)

            else:
                self._engine = create_engine(
                    self.dsn, echo=self._echo, **self.engine_kwargs)

            #
            # Disconnect connections that have a different PID from the one they were created in.
            # This protects against re-use in multi-processing.
            #
            @event.listens_for(self._engine, 'connect')
            def connect(dbapi_connection, connection_record):
                connection_record.info['pid'] = os.getpid()

            @event.listens_for(self._engine, 'checkout')
            def checkout(dbapi_connection, connection_record, connection_proxy):

                from sqlalchemy.exc import DisconnectionError
                pid = os.getpid()
                if connection_record.info['pid'] != pid:

                    connection_record.connection = connection_proxy.connection = None
                    raise DisconnectionError(
                        "Connection record belongs to pid %s, attempting to check out in pid %s" %
                        (connection_record.info['pid'], pid))

            if self.driver == 'sqlite':
                @event.listens_for(self._engine, 'connect')
                def pragma_on_connect(dbapi_con, con_record):
                    """ISSUE some Sqlite pragmas when the connection is created."""

                    # dbapi_con.execute('PRAGMA foreign_keys = ON;')
                    # Not clear that there is a performance improvement.

                    # dbapi_con.execute('PRAGMA journal_mode = WAL')
                    dbapi_con.execute('PRAGMA synchronous = OFF')
                    dbapi_con.execute('PRAGMA temp_store = MEMORY')
                    dbapi_con.execute('PRAGMA cache_size = 500000')
                    if self._foreign_keys:
                        dbapi_con.execute('PRAGMA foreign_keys=ON')

            with self._engine.connect() as conn:
                _validate_version(conn, self.dsn)

        return self._engine
790495
def get_default_config(self):
        
        config = super(RiemannHandler, self).get_default_config()

        config.update({
            'host': '',
            'port': 123,
            'transport': 'tcp',
        })

        return config
997809
def get_config(self, key, default=None):
        ''' '''
        for conf in (self.config, self.app.conifg):
            if key in conf: return conf[key]
        return default
944391
def get_default_driver(self):
        
        if 'default' in self._config:
            return self._config['default']

        if len(self._config['stores']) == 1:
            return list(self._config['stores'].keys())[0]

        raise RuntimeError('Missing "default" cache in configuration.')
743450
def get_default_config(self):
        
        config = super(XENCollector, self).get_default_config()
        config.update({
            'path':     'xen'
        })
        return config
629924
@Override
  public Configuration getMainConfiguration() {

    return Tang.Factory.getTang().newConfigurationBuilder()
            .bindImplementation(RuntimeClasspathProvider.class, YarnClasspathProvider.class)
            .bindConstructor(org.apache.hadoop.yarn.conf.YarnConfiguration.class, YarnConfigurationConstructor.class)
            .build();
  }
642811
def default_run_conf(self):
        '''
        '''
        default_run_conf = namedtuple('default_run_conf', field_names=self._default_run_conf.keys())
        return default_run_conf(**self._default_run_conf)
260259
def get_default_config(self):
        
        config = super(MemoryCollector, self).get_default_config()
        config.update({
            'path': 'memory',
            'method': 'Threaded',
            'force_psutil': 'False'
            # Collect all the nodes or just a few standard ones?
            # Uncomment to enable
            # 'detailed': 'True'
        })
        return config
1190963
def get_default_config(self):
        
        config = super(ProcessStatCollector, self).get_default_config()
        config.update({
            'path':     'proc'
        })
        return config
66541
private static void setConf(String varname, String key, String varvalue, boolean register)
          throws IllegalArgumentException {
    HiveConf conf = SessionState.get().getConf();
    String value = new VariableSubstitution().substitute(conf, varvalue);
    if (conf.getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)) {
      HiveConf.ConfVars confVars = HiveConf.getConfVars(key);
      if (confVars != null) {
        if (!confVars.isType(value)) {
          StringBuilder message = new StringBuilder();
          message.append("'SET ").append(varname).append('=').append(varvalue);
          message.append("' FAILED because ").append(key).append(" expects ");
          message.append(confVars.typeString()).append(" type value.");
          throw new IllegalArgumentException(message.toString());
        }
        String fail = confVars.validate(value);
        if (fail != null) {
          StringBuilder message = new StringBuilder();
          message.append("'SET ").append(varname).append('=').append(varvalue);
          message.append("' FAILED in validation : ").append(fail).append('.');
          throw new IllegalArgumentException(message.toString());
        }
      } else if (key.startsWith("hive.")) {
        throw new IllegalArgumentException("hive configuration " + key + " does not exists.");
      }
    }
    conf.verifyAndSet(key, value);
    if (register) {
      SessionState.get().getOverriddenConfigurations().put(key, value);
    }
  }
939249
def get_default_config(self):
        
        config = super(CelerymonCollector, self).get_default_config()
        config.update({
            'host':     'localhost',
            'port':     '8989'
        })
        return config
962014
def get_default_config(self):
        
        config = super(HBaseCollector, self).get_default_config()
        config.update({
            'path':     'hbase',
            'metrics':  ['/var/log/hbase/*.metrics'],
        })
        return config
597286
def get_default_config(self):
        
        config = super(RabbitMQCollector, self).get_default_config()
        config.update({
            'path': 'rabbitmq',
            'host': 'localhost:55672',
            'user': 'guest',
            'password': 'guest',
            'replace_dot': False,
            'replace_slash': False,
            'queues_ignored': '',
            'cluster': False,
            'scheme': 'http',
            'query_individual_queues': False,
        })
        return config