congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
TransactionServiceCheck
Code IndexAdd Tabnine to your IDE (free)

How to use
TransactionServiceCheck
in
co.cask.cdap.data.startup

Best Java code snippets using co.cask.cdap.data.startup.TransactionServiceCheck (Showing top 6 results out of 315)

origin: cdapio/cdap

@Override
public void run() throws Exception {
 LOG.info("Validating transaction service configuration.");
 int defaultTxTimeout = getConfiguredInteger(TxConstants.Manager.CFG_TX_TIMEOUT, "Default transaction timeout");
 int maxTxTimeout =  getConfiguredInteger(TxConstants.Manager.CFG_TX_MAX_TIMEOUT, "Transaction timeout limit");
 if (defaultTxTimeout > maxTxTimeout) {
  throw new IllegalArgumentException(String.format(
   "Default transaction timeout (%s) of %d seconds must not exceed the transaction timeout limit (%s) of %d",
   TxConstants.Manager.CFG_TX_TIMEOUT, defaultTxTimeout, TxConstants.Manager.CFG_TX_MAX_TIMEOUT, maxTxTimeout));
 }
 LOG.info("Transaction service configuration successfully validated.");
}
origin: caskdata/cdap

protected void run(CConfiguration cConf) throws Exception {
 new TransactionServiceCheck(cConf).run();
}
origin: caskdata/cdap

 protected void run(CConfiguration cConf) throws Exception {
  Configuration hConf = new Configuration();
  for (Map.Entry<String, String> entry : cConf) {
   hConf.set(entry.getKey(), entry.getValue());
  }
  new TransactionServiceCheck(hConf).run();
 }
}
origin: co.cask.cdap/cdap-data-fabric

@Override
public void run() throws Exception {
 LOG.info("Validating transaction service configuration.");
 int defaultTxTimeout = getConfiguredInteger(TxConstants.Manager.CFG_TX_TIMEOUT, "Default transaction timeout");
 int maxTxTimeout =  getConfiguredInteger(TxConstants.Manager.CFG_TX_MAX_TIMEOUT, "Transaction timeout limit");
 if (defaultTxTimeout > maxTxTimeout) {
  throw new IllegalArgumentException(String.format(
   "Default transaction timeout (%s) of %d seconds must not exceed the transaction timeout limit (%s) of %d",
   TxConstants.Manager.CFG_TX_TIMEOUT, defaultTxTimeout, TxConstants.Manager.CFG_TX_MAX_TIMEOUT, maxTxTimeout));
 }
 LOG.info("Transaction service configuration successfully validated.");
}
origin: cdapio/cdap

private int getConfiguredInteger(String propertyName, String description) {
 try {
  return getConfiguredInteger(propertyName);
 } catch (NullPointerException e) {
  throw new IllegalArgumentException(String.format("%s (%s) is not configured.", description, propertyName));
 } catch (NumberFormatException e) {
  throw new IllegalArgumentException(String.format("%s (%s) is not a number.", description, propertyName), e);
 }
}
origin: co.cask.cdap/cdap-data-fabric

private int getConfiguredInteger(String propertyName, String description) {
 try {
  return getConfiguredInteger(propertyName);
 } catch (NullPointerException e) {
  throw new IllegalArgumentException(String.format("%s (%s) is not configured.", description, propertyName));
 } catch (NumberFormatException e) {
  throw new IllegalArgumentException(String.format("%s (%s) is not a number.", description, propertyName), e);
 }
}
co.cask.cdap.data.startupTransactionServiceCheck

Javadoc

Startup check that validates the configuration of the transaction service.

Most used methods

  • <init>
  • getConfiguredInteger
  • run

Popular in Java

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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