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

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

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

origin: JanusGraph/janusgraph

public AbstractStoreManager(Configuration storageConfig) {
  batchLoading = storageConfig.get(STORAGE_BATCH);
  boolean transactional = storageConfig.get(STORAGE_TRANSACTIONAL);
  if (batchLoading) {
    transactional = false;
  }
  this.transactional = transactional;
  this.storageConfig = storageConfig;
}
origin: JanusGraph/janusgraph

public TestMockLog(Configuration config) {
  this.failAdds = config.get(LOG_MOCK_FAILADD);
  this.senderId = config.get(UNIQUE_INSTANCE_ID);
  this.times = config.get(TIMESTAMP_PROVIDER);
}
origin: JanusGraph/janusgraph

public String getBackendDescription() {
  String className = configuration.get(STORAGE_BACKEND);
  if (className.equalsIgnoreCase("berkeleyje")) {
    return className + ":" + configuration.get(STORAGE_DIRECTORY);
  } else {
    return className + ":" + Arrays.toString(configuration.get(STORAGE_HOSTS));
  }
}
origin: JanusGraph/janusgraph

public FulgoraGraphComputer(final StandardJanusGraph graph, final Configuration configuration) {
  this.graph = graph;
  this.writeBatchSize = configuration.get(GraphDatabaseConfiguration.BUFFER_SIZE);
  this.readBatchSize = this.writeBatchSize * 10;
  this.name = "compute" + computerCounter.incrementAndGet();
}
origin: JanusGraph/janusgraph

private void configureMetricsGraphiteReporter() {
  if (configuration.has(GRAPHITE_HOST)) {
    MetricManager.INSTANCE.addGraphiteReporter(configuration.get(GRAPHITE_HOST),
        configuration.get(GRAPHITE_PORT),
        configuration.get(GRAPHITE_PREFIX),
        configuration.get(GRAPHITE_INTERVAL));
  }
}
origin: JanusGraph/janusgraph

public AbstractIDAuthority(Configuration config) {
  this.uid = config.get(UNIQUE_INSTANCE_ID);
  this.uidBytes = uid.getBytes(UTF8_CHARSET);
  this.isActive = false;
  this.idApplicationWaitMS =
      config.get(GraphDatabaseConfiguration.IDAUTHORITY_WAIT);
  this.metricsPrefix = GraphDatabaseConfiguration.getSystemMetricsPrefix();
}
origin: JanusGraph/janusgraph

private void configureMetricsCsvReporter() {
  if (configuration.has(METRICS_CSV_DIR)) {
    MetricManager.INSTANCE.addCsvReporter(configuration.get(METRICS_CSV_INTERVAL), configuration.get(METRICS_CSV_DIR));
  }
}
origin: JanusGraph/janusgraph

public TestMockIndexProvider(Configuration config) {
  this.index = Backend.getImplementationClass(config, config.get(INDEX_BACKEND_PROXY),
      StandardIndexProvider.getAllProviderClasses());
  this.failAdds = config.get(INDEX_MOCK_FAILADD);
}
origin: JanusGraph/janusgraph

public EntryMetaData[] getMetaDataSchema(String storeName) {
  List<EntryMetaData> schemaBuilder = Lists.newArrayList();
  StoreFeatures features = getFeatures();
  if (features.hasTimestamps() && storageConfig.get(STORE_META_TIMESTAMPS,storeName))
    schemaBuilder.add(EntryMetaData.TIMESTAMP);
  if (features.hasCellTTL() && storageConfig.get(STORE_META_TTL,storeName))
    schemaBuilder.add(EntryMetaData.TTL);
  if (features.hasVisibility() && storageConfig.get(STORE_META_VISIBILITY,storeName))
    schemaBuilder.add(EntryMetaData.VISIBILITY);
  if (schemaBuilder.isEmpty()) return StaticArrayEntry.EMPTY_SCHEMA;
  return schemaBuilder.toArray(new EntryMetaData[schemaBuilder.size()]);
}
origin: JanusGraph/janusgraph

public static KeyColumnValueStoreManager getStorageManager(Configuration storageConfig) {
  StoreManager manager = getImplementationClass(storageConfig, storageConfig.get(STORAGE_BACKEND),
      StandardStoreManager.getAllManagerClasses());
  if (manager instanceof OrderedKeyValueStoreManager) {
    manager = new OrderedKeyValueStoreManagerAdapter((OrderedKeyValueStoreManager) manager,
      ImmutableMap.of(EDGESTORE_NAME, 8, EDGESTORE_NAME + LOCK_STORE_SUFFIX, 8,
        storageConfig.get(IDS_STORE_NAME), 8));
  }
  Preconditions.checkArgument(manager instanceof KeyColumnValueStoreManager,"Invalid storage manager: %s",manager.getClass());
  return (KeyColumnValueStoreManager) manager;
}
origin: JanusGraph/janusgraph

public KCVSConfiguration(BackendOperation.TransactionalProvider txProvider, Configuration config,
             KeyColumnValueStore store, String identifier) throws BackendException {
  Preconditions.checkArgument(txProvider!=null && store!=null && config!=null);
  Preconditions.checkArgument(StringUtils.isNotBlank(identifier));
  this.txProvider = txProvider;
  this.times = config.get(TIMESTAMP_PROVIDER);
  this.store = store;
  this.rowKey = string2StaticBuffer(identifier);
  this.serializer = new StandardSerializer();
}
origin: JanusGraph/janusgraph

@Override
public <O> O get(ConfigOption<O> option, String... umbrellaElements) {
  if (first.has(option, umbrellaElements))
    return first.get(option, umbrellaElements);
  if (second.has(option, umbrellaElements))
    return second.get(option, umbrellaElements);
  return option.getDefaultValue();
}
@Override
origin: JanusGraph/janusgraph

@Override
public <O> O get(ConfigOption<O> option, String... umbrellaElements) {
  if (option.getNamespace().hasUmbrella())
    return config.get(option,concat(umbrellaElements));
  else
    return config.get(option);
}
origin: JanusGraph/janusgraph

private static LogManager getLogManager(Configuration config, String logName, KeyColumnValueStoreManager sm) {
  Configuration logConfig = config.restrictTo(logName);
  String backend = logConfig.get(LOG_BACKEND);
  if (backend.equalsIgnoreCase(LOG_BACKEND.getDefaultValue())) {
    return new KCVSLogManager(sm,logConfig);
  } else {
    Preconditions.checkArgument(config!=null);
    LogManager lm = getImplementationClass(logConfig,logConfig.get(LOG_BACKEND),REGISTERED_LOG_MANAGERS);
    Preconditions.checkNotNull(lm);
    return lm;
  }
}
origin: JanusGraph/janusgraph

private void configureMetricsConsoleReporter() {
  if (configuration.has(METRICS_CONSOLE_INTERVAL)) {
    MetricManager.INSTANCE.addConsoleReporter(configuration.get(METRICS_CONSOLE_INTERVAL));
  }
}
origin: JanusGraph/janusgraph

private static String getSuffix(Configuration config) {
  final String suffix;
  if (config.has(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID_SUFFIX)) {
    suffix = LongEncoding.encode(config.get(
        GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID_SUFFIX));
  } else if (!config.has(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID_HOSTNAME)) {
    suffix = ManagementFactory.getRuntimeMXBean().getName() + LongEncoding.encode(INSTANCE_COUNTER.incrementAndGet());
  } else {
    suffix = "";
  }
  return suffix;
}
origin: JanusGraph/janusgraph

public static String getOrGenerateUniqueInstanceId(Configuration config) {
  String uid;
  if (!config.has(UNIQUE_INSTANCE_ID)) {
    uid = computeUniqueInstanceId(config);
    log.info("Generated {}={}", UNIQUE_INSTANCE_ID.getName(), uid);
  } else {
    uid = config.get(UNIQUE_INSTANCE_ID);
  }
  Preconditions.checkArgument(!StringUtils.containsAny(uid,ConfigElement.ILLEGAL_CHARS),"Invalid unique identifier: %s",uid);
  return uid;
}
origin: JanusGraph/janusgraph

public String getDefaultFieldName(final PropertyKey key, final Parameter[] parameters, final String indexName) {
  Preconditions.checkArgument(!ParameterType.MAPPED_NAME.hasParameter(parameters),"A field name mapping has been specified for key: %s",key);
  Preconditions.checkArgument(containsIndex(indexName),"Unknown backing index: %s",indexName);
  final String fieldname = configuration.get(INDEX_NAME_MAPPING,indexName)?key.name():keyID2Name(key);
  return mixedIndexes.get(indexName).mapKey2Field(fieldname,
      new StandardKeyInformation(key,parameters));
}
origin: JanusGraph/janusgraph

@Override
public StoreTransaction openTx() throws BackendException {
  return storeManagerLocking.beginTransaction(StandardBaseTransactionConfig.of(
      configuration.get(TIMESTAMP_PROVIDER),
      storeFeatures.getKeyConsistentTxConfig()));
}
origin: JanusGraph/janusgraph

private static KCVSConfiguration getConfiguration(final BackendOperation.TransactionalProvider txProvider,
                            final KeyColumnValueStore store, final String identifier,
                            final Configuration config) {
  try {
    KCVSConfiguration keyColumnValueStoreConfiguration =
        new KCVSConfiguration(txProvider,config,store,identifier);
    keyColumnValueStoreConfiguration.setMaxOperationWaitTime(config.get(SETUP_WAITTIME));
    return keyColumnValueStoreConfiguration;
  } catch (BackendException e) {
    throw new JanusGraphException("Could not open global configuration",e);
  }
}
org.janusgraph.diskstorage.configurationConfigurationget

Popular methods of Configuration

  • has
  • getSubset
  • getContainedNamespaces
  • restrictTo

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • From CI to AI: The AI layer in your organization
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