Tabnine Logo
BookKeeperConfig.getBkWriteQuorumSize
Code IndexAdd Tabnine to your IDE (free)

How to use
getBkWriteQuorumSize
method
in
io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperConfig

Best Java code snippets using io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperConfig.getBkWriteQuorumSize (Showing top 2 results out of 315)

origin: pravega/pravega

/**
 * Creates a new Ledger in BookKeeper.
 *
 * @return A LedgerHandle for the new ledger.
 * @throws DataLogNotAvailableException If BookKeeper is unavailable or the ledger could not be created because an
 *                                      insufficient number of Bookies are available. The causing exception is wrapped
 *                                      inside it.
 * @throws DurableDataLogException      If another exception occurred. The causing exception is wrapped inside it.
 */
static LedgerHandle create(BookKeeper bookKeeper, BookKeeperConfig config) throws DurableDataLogException {
  try {
    return Exceptions.handleInterruptedCall(() ->
        bookKeeper.createLedger(
            config.getBkEnsembleSize(),
            config.getBkWriteQuorumSize(),
            config.getBkAckQuorumSize(),
            LEDGER_DIGEST_TYPE,
            config.getBKPassword()));
  } catch (BKException.BKNotEnoughBookiesException bkEx) {
    throw new DataLogNotAvailableException("Unable to create new BookKeeper Ledger.", bkEx);
  } catch (BKException bkEx) {
    throw new DurableDataLogException("Unable to create new BookKeeper Ledger.", bkEx);
  }
}
origin: pravega/pravega

@Test
public void testDefaultValues() {
  BookKeeperConfig cfg = BookKeeperConfig.builder()
      .build();
  Assert.assertEquals("localhost:2181", cfg.getZkAddress());
  Assert.assertEquals(Duration.ofMillis(10000), cfg.getZkSessionTimeout());
  Assert.assertEquals(Duration.ofMillis(10000), cfg.getZkConnectionTimeout());
  Assert.assertEquals("/segmentstore/containers", cfg.getZkMetadataPath());
  Assert.assertEquals(2, cfg.getZkHierarchyDepth());
  Assert.assertEquals(5, cfg.getMaxWriteAttempts());
  Assert.assertEquals(3, cfg.getBkEnsembleSize());
  Assert.assertEquals(2, cfg.getBkAckQuorumSize());
  Assert.assertEquals(3, cfg.getBkWriteQuorumSize());
  Assert.assertEquals(5000, cfg.getBkWriteTimeoutMillis());
  Assert.assertEquals(5000, cfg.getBkReadTimeoutMillis());
  Assert.assertEquals(1024 * 1024 * 1024, cfg.getBkLedgerMaxSize());
  Assert.assertEquals(0, cfg.getBKPassword().length);
  Assert.assertEquals("", cfg.getBkLedgerPath());
  Assert.assertEquals(false, cfg.isTLSEnabled());
  Assert.assertEquals("config/client.truststore.jks", cfg.getTlsTrustStore());
  Assert.assertEquals("", cfg.getTlsTrustStorePasswordPath());
}
io.pravega.segmentstore.storage.impl.bookkeeperBookKeeperConfiggetBkWriteQuorumSize

Popular methods of BookKeeperConfig

  • builder
    Creates a new ConfigBuilder that can be used to create instances of this class.
  • getBKPassword
    Gets a value representing the Password to use for the creation and access of each BK Ledger.
  • getBkAckQuorumSize
  • getBkEnsembleSize
  • getBkLedgerMaxSize
  • getBkLedgerPath
  • getBkReadTimeoutMillis
  • getBkWriteTimeoutMillis
  • getMaxWriteAttempts
  • getTlsTrustStore
  • getTlsTrustStorePasswordPath
  • getZkAddress
  • getTlsTrustStorePasswordPath,
  • getZkAddress,
  • getZkConnectionTimeout,
  • getZkHierarchyDepth,
  • getZkMetadataPath,
  • isTLSEnabled,
  • getZkSessionTimeout

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • compareTo (BigDecimal)
  • 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
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Runner (org.openjdk.jmh.runner)
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top PhpStorm 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