- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter.getAllocationData()
方法的一些代码示例,展示了ZKLogMetadataForWriter.getAllocationData()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKLogMetadataForWriter.getAllocationData()
方法的具体详情如下:
包路径:com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter
类名称:ZKLogMetadataForWriter
方法名:getAllocationData
暂无
代码示例来源:origin: twitter/distributedlog
LedgerAllocator createLedgerAllocator(ZKLogMetadataForWriter logMetadata) throws IOException {
LedgerAllocator ledgerAllocatorDelegator;
if (!dynConf.getEnableLedgerAllocatorPool()) {
QuorumConfigProvider quorumConfigProvider =
new DynamicQuorumConfigProvider(dynConf);
LedgerAllocator allocator = new SimpleLedgerAllocator(
logMetadata.getAllocationPath(),
logMetadata.getAllocationData(),
quorumConfigProvider,
writerZKC,
writerBKC);
ledgerAllocatorDelegator = new LedgerAllocatorDelegator(allocator, true);
} else {
ledgerAllocatorDelegator = ledgerAllocator;
}
return ledgerAllocatorDelegator;
}
代码示例来源:origin: twitter/distributedlog
@SuppressWarnings("unchecked")
@Test(timeout = 60000)
public void testProcessLogMetadatasNoAllocatorPath() throws Exception {
String rootPath = "/test-missing-version";
URI uri = DLMTestUtil.createDLMURI(2181, rootPath);
String logName = "test-log";
String logIdentifier = "<default>";
Versioned<byte[]> maxTxnIdData =
new Versioned<byte[]>(DLUtils.serializeTransactionId(1L), new ZkVersion(1));
Versioned<byte[]> logSegmentsData =
new Versioned<byte[]>(DLUtils.serializeLogSegmentSequenceNumber(1L), new ZkVersion(1));
List<Versioned<byte[]>> metadatas = Lists.newArrayList(
new Versioned<byte[]>(null, null),
new Versioned<byte[]>(null, null),
maxTxnIdData,
new Versioned<byte[]>(ZKLogMetadataForWriter.intToBytes(ZKLogMetadata.LAYOUT_VERSION), null),
new Versioned<byte[]>(new byte[0], new ZkVersion(1)),
new Versioned<byte[]>(new byte[0], new ZkVersion(1)),
logSegmentsData);
ZKLogMetadataForWriter metadata =
ZKLogMetadataForWriter.processLogMetadatas(uri, logName, logIdentifier, metadatas, false);
assertTrue(maxTxnIdData == metadata.getMaxTxIdData());
assertTrue(logSegmentsData == metadata.getMaxLSSNData());
assertNull(metadata.getAllocationData().getValue());
assertNull(metadata.getAllocationData().getVersion());
}
代码示例来源:origin: twitter/distributedlog
Versioned<byte[]> allocationData = logMetadata.getAllocationData();
assertEquals(0, allocationData.getValue().length);
代码示例来源:origin: twitter/distributedlog
@SuppressWarnings("unchecked")
@Test(timeout = 60000)
public void testProcessLogMetadatasAllocatorPath() throws Exception {
String rootPath = "/test-missing-version";
URI uri = DLMTestUtil.createDLMURI(2181, rootPath);
String logName = "test-log";
String logIdentifier = "<default>";
Versioned<byte[]> maxTxnIdData =
new Versioned<byte[]>(DLUtils.serializeTransactionId(1L), new ZkVersion(1));
Versioned<byte[]> logSegmentsData =
new Versioned<byte[]>(DLUtils.serializeLogSegmentSequenceNumber(1L), new ZkVersion(1));
Versioned<byte[]> allocationData =
new Versioned<byte[]>(DLUtils.ledgerId2Bytes(1L), new ZkVersion(1));
List<Versioned<byte[]>> metadatas = Lists.newArrayList(
new Versioned<byte[]>(null, null),
new Versioned<byte[]>(null, null),
maxTxnIdData,
new Versioned<byte[]>(ZKLogMetadataForWriter.intToBytes(ZKLogMetadata.LAYOUT_VERSION), null),
new Versioned<byte[]>(new byte[0], new ZkVersion(1)),
new Versioned<byte[]>(new byte[0], new ZkVersion(1)),
logSegmentsData,
allocationData);
ZKLogMetadataForWriter metadata =
ZKLogMetadataForWriter.processLogMetadatas(uri, logName, logIdentifier, metadatas, true);
assertTrue(maxTxnIdData == metadata.getMaxTxIdData());
assertTrue(logSegmentsData == metadata.getMaxLSSNData());
assertTrue(allocationData == metadata.getAllocationData());
}
}
本文整理了Java中com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter.checkLogMetadataPaths()方法的
本文整理了Java中com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter.pathExists()方法的一些代码示例,展示了Z
本文整理了Java中com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter.getAllocationData()方法的一些代码
本文整理了Java中com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter.getMaxTxIdData()方法的一些代码示例,
本文整理了Java中com.twitter.distributedlog.impl.metadata.ZKLogMetadataForWriter.getMaxLSSNData()方法的一些代码示例,
我是一名优秀的程序员,十分优秀!