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

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

Best Java code snippets using io.pravega.segmentstore.storage.impl.bookkeeper.BookKeeperConfig.getBkEnsembleSize (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.bookkeeperBookKeeperConfiggetBkEnsembleSize

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
  • getBkLedgerMaxSize
  • getBkLedgerPath
  • getBkReadTimeoutMillis
  • getBkWriteQuorumSize
  • getBkWriteTimeoutMillis
  • getMaxWriteAttempts
  • getTlsTrustStore
  • getTlsTrustStorePasswordPath
  • getZkAddress
  • getTlsTrustStorePasswordPath,
  • getZkAddress,
  • getZkConnectionTimeout,
  • getZkHierarchyDepth,
  • getZkMetadataPath,
  • isTLSEnabled,
  • getZkSessionTimeout

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • startActivity (Activity)
  • putExtra (Intent)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Best IntelliJ 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