@Override public ClientConfiguration getConf() { return super.getConf(); }
public ClientConfiguration getConf() { return super.getConf(); }
public ClientConfiguration getConf() { return bkc.getConf(); }
/** * Constructor. * * @param bk * @param ledgerId * @param digestType. Ignored if conf.getEnableDigestTypeAutodetection() is true * @param passwd * @param cb * @param ctx */ public LedgerOpenOp(BookKeeper bk, BookKeeperClientStats clientStats, long ledgerId, DigestType digestType, byte[] passwd, OpenCallback cb, Object ctx) { this.bk = bk; this.ledgerId = ledgerId; this.passwd = passwd; this.cb = cb; this.ctx = ctx; this.enableDigestAutodetection = bk.getConf().getEnableDigestTypeAutodetection(); this.suggestedDigestType = digestType; this.openOpLogger = clientStats.getOpenOpLogger(); }
throws InterruptedException { Set<LedgerFragment> partionedFragments = splitIntoSubFragments(lh, lf, bkc.getConf().getRereplicationEntryBatchSize()); LOG.info("Replicating fragment {} in {} sub fragments.", lf, partionedFragments.size());
public LedgerOpenOp(BookKeeper bk, BookKeeperClientStats clientStats, long ledgerId, OpenCallback cb, Object ctx) { this.bk = bk; this.ledgerId = ledgerId; this.cb = cb; this.ctx = ctx; this.passwd = bk.getConf().getBookieRecoveryPasswd(); this.administrativeOpen = true; this.enableDigestAutodetection = false; this.suggestedDigestType = bk.conf.getBookieRecoveryDigestType(); this.openOpLogger = clientStats.getOpenOpLogger(); }
/** * Trigger AuditTask by resetting lostBookieRecoveryDelay to its current * value. If Autorecovery is not enabled or if there is no Auditor then this * method will throw UnavailableException. * * @throws CompatibilityException * @throws KeeperException * @throws InterruptedException * @throws UnavailableException * @throws IOException */ public void triggerAudit() throws CompatibilityException, KeeperException, InterruptedException, UnavailableException, IOException { LedgerUnderreplicationManager urlManager = getUnderreplicationManager(); if (!urlManager.isLedgerReplicationEnabled()) { LOG.error("Autorecovery is disabled. So giving up!"); throw new UnavailableException("Autorecovery is disabled. So giving up!"); } BookieSocketAddress auditorId = AuditorElector.getCurrentAuditor(new ServerConfiguration(bkc.getConf()), bkc.getZkHandle()); if (auditorId == null) { LOG.error("No auditor elected, though Autorecovery is enabled. So giving up."); throw new UnavailableException("No auditor elected, though Autorecovery is enabled. So giving up."); } int previousLostBookieRecoveryDelayValue = urlManager.getLostBookieRecoveryDelay(); LOG.info("Resetting LostBookieRecoveryDelay value: {}, to kickstart audit task", previousLostBookieRecoveryDelayValue); urlManager.setLostBookieRecoveryDelay(previousLostBookieRecoveryDelayValue); }
return; } catch (NumberFormatException e) { LOG.error("Incorrectly entered parameter throttle: " + bk.getConf().getThrottleValue(), e); createComplete(BKException.Code.IncorrectParameterException, null); return;
metadataBuilder.withCustomMetadata(customMetadata); if (bk.getConf().getStoreSystemtimeAsLedgerCreationTime()) { metadataBuilder.withCreationTime(System.currentTimeMillis()).storingCreationTime(true);
return; } catch (NumberFormatException e) { LOG.error("Incorrectly entered parameter throttle: " + bk.getConf().getThrottleValue(), e); openComplete(BKException.Code.IncorrectParameterException, null); return;