Tabnine Logo
Configuration.getSubset
Code IndexAdd Tabnine to your IDE (free)

How to use
getSubset
method
in
org.janusgraph.diskstorage.configuration.Configuration

Best Java code snippets using org.janusgraph.diskstorage.configuration.Configuration.getSubset (Showing top 7 results out of 315)

origin: JanusGraph/janusgraph

@Override
public Map<String, Object> getSubset(ConfigNamespace umbrella,
    String... umbrellaElements) {
  ImmutableMap.Builder<String, Object> b = ImmutableMap.builder();
  Map<String, Object> fm = first.getSubset(umbrella, umbrellaElements);
  Map<String, Object> sm = second.getSubset(umbrella, umbrellaElements);
  b.putAll(first.getSubset(umbrella, umbrellaElements));
  for (Map.Entry<String, Object> secondEntry : sm.entrySet()) {
    if (!fm.containsKey(secondEntry.getKey())) {
      b.put(secondEntry);
    }
  }
  return b.build();
}
@Override
origin: JanusGraph/janusgraph

@Override
public Map<String, Object> getSubset(ConfigNamespace umbrella, String... umbrellaElements) {
  return config.getSubset(umbrella,concat(umbrellaElements));
}
origin: org.janusgraph/janusgraph-es

static void applySettingsFromJanusGraphConf(Map<String, Object> settings,
                      Configuration config) {
  int keysLoaded = 0;
  final Map<String,Object> configSub = config.getSubset(ElasticSearchIndex.ES_CREATE_EXTRAS_NS);
  for (Map.Entry<String,Object> entry : configSub.entrySet()) {
    String key = entry.getKey();
    Object val = entry.getValue();
    if (null == val) continue;
    if (List.class.isAssignableFrom(val.getClass())) {
      // Pretty print lists using comma-separated values and no surrounding square braces for ES
      List l = (List) val;
      settings.put(key, Joiner.on(",").join(l));
    } else if (val.getClass().isArray()) {
      // As with Lists, but now for arrays
      // The Object copy[] business lets us avoid repetitive primitive array type checking and casting
      Object copy[] = new Object[Array.getLength(val)];
      for (int i= 0; i < copy.length; i++) {
        copy[i] = Array.get(val, i);
      }
      settings.put(key, Joiner.on(",").join(copy));
    } else {
      // Copy anything else unmodified
      settings.put(key, val.toString());
    }
    log.debug("[ES ext.* cfg] Set {}: {}", key, val);
    keysLoaded++;
  }
  log.debug("Loaded {} settings from the {} JanusGraph config namespace", keysLoaded, ElasticSearchIndex.ES_CREATE_EXTRAS_NS);
}
origin: org.apache.atlas/atlas-janusgraph-hbase2

Map<String,Object> configSub = config.getSubset(HBASE_CONFIGURATION_NAMESPACE);
for (Map.Entry<String,Object> entry : configSub.entrySet()) {
  logger.info("HBase configuration: setting {}={}", entry.getKey(), entry.getValue());
origin: org.janusgraph/janusgraph-hadoop

Map<String, Object> jobConfMap = conf.getSubset(confRoot);
for (Map.Entry<String, Object> jobConfEntry : jobConfMap.entrySet()) {
  hadoopJobConf.set((ConfigOption) ConfigElement.parse(confRoot, jobConfEntry.getKey()).element, jobConfEntry.getValue());
origin: org.janusgraph/janusgraph-hadoop-core

Map<String, Object> jobConfMap = conf.getSubset(confRoot);
for (Map.Entry<String, Object> jobConfEntry : jobConfMap.entrySet()) {
  hadoopJobConf.set((ConfigOption) ConfigElement.parse(confRoot, jobConfEntry.getKey()).element, jobConfEntry.getValue());
origin: org.janusgraph/janusgraph-es

allowMappingUpdate = config.get(ALLOW_MAPPING_UPDATE);
createSleep = config.get(CREATE_SLEEP);
ingestPipelines = config.getSubset(ES_INGEST_PIPELINES);
final ElasticSearchSetup.Connection c = interfaceConfiguration(config);
client = c.getClient();
org.janusgraph.diskstorage.configurationConfigurationgetSubset

Popular methods of Configuration

  • get
  • has
  • getContainedNamespaces
  • restrictTo

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • Kernel (java.awt.image)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now