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

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

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

origin: pravega/pravega

/**
 * Creates a new instance of the BookKeeper log class.
 *
 * @param containerId     The Id of the Container whose BookKeeperLog to open.
 * @param zkClient        A reference to the CuratorFramework client to use.
 * @param bookKeeper      A reference to the BookKeeper client to use.
 * @param config          Configuration to use.
 * @param executorService An Executor to use for async operations.
 */
BookKeeperLog(int containerId, CuratorFramework zkClient, BookKeeper bookKeeper, BookKeeperConfig config, ScheduledExecutorService executorService) {
  Preconditions.checkArgument(containerId >= 0, "containerId must be a non-negative integer.");
  this.zkClient = Preconditions.checkNotNull(zkClient, "zkClient");
  this.bookKeeper = Preconditions.checkNotNull(bookKeeper, "bookKeeper");
  this.config = Preconditions.checkNotNull(config, "config");
  this.executorService = Preconditions.checkNotNull(executorService, "executorService");
  this.closed = new AtomicBoolean();
  this.logNodePath = HierarchyUtils.getPath(containerId, this.config.getZkHierarchyDepth());
  this.traceObjectId = String.format("Log[%d]", containerId);
  this.writes = new WriteQueue();
  val retry = createRetryPolicy(this.config.getMaxWriteAttempts(), this.config.getBkWriteTimeoutMillis());
  this.writeProcessor = new SequentialAsyncProcessor(this::processWritesSync, retry, this::handleWriteProcessorFailures, this.executorService);
  this.rolloverProcessor = new SequentialAsyncProcessor(this::rollover, retry, this::handleRolloverFailure, this.executorService);
  this.metrics = new BookKeeperMetrics.BookKeeperLog(containerId);
  this.metricReporter = this.executorService.scheduleWithFixedDelay(this::reportMetrics, REPORT_INTERVAL, REPORT_INTERVAL, TimeUnit.MILLISECONDS);
}
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.bookkeeperBookKeeperConfiggetZkHierarchyDepth

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Option (scala)
  • CodeWhisperer alternatives
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