gpt4 book ai didi

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

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

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

ZKMetadataProvider.getRealtimeSegmentZKMetadata介绍

[英]NOTE: this method is very expensive, use #getSegments(ZkHelixPropertyStore,String) instead if only segment segment names are needed.
[中]注意:此方法非常昂贵,如果只需要段名称,请使用#getSegments(ZkHelixPropertyStore,String)。

代码示例

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

/**
 * Returns the LLC realtime segment ZK metadata for the given table and segment.
 *
 * @param realtimeTableName Realtime table name
 * @param segmentName Segment name (String)
 * @return LLC realtime segment ZK metadata
 */
@VisibleForTesting
protected LLCRealtimeSegmentZKMetadata getSegmentMetadata(String realtimeTableName, String segmentName) {
 return (LLCRealtimeSegmentZKMetadata) ZKMetadataProvider
   .getRealtimeSegmentZKMetadata(_propertyStore, realtimeTableName, segmentName);
}

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

private long getNumRowsFromRealtimeMetadata(String segmentName) {
 RealtimeSegmentZKMetadata segmentZKMetadata =
   ZKMetadataProvider.getRealtimeSegmentZKMetadata(_propertyStore, TABLE_NAME, segmentName);
 return segmentZKMetadata.getTotalRawDocs();
}

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

if (segmentZKMetadata == null || segmentZKMetadata.getPartitionMetadata() == null
  || segmentZKMetadata.getPartitionMetadata().getColumnPartitionMap().size() == 0) {
 segmentZKMetadata = ZKMetadataProvider.getRealtimeSegmentZKMetadata(_propertyStore, tableName, segmentName);
 if (segmentZKMetadata != null) {
  _segmentToZkMetadataMapping.put(segmentName, segmentZKMetadata);

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

throws Exception {
RealtimeSegmentZKMetadata realtimeSegmentZKMetadata =
  ZKMetadataProvider.getRealtimeSegmentZKMetadata(_propertyStore, _tableNameWithType, segmentName);
Preconditions.checkNotNull(realtimeSegmentZKMetadata);

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

ZKMetadataProvider.getRealtimeSegmentZKMetadata(_propertyStore, segmentName.getTableName(), segmentNameStr);
 segmentDataManager.goOnlineFromConsuming(metadata);
} catch (InterruptedException e) {

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

/**
 * Returns the segment metadata.
 *
 * @param tableNameWithType Table name with type suffix
 * @param segmentName Segment name
 * @return Singleton JSON array of the segment metadata
 */
private ArrayNode getSegmentMetaData(String tableNameWithType, String segmentName) {
 ZkHelixPropertyStore<ZNRecord> propertyStore = _pinotHelixResourceManager.getPropertyStore();
 if (!ZKMetadataProvider.isSegmentExisted(propertyStore, tableNameWithType, segmentName)) {
  return null;
 }
 ArrayNode ret = JsonUtils.newArrayNode();
 ObjectNode jsonObj = JsonUtils.newObjectNode();
 jsonObj.put(TABLE_NAME, tableNameWithType);
 if (TableNameBuilder.OFFLINE.tableHasTypeSuffix(tableNameWithType)) {
  // OFFLINE table
  OfflineSegmentZKMetadata offlineSegmentZKMetadata =
    ZKMetadataProvider.getOfflineSegmentZKMetadata(propertyStore, tableNameWithType, segmentName);
  jsonObj.set(STATE, JsonUtils.objectToJsonNode(offlineSegmentZKMetadata.toMap()));
 } else {
  // REALTIME table
  RealtimeSegmentZKMetadata realtimeSegmentZKMetadata =
    ZKMetadataProvider.getRealtimeSegmentZKMetadata(propertyStore, tableNameWithType, segmentName);
  jsonObj.set(STATE, JsonUtils.objectToJsonNode(realtimeSegmentZKMetadata.toMap()));
 }
 ret.add(jsonObj);
 return ret;
}

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

HLCSegmentName segName = new HLCSegmentName(partition);
RealtimeSegmentZKMetadata realtimeSegmentZKMetadata = ZKMetadataProvider
  .getRealtimeSegmentZKMetadata(_pinotHelixResourceManager.getPropertyStore(), segName.getTableName(),
    partition);
if (realtimeSegmentZKMetadata == null) {

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

.getRealtimeSegmentZKMetadata(_pinotHelixResourceManager.getPropertyStore(),
    tableConfig.getTableName(), segmentName);
if (realtimeSegmentZKMetadata == null) {

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