gpt4 book ai didi

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

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

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

ZKMetadataProvider.removeResourceConfigFromPropertyStore介绍

暂无

代码示例

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

@AfterMethod
public void afterMethod() {
 if (_helixManager instanceof FakeHelixManager) {
  _testPropertyStore.reset();
  ZKMetadataProvider.removeResourceConfigFromPropertyStore(_testPropertyStore, OFFLINE_TABLE_NAME);
  ZKMetadataProvider.removeResourceConfigFromPropertyStore(_testPropertyStore, REALTIME_TABLE_NAME);
 }
 _tableQueryQuotaManager.cleanUpRateLimiterMap();
}

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

/**
 * Drop the table from helix cluster.
 *
 * @param tableName: Name of table to be dropped.
 * @return
 */
public PinotResourceManagerResponse dropTable(String tableName) {
 if (!_helixAdmin.getResourcesInCluster(_helixClusterName).contains(tableName)) {
  return PinotResourceManagerResponse.failure("Table " + tableName + " not found");
 }
 if (getSegmentsFor(tableName).size() != 0) {
  return PinotResourceManagerResponse.failure("Table " + tableName + " has segments, drop them first");
 }
 _helixAdmin.dropResource(_helixClusterName, tableName);
 // remove from property store
 ZKMetadataProvider.removeResourceSegmentsFromPropertyStore(getPropertyStore(), tableName);
 ZKMetadataProvider.removeResourceConfigFromPropertyStore(getPropertyStore(), tableName);
 return PinotResourceManagerResponse.success("Table " + tableName + " dropped");
}

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

public void deleteOfflineTable(String tableName) {
 String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(tableName);
 // Remove the table from brokerResource
 HelixHelper.removeResourceFromBrokerIdealState(_helixZkManager, offlineTableName);
 // Drop the table
 if (_helixAdmin.getResourcesInCluster(_helixClusterName).contains(offlineTableName)) {
  _helixAdmin.dropResource(_helixClusterName, offlineTableName);
 }
 // Remove all segments for the table
 _segmentDeletionManager.removeSegmentsFromStore(offlineTableName, getSegmentsFor(offlineTableName));
 ZKMetadataProvider.removeResourceSegmentsFromPropertyStore(_propertyStore, offlineTableName);
 // Remove table config
 ZKMetadataProvider.removeResourceConfigFromPropertyStore(_propertyStore, offlineTableName);
 // Remove replica group partition assignment
 ZKMetadataProvider.removeInstancePartitionAssignmentFromPropertyStore(_propertyStore, offlineTableName);
}

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

public void deleteRealtimeTable(String tableName) {
 String realtimeTableName = TableNameBuilder.REALTIME.tableNameWithType(tableName);
 // Remove the table from brokerResource
 HelixHelper.removeResourceFromBrokerIdealState(_helixZkManager, realtimeTableName);
 // Cache the state and drop the table
 Set<String> instancesForTable = null;
 if (_helixAdmin.getResourcesInCluster(_helixClusterName).contains(realtimeTableName)) {
  instancesForTable = getAllInstancesForTable(realtimeTableName);
  _helixAdmin.dropResource(_helixClusterName, realtimeTableName);
 }
 // Remove all segments for the table
 _segmentDeletionManager.removeSegmentsFromStore(realtimeTableName, getSegmentsFor(realtimeTableName));
 ZKMetadataProvider.removeResourceSegmentsFromPropertyStore(_propertyStore, realtimeTableName);
 // Remove table config
 ZKMetadataProvider.removeResourceConfigFromPropertyStore(_propertyStore, realtimeTableName);
 // Remove groupId/PartitionId mapping for HLC table
 if (instancesForTable != null) {
  for (String instance : instancesForTable) {
   InstanceZKMetadata instanceZKMetadata = ZKMetadataProvider.getInstanceZKMetadata(_propertyStore, instance);
   if (instanceZKMetadata != null) {
    instanceZKMetadata.removeResource(realtimeTableName);
    ZKMetadataProvider.setInstanceZKMetadata(_propertyStore, instanceZKMetadata);
   }
  }
 }
}

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