Codota Logo
TopicMetadataCache.getCConfiguration
Code IndexAdd Codota to your IDE (free)

How to use
getCConfiguration
method
in
co.cask.cdap.messaging.TopicMetadataCache

Best Java code snippets using co.cask.cdap.messaging.TopicMetadataCache.getCConfiguration (Showing top 14 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Dictionary d =
  • Codota Iconnew Hashtable()
  • Codota IconBundle bundle;bundle.getHeaders()
  • Codota Iconnew Properties()
  • Smart code suggestions by Codota
}
origin: caskdata/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s. Compaction state " +
                 "will be recorded in table %s",
                env.getRegionInfo().getTable().getNameWithNamespaceInclAsString(), pruneTable));
   }
  }
 }
}
origin: cdapio/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s. Compaction state " +
                 "will be recorded in table %s",
                env.getRegionInfo().getTable().getNameWithNamespaceInclAsString(), pruneTable));
   }
  }
 }
}
origin: cdapio/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s. Compaction state " +
                 "will be recorded in table %s",
                env.getRegionInfo().getTable().getNameWithNamespaceInclAsString(), pruneTable));
   }
  }
 }
}
origin: cdapio/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
origin: cdapio/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    TableName tableName = env.getRegion().getRegionInfo().getTable();
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s:%s. Compaction state " +
                 "will be recorded in table %s", tableName.getNamespaceAsString(),
                tableName.getNameAsString(), pruneTable));
   }
  }
 }
}
origin: caskdata/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
origin: caskdata/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    TableName tableName = env.getRegion().getRegionInfo().getTable();
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s:%s. Compaction state " +
                 "will be recorded in table %s", tableName.getNamespaceAsString(),
                tableName.getNameAsString(), pruneTable));
   }
  }
 }
}
origin: cdapio/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    TableName tableName = env.getRegion().getRegionInfo().getTable();
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s:%s. Compaction state " +
                 "will be recorded in table %s", tableName.getNamespaceAsString(),
                tableName.getNameAsString(), pruneTable));
   }
  }
 }
}
origin: cdapio/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
origin: caskdata/cdap

private void initializePruneState(RegionCoprocessorEnvironment env) {
 CConfiguration conf = topicMetadataCache.getCConfiguration();
 if (conf != null) {
  pruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                 TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
  if (Boolean.TRUE.equals(pruneEnable)) {
   String pruneTable = conf.get(TxConstants.TransactionPruning.PRUNE_STATE_TABLE,
                  TxConstants.TransactionPruning.DEFAULT_PRUNE_STATE_TABLE);
   long pruneFlushInterval = TimeUnit.SECONDS.toMillis(conf.getLong(
    TxConstants.TransactionPruning.PRUNE_FLUSH_INTERVAL,
    TxConstants.TransactionPruning.DEFAULT_PRUNE_FLUSH_INTERVAL));
   compactionState = new CompactionState(env, TableName.valueOf(pruneTable), pruneFlushInterval);
   if (LOG.isDebugEnabled()) {
    TableName tableName = env.getRegion().getRegionInfo().getTable();
    LOG.debug(String.format("Automatic invalid list pruning is enabled for table %s:%s. Compaction state " +
                 "will be recorded in table %s", tableName.getNamespaceAsString(),
                tableName.getNameAsString(), pruneTable));
   }
  }
 }
}
origin: caskdata/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegion().getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
origin: caskdata/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegion().getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
origin: cdapio/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegion().getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
origin: cdapio/cdap

private void reloadPruneState(RegionCoprocessorEnvironment env) {
 if (pruneEnable == null) {
  // If prune enable has never been initialized, try to do so now
  initializePruneState(env);
 } else {
  CConfiguration conf = topicMetadataCache.getCConfiguration();
  if (conf != null) {
   boolean newPruneEnable = conf.getBoolean(TxConstants.TransactionPruning.PRUNE_ENABLE,
                        TxConstants.TransactionPruning.DEFAULT_PRUNE_ENABLE);
   if (newPruneEnable != pruneEnable) {
    // pruning enable has been changed, resetting prune state
    if (LOG.isDebugEnabled()) {
     LOG.debug(String.format("Transaction Invalid List pruning feature is set to %s now for region %s.",
                 newPruneEnable, env.getRegion().getRegionInfo().getRegionNameAsString()));
    }
    resetPruneState();
    initializePruneState(env);
   }
  }
 }
}
co.cask.cdap.messagingTopicMetadataCachegetCConfiguration

Popular methods of TopicMetadataCache

  • getTopicMetadata
  • <init>
  • getMetadataTable
  • startRefreshThread
  • updateCache
    Called in unit tests and since the refresh thread might invoke cache update at the same time, we mak

Popular in Java

  • Updating database using SQL prepared statement
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now