Equivalent to {@link FileSystem#get(Configuration)}, but uses the input {@link SharedResourcesBroker} to configure
add-ons to the {@link FileSystem} (e.g. throttling, instrumentation).
335922
public static <S extends ScopeType<S>> FileSystem get(Configuration configuration, SharedResourcesBroker<S> broker)
      throws IOException {
    return get(FileSystem.getDefaultUri(configuration), configuration, broker);
  }
1357434
public static systemdatasource get(nitro_service service) throws Exception{
		systemdatasource obj = new systemdatasource();
		systemdatasource[] response = (systemdatasource[])obj.get_resources(service);
		return response[0];
	}
1122958
public static systemcollectionparam get(nitro_service service) throws Exception{
		systemcollectionparam obj = new systemcollectionparam();
		systemcollectionparam[] response = (systemcollectionparam[])obj.get_resources(service);
		return response[0];
	}
1165451
@Override
    public Configuration getConfiguration() {
        try {
            globalLock.readLock().lock();
            return configuration;
        } finally {
            globalLock.readLock().unlock();
        }
    }
97048
public ConfigurationResult getConfiguration ()
        throws ServiceException
    {
        requireAdminUser();

        final ServletWaiter<ConfigurationResult> waiter =
            new ServletWaiter<ConfigurationResult>("getConfiguration");

        _omgr.postRunnable(new Runnable() {
            public void run () {
                Map<String, ConfigurationRecord> tabs = Maps.newHashMap();
                for (String key : _confReg.getKeys()) {
                    ConfigurationRecord record = buildRecord(key);
                    if (record == null) {
                        waiter.requestFailed(
                            new ServiceException(InvocationCodes.E_INTERNAL_ERROR));
                        return;
                    }
                    tabs.put(key, record);
                }

                ConfigurationResult result = new ConfigurationResult();
                result.records = tabs;
                waiter.requestCompleted(result);
            }
        });

        return waiter.waitForResult();
    }
109840
public Configuration getConfiguration() throws Exception {
        Configuration result = null;
        if (cfg.exists()) {

            userDir = new File(System.getProperty("user.dir")).getAbsolutePath();
            System.setProperty("user.dir", options.getExecutionDirectory().getAbsolutePath());
            try {
                ConfigurationManager manager = new ConfigurationManager(cfg, false);
                manager.executeConfigurationProviders();
                result = manager.getConfiguration();
            } finally {
                System.setProperty("user.dir", userDir);
            }
        }
        return result;
    }
602537
public static Config loadConfig(URL configUrl, boolean useSystemEnvironment) {
        return loadConfig(ConfigParseOptions.defaults(),
                ConfigResolveOptions.defaults().setUseSystemEnvironment(useSystemEnvironment),
                configUrl);
    }
132600
@Override
    public ResourceConfig getConfiguration() {
        ApplicationHandler handler = getApplicationHandler();
        return handler == null ? null : handler.getConfiguration();
    }
558108
public static <S extends ScopeType<S>> BasicDataSource get(Config config,
      SharedResourcesBroker<S> broker) throws IOException {
    try {
      return broker.getSharedResource(new MysqlDataSourceFactory<S>(),
          new MysqlDataSourceKey(MysqlStateStore.getDataSourceId(config), config));
    } catch (NotConfiguredException nce) {
      throw new IOException(nce);
    }
  }
256803
@RequestMapping(value = "configurations", method = RequestMethod.GET)
    public Resources<StashConfiguration> getConfigurations() {
        return Resources.of(
                configurationService.getConfigurations(),
                uri(on(getClass()).getConfigurations())
        )
                .with(Link.CREATE, uri(on(getClass()).getConfigurationForm()))
                .with("_test", uri(on(getClass()).testConfiguration(null)), securityService.isGlobalFunctionGranted(GlobalSettings.class))
                ;
    }
857347
public static Configuration get() {
    Configuration conf = new Configuration();
    File cloudConfigPath;
    if (isWindows()) {
      cloudConfigPath = new File(getEnvironment().get("APPDATA"), "gcloud");
    } else {
      cloudConfigPath = new File(System.getProperty("user.home"), ".config/gcloud");
    }
    File credentialFilePath = new File(cloudConfigPath, "application_default_credentials.json");
    if (!credentialFilePath.exists()) {
      return conf;
    }

    try {
      JsonFactory jsonFactory = Utils.getDefaultJsonFactory();
      InputStream inputStream = new FileInputStream(credentialFilePath);
      JsonObjectParser parser = new JsonObjectParser(jsonFactory);
      GenericJson fileContents = parser.parseAndClose(
          inputStream, Charsets.UTF_8, GenericJson.class);
      String fileType = (String) fileContents.get("type");
      if ("authorized_user".equals(fileType)) {
        String clientId = (String) fileContents.get("client_id");
        String clientSecret = (String) fileContents.get("client_secret");
        if (clientId != null && clientSecret != null) {
          LOG.debug("Using GCP user credential from '{}'", credentialFilePath);
          conf.setIfUnset("fs.gs.impl", GoogleHadoopFileSystem.class.getName());
          conf.setIfUnset("fs.AbstractFileSystem.gs.impl", GoogleHadoopFS.class.getName());
          conf.setIfUnset(GoogleHadoopFileSystemBase.GCS_PROJECT_ID_KEY, defaultProject());
          conf.setIfUnset(GoogleHadoopFileSystemBase.GCS_WORKING_DIRECTORY_KEY, "/hadoop");

          conf.setIfUnset(
              HadoopCredentialConfiguration.BASE_KEY_PREFIX +
              HadoopCredentialConfiguration.ENABLE_SERVICE_ACCOUNTS_SUFFIX,
              "false");
          conf.setIfUnset(
              HadoopCredentialConfiguration.BASE_KEY_PREFIX +
              HadoopCredentialConfiguration.CLIENT_ID_SUFFIX,
              clientId);
          conf.setIfUnset(
              HadoopCredentialConfiguration.BASE_KEY_PREFIX +
              HadoopCredentialConfiguration.CLIENT_SECRET_SUFFIX,
              clientSecret);
        }
      }
    } catch (IOException e) {
      LOG.warn("Failed to load GCP user credential from '{}'", credentialFilePath);
    }
    return conf;
  }
1155264
public static ResourceManager get() {
    ResourceManager resourceManager = (ResourceManager) instance.get();
    if(null == resourceManager) {
      resourceManager = new ResourceManager();
      instance.set(resourceManager);
    }
    return resourceManager;
  }
531076
public static JimfsFileSystem newFileSystem(
      JimfsFileSystemProvider provider, URI uri, Configuration config) throws IOException {
    PathService pathService = new PathService(config);
    FileSystemState state = new FileSystemState(removeFileSystemRunnable(uri));

    JimfsFileStore fileStore = createFileStore(config, pathService, state);
    FileSystemView defaultView = createDefaultView(config, fileStore, pathService);
    WatchServiceConfiguration watchServiceConfig = config.watchServiceConfig;

    JimfsFileSystem fileSystem =
        new JimfsFileSystem(provider, uri, fileStore, pathService, defaultView, watchServiceConfig);

    pathService.setFileSystem(fileSystem);
    return fileSystem;
  }
1183007
public static ns_conf_download_policy get(nitro_service client) throws Exception
	{
		ns_conf_download_policy resource = new ns_conf_download_policy();
		resource.validate("get");
		return ((ns_conf_download_policy[]) resource.get_resources(client))[0];
	}
1233200
public static Config loadConfig(File configFile, boolean useSystemEnvironment) {
        return loadConfig(ConfigParseOptions.defaults(),
                ConfigResolveOptions.defaults().setUseSystemEnvironment(useSystemEnvironment),
                configFile);
    }
570931
public org.apache.commons.configuration.Configuration getConfiguration(ConfigurationWrapper wrapper) {
		// get input streams
		List<ISource> sources = this.locate(wrapper);
		
		// create configuration combiner
		OverrideCombiner combiner = new OverrideCombiner();
		CombinedConfiguration combined = new CombinedConfiguration(combiner);
		
		// combine configurations
		for(ISource source : sources) {
			// determine mime type in order to create proper commons object
			SupportedType type = MimeGuesser.guess(source);
			
			// if the source isn't available, continue
			if(!source.available()) {
				continue;
			}
			
			InputStream stream = source.stream();
			
			// load properties based on MIME type
			// todo: update for more commons-configuration
			// supported mime types
			if(SupportedType.XML.equals(type)) {
				XMLConfiguration xmlConfiguration = new XMLConfiguration();
				try {
					xmlConfiguration.load(stream);
					combined.addConfiguration(xmlConfiguration);
				} catch(ConfigurationException e) {
					this.logger.error("An error occurred while reading XML properties: {}", e.getMessage());	
				}
			} else {
				PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration();
				try {
					propertiesConfiguration.load(stream);
					combined.addConfiguration(propertiesConfiguration);
				} catch (ConfigurationException e) {
					this.logger.error("An error occurred while reading properties: {}", e.getMessage());
				}				
			}
			
			// close stream
			try {
				stream.close();
			} catch (IOException e) {
				this.logger.trace("Could not close old stream: {}", stream);
			}
			
			// leave on first loop if merge is on
			if(!wrapper.merge()) {
				break;
			}
		}		
		// return configuration
		return combined;
	}
561930
public static system_settings get(nitro_service client) throws Exception
	{
		system_settings resource = new system_settings();
		resource.validate("get");
		return ((system_settings[]) resource.get_resources(client))[0];
	}