Tabnine Logo
TopicMetadataCache.getCConfiguration
Code IndexAdd Tabnine 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)

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 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 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: 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);
   }
  }
 }
}
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);
   }
  }
 }
}
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

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • getResourceAsStream (ClassLoader)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Top 12 Jupyter Notebook extensions
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