作者热门文章
- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.pinot.common.metadata.ZKMetadataProvider.setOfflineSegmentZKMetadata()
方法的一些代码示例,展示了ZKMetadataProvider.setOfflineSegmentZKMetadata()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKMetadataProvider.setOfflineSegmentZKMetadata()
方法的具体详情如下:
包路径:org.apache.pinot.common.metadata.ZKMetadataProvider
类名称:ZKMetadataProvider
方法名:setOfflineSegmentZKMetadata
暂无
代码示例来源:origin: apache/incubator-pinot
public boolean updateZkMetadata(@Nonnull OfflineSegmentZKMetadata segmentMetadata, int expectedVersion) {
return ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, segmentMetadata, expectedVersion);
}
代码示例来源:origin: apache/incubator-pinot
public boolean updateZkMetadata(@Nonnull OfflineSegmentZKMetadata segmentMetadata) {
return ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, segmentMetadata);
}
代码示例来源:origin: apache/incubator-pinot
public void addNewSegment(@Nonnull SegmentMetadata segmentMetadata, @Nonnull String downloadUrl, String crypter) {
String segmentName = segmentMetadata.getName();
String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(segmentMetadata.getTableName());
// NOTE: must first set the segment ZK metadata before trying to update ideal state because server will need the
// segment ZK metadata to download and load the segment
OfflineSegmentZKMetadata offlineSegmentZKMetadata = new OfflineSegmentZKMetadata();
offlineSegmentZKMetadata = ZKMetadataUtils.updateSegmentMetadata(offlineSegmentZKMetadata, segmentMetadata);
offlineSegmentZKMetadata.setDownloadUrl(downloadUrl);
offlineSegmentZKMetadata.setCrypterName(crypter);
offlineSegmentZKMetadata.setPushTime(System.currentTimeMillis());
if (!ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, offlineSegmentZKMetadata)) {
throw new RuntimeException(
"Failed to set segment ZK metadata for table: " + offlineTableName + ", segment: " + segmentName);
}
LOGGER.info("Added segment: {} of table: {} to property store", segmentName, offlineTableName);
addNewOfflineSegment(segmentMetadata);
LOGGER.info("Added segment: {} of table: {} to ideal state", segmentName, offlineTableName);
}
代码示例来源:origin: apache/incubator-pinot
if (!ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, offlineSegmentZKMetadata)) {
throw new RuntimeException(
"Failed to update ZK metadata for segment: " + segmentName + " of table: " + offlineTableName);
代码示例来源:origin: apache/incubator-pinot
offlineSegmentZKMetadata.setTableName(OFFLINE_TABLE_NAME);
offlineSegmentZKMetadata.setSegmentName(segmentName);
ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, offlineSegmentZKMetadata);
List<OfflineSegmentZKMetadata> retrievedMetadataList =
_helixResourceManager.getOfflineSegmentMetadata(OFFLINE_TABLE_NAME);
代码示例来源:origin: apache/incubator-pinot
private void addingSegmentsToPropertyStore(int numSegments, String tableName) {
for (int i = 0; i < numSegments; ++i) {
OfflineSegmentZKMetadata offlineSegmentZKMetadata = new OfflineSegmentZKMetadata();
offlineSegmentZKMetadata.setSegmentName(tableName + "_" + System.currentTimeMillis() + "_" + i);
offlineSegmentZKMetadata.setTableName(tableName);
offlineSegmentZKMetadata.setStartTime(i - 1);
offlineSegmentZKMetadata.setEndTime(i);
offlineSegmentZKMetadata.setTimeUnit(TimeUnit.DAYS);
offlineSegmentZKMetadata.setCrc(-1);
offlineSegmentZKMetadata.setCreationTime(-1);
offlineSegmentZKMetadata.setIndexVersion("0");
offlineSegmentZKMetadata.setPushTime(i + 5);
offlineSegmentZKMetadata.setSegmentType(SegmentType.OFFLINE);
ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, offlineSegmentZKMetadata);
}
}
本文整理了Java中org.apache.pinot.common.metadata.ZKMetadataProvider.setOfflineSegmentZKMetadata()方法的一些代码示例
我是一名优秀的程序员,十分优秀!