gpt4 book ai didi

org.apache.pinot.common.metadata.ZKMetadataProvider.constructPropertyStorePathForSegment()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 06:24:49 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.pinot.common.metadata.ZKMetadataProvider.constructPropertyStorePathForSegment()方法的一些代码示例,展示了ZKMetadataProvider.constructPropertyStorePathForSegment()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZKMetadataProvider.constructPropertyStorePathForSegment()方法的具体详情如下:
包路径:org.apache.pinot.common.metadata.ZKMetadataProvider
类名称:ZKMetadataProvider
方法名:constructPropertyStorePathForSegment

ZKMetadataProvider.constructPropertyStorePathForSegment介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-pinot

public static boolean isSegmentExisted(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceNameForResource,
  String segmentName) {
 return propertyStore
   .exists(constructPropertyStorePathForSegment(resourceNameForResource, segmentName), AccessOption.PERSISTENT);
}

代码示例来源:origin: apache/incubator-pinot

public ZNRecord getSegmentMetadataZnRecord(String tableNameWithType, String segmentName) {
 return ZKMetadataProvider.getZnRecord(_propertyStore,
   ZKMetadataProvider.constructPropertyStorePathForSegment(tableNameWithType, segmentName));
}

代码示例来源:origin: apache/incubator-pinot

public LLCRealtimeSegmentZKMetadata getRealtimeSegmentZKMetadata(String realtimeTableName, String segmentName,
  Stat stat) {
 ZNRecord znRecord = _propertyStore
   .get(ZKMetadataProvider.constructPropertyStorePathForSegment(realtimeTableName, segmentName), stat,
     AccessOption.PERSISTENT);
 if (znRecord == null) {
  LOGGER.error("Segment metadata not found for table {}, segment {}. (can happen during table drop)",
    realtimeTableName, segmentName);
  throw new RuntimeException(
    "Segment metadata not found for table " + realtimeTableName + " segment " + segmentName);
 }
 return new LLCRealtimeSegmentZKMetadata(znRecord);
}

代码示例来源:origin: apache/incubator-pinot

@Nullable
public static OfflineSegmentZKMetadata getOfflineSegmentZKMetadata(
  @Nonnull ZkHelixPropertyStore<ZNRecord> propertyStore, @Nonnull String tableName, @Nonnull String segmentName) {
 String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(tableName);
 ZNRecord znRecord = propertyStore
   .get(constructPropertyStorePathForSegment(offlineTableName, segmentName), null, AccessOption.PERSISTENT);
 if (znRecord == null) {
  return null;
 }
 return new OfflineSegmentZKMetadata(znRecord);
}

代码示例来源:origin: apache/incubator-pinot

private OfflineSegmentZKMetadata getOfflineSegmentMetadata(String tableName, String segmentName) {
  return new OfflineSegmentZKMetadata(
    _propertyStore.get(ZKMetadataProvider.constructPropertyStorePathForSegment(tableName, segmentName), null, 0));
 }
}

代码示例来源:origin: apache/incubator-pinot

@Nullable
public static RealtimeSegmentZKMetadata getRealtimeSegmentZKMetadata(
  @Nonnull ZkHelixPropertyStore<ZNRecord> propertyStore, @Nonnull String tableName, @Nonnull String segmentName) {
 String realtimeTableName = TableNameBuilder.REALTIME.tableNameWithType(tableName);
 ZNRecord znRecord = propertyStore
   .get(constructPropertyStorePathForSegment(realtimeTableName, segmentName), null, AccessOption.PERSISTENT);
 // It is possible that the segment metadata has just been deleted due to retention.
 if (znRecord == null) {
  return null;
 }
 if (SegmentName.isHighLevelConsumerSegmentName(segmentName)) {
  return new RealtimeSegmentZKMetadata(znRecord);
 } else {
  return new LLCRealtimeSegmentZKMetadata(znRecord);
 }
}

代码示例来源:origin: apache/incubator-pinot

List<String> propStorePathList = new ArrayList<>(segmentsToDelete.size());
for (String segmentId : segmentsToDelete) {
 String segmentPropertyStorePath = ZKMetadataProvider.constructPropertyStorePathForSegment(tableName, segmentId);
 propStorePathList.add(segmentPropertyStorePath);

代码示例来源:origin: apache/incubator-pinot

public static boolean setOfflineSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore,
  OfflineSegmentZKMetadata offlineSegmentZKMetadata) {
 return propertyStore.set(constructPropertyStorePathForSegment(
   TableNameBuilder.OFFLINE.tableNameWithType(offlineSegmentZKMetadata.getTableName()),
   offlineSegmentZKMetadata.getSegmentName()), offlineSegmentZKMetadata.toZNRecord(), AccessOption.PERSISTENT);
}

代码示例来源:origin: apache/incubator-pinot

public static boolean setRealtimeSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore,
  RealtimeSegmentZKMetadata realtimeSegmentZKMetadata) {
 return propertyStore.set(constructPropertyStorePathForSegment(
   TableNameBuilder.REALTIME.tableNameWithType(realtimeSegmentZKMetadata.getTableName()),
   realtimeSegmentZKMetadata.getSegmentName()), realtimeSegmentZKMetadata.toZNRecord(), AccessOption.PERSISTENT);
}

代码示例来源:origin: apache/incubator-pinot

public static boolean setOfflineSegmentZKMetadata(ZkHelixPropertyStore<ZNRecord> propertyStore,
  OfflineSegmentZKMetadata offlineSegmentZKMetadata, int expectedVersion) {
 // NOTE: Helix will throw ZkBadVersionException if version does not match
 try {
  return propertyStore.set(constructPropertyStorePathForSegment(
    TableNameBuilder.OFFLINE.tableNameWithType(offlineSegmentZKMetadata.getTableName()),
    offlineSegmentZKMetadata.getSegmentName()), offlineSegmentZKMetadata.toZNRecord(), expectedVersion,
    AccessOption.PERSISTENT);
 } catch (ZkBadVersionException e) {
  return false;
 }
}

代码示例来源:origin: apache/incubator-pinot

private List<String> updateZkMetadataAndBuildSegmentList(Map<Integer, Integer> partitionSegmentCount,
  FakePropertyStore propertyStore)
  throws Exception {
 // Update segment zk metadata.
 List<String> segmentList = new ArrayList<>();
 int seqId = 0;
 for (int i = 0; i < NUM_SEGMENTS; i++) {
  int partitionId = i % NUM_PARTITION;
  partitionSegmentCount.put(partitionId, partitionSegmentCount.get(partitionId) + 1);
  LLCSegmentName segment = new LLCSegmentName(REALTIME_TABLE_NAME, partitionId, seqId, 0);
  String segmentName = segment.getSegmentName();
  SegmentZKMetadata metadata = buildSegmentZKMetadata(segmentName, partitionId);
  propertyStore
    .setContents(ZKMetadataProvider.constructPropertyStorePathForSegment(REALTIME_TABLE_NAME, segmentName),
      metadata.toZNRecord());
  segmentList.add(segmentName);
  if (partitionId % NUM_PARTITION == 0) {
   seqId++;
  }
 }
 return segmentList;
}

代码示例来源:origin: apache/incubator-pinot

.setContents(ZKMetadataProvider.constructPropertyStorePathForSegment(OFFLINE_TABLE_NAME, segmentName),
  metadata.toZNRecord());

代码示例来源:origin: apache/incubator-pinot

SegmentZKMetadata metadata = buildOfflineSegmentZKMetadata(segmentName, partition);
fakePropertyStore
  .setContents(ZKMetadataProvider.constructPropertyStorePathForSegment(OFFLINE_TABLE_NAME, segmentName),
    metadata.toZNRecord());

代码示例来源:origin: apache/incubator-pinot

ZKMetadataProvider.constructPropertyStorePathForSegment(realtimeTableName, newSegmentNameStr);

代码示例来源:origin: apache/incubator-pinot

ZKMetadataProvider.constructPropertyStorePathForSegment(realtimeTableName, committingSegmentNameStr);

代码示例来源:origin: apache/incubator-pinot

.setContents(ZKMetadataProvider.constructPropertyStorePathForSegment("myTable_OFFLINE", "someSegment_0"),
  offlineSegmentZKMetadata.toZNRecord());

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com