当前位置: 首页>>代码示例>>Java>>正文


Java ZkHelixPropertyStore.exists方法代码示例

本文整理汇总了Java中org.apache.helix.store.zk.ZkHelixPropertyStore.exists方法的典型用法代码示例。如果您正苦于以下问题:Java ZkHelixPropertyStore.exists方法的具体用法?Java ZkHelixPropertyStore.exists怎么用?Java ZkHelixPropertyStore.exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.helix.store.zk.ZkHelixPropertyStore的用法示例。


在下文中一共展示了ZkHelixPropertyStore.exists方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getOfflineSegmentZKMetadataListForTable

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static List<OfflineSegmentZKMetadata> getOfflineSegmentZKMetadataListForTable(ZkHelixPropertyStore<ZNRecord> propertyStore, String tableName) {
  List<OfflineSegmentZKMetadata> resultList = new ArrayList<OfflineSegmentZKMetadata>();
  if (propertyStore == null) {
    return resultList;
  }
  String offlineTableName = TableNameBuilder.OFFLINE_TABLE_NAME_BUILDER.forTable(tableName);
  if (propertyStore.exists(constructPropertyStorePathForResource(offlineTableName), AccessOption.PERSISTENT)) {
    List<ZNRecord> znRecordList = propertyStore.getChildren(constructPropertyStorePathForResource(offlineTableName), null, AccessOption.PERSISTENT);
    if (znRecordList != null) {
      for (ZNRecord record : znRecordList) {
        resultList.add(new OfflineSegmentZKMetadata(record));
      }
    }
  }
  return resultList;
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:17,代码来源:ZKMetadataProvider.java

示例2: getRealtimeSegmentZKMetadataListForTable

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static List<RealtimeSegmentZKMetadata> getRealtimeSegmentZKMetadataListForTable(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
  List<RealtimeSegmentZKMetadata> resultList = new ArrayList<RealtimeSegmentZKMetadata>();
  if (propertyStore == null) {
    return resultList;
  }
  String realtimeTableName = TableNameBuilder.REALTIME_TABLE_NAME_BUILDER.forTable(resourceName);
  if (propertyStore.exists(constructPropertyStorePathForResource(realtimeTableName), AccessOption.PERSISTENT)) {
    List<ZNRecord> znRecordList = propertyStore.getChildren(constructPropertyStorePathForResource(realtimeTableName), null, AccessOption.PERSISTENT);
    if (znRecordList != null) {
      for (ZNRecord record : znRecordList) {
        resultList.add(new RealtimeSegmentZKMetadata(record));
      }
    }
  }
  return resultList;
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:17,代码来源:ZKMetadataProvider.java

示例3: getOfflineSegmentZKMetadataListForTable

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static List<OfflineSegmentZKMetadata> getOfflineSegmentZKMetadataListForTable(
    ZkHelixPropertyStore<ZNRecord> propertyStore, String tableName) {
  List<OfflineSegmentZKMetadata> resultList = new ArrayList<>();
  if (propertyStore == null) {
    return resultList;
  }
  String offlineTableName = TableNameBuilder.OFFLINE.tableNameWithType(tableName);
  if (propertyStore.exists(constructPropertyStorePathForResource(offlineTableName), AccessOption.PERSISTENT)) {
    List<ZNRecord> znRecordList =
        propertyStore.getChildren(constructPropertyStorePathForResource(offlineTableName), null,
            AccessOption.PERSISTENT);
    if (znRecordList != null) {
      for (ZNRecord record : znRecordList) {
        resultList.add(new OfflineSegmentZKMetadata(record));
      }
    }
  }
  return resultList;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:20,代码来源:ZKMetadataProvider.java

示例4: getRealtimeSegmentZKMetadataListForTable

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static List<RealtimeSegmentZKMetadata> getRealtimeSegmentZKMetadataListForTable(
    ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
  List<RealtimeSegmentZKMetadata> resultList = new ArrayList<>();
  if (propertyStore == null) {
    return resultList;
  }
  String realtimeTableName = TableNameBuilder.REALTIME.tableNameWithType(resourceName);
  if (propertyStore.exists(constructPropertyStorePathForResource(realtimeTableName), AccessOption.PERSISTENT)) {
    List<ZNRecord> znRecordList =
        propertyStore.getChildren(constructPropertyStorePathForResource(realtimeTableName), null,
            AccessOption.PERSISTENT);
    if (znRecordList != null) {
      for (ZNRecord record : znRecordList) {
        resultList.add(new RealtimeSegmentZKMetadata(record));
      }
    }
  }
  return resultList;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:20,代码来源:ZKMetadataProvider.java

示例5: setClusterTenantIsolationEnabled

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void setClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore, boolean isSingleTenantCluster) {
  if (!propertyStore.exists(constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY), AccessOption.PERSISTENT)) {
    ZNRecord znRecord = new ZNRecord(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
    znRecord.setBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, isSingleTenantCluster);
    propertyStore.set(constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY), znRecord, AccessOption.PERSISTENT);
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:8,代码来源:ZKMetadataProvider.java

示例6: getClusterTenantIsolationEnabled

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static Boolean getClusterTenantIsolationEnabled(ZkHelixPropertyStore<ZNRecord> propertyStore) {
  String controllerConfigPath = constructPropertyStorePathForControllerConfig(CLUSTER_TENANT_ISOLATION_ENABLED_KEY);
  if (propertyStore.exists(controllerConfigPath, AccessOption.PERSISTENT)) {
    ZNRecord znRecord = propertyStore.get(controllerConfigPath, null, AccessOption.PERSISTENT);
    if (znRecord.getSimpleFields().keySet().contains(CLUSTER_TENANT_ISOLATION_ENABLED_KEY)) {
      return znRecord.getBooleanField(CLUSTER_TENANT_ISOLATION_ENABLED_KEY, true);
    } else {
      return true;
    }
  } else {
    return true;
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:14,代码来源:ZKMetadataProvider.java

示例7: isSegmentExisted

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static boolean isSegmentExisted(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceNameForResource, String segmentName) {
  return propertyStore.exists(constructPropertyStorePathForSegment(resourceNameForResource, segmentName), AccessOption.PERSISTENT);
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:4,代码来源:ZKMetadataProvider.java

示例8: removeResourceSegmentsFromPropertyStore

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void removeResourceSegmentsFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
  String propertyStorePath = constructPropertyStorePathForResource(resourceName);
  if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
    propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:7,代码来源:ZKMetadataProvider.java

示例9: removeResourceConfigFromPropertyStore

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void removeResourceConfigFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceName) {
  String propertyStorePath = constructPropertyStorePathForResourceConfig(resourceName);
  if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
    propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:7,代码来源:ZKMetadataProvider.java

示例10: isSegmentExisted

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static boolean isSegmentExisted(ZkHelixPropertyStore<ZNRecord> propertyStore, String resourceNameForResource, String segmentName) {
  return propertyStore.exists(constructPropertyStorePathForSegment(resourceNameForResource, segmentName),
      AccessOption.PERSISTENT);
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:5,代码来源:ZKMetadataProvider.java

示例11: removeKafkaPartitionAssignmentFromPropertyStore

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void removeKafkaPartitionAssignmentFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore, String realtimeTableName) {
  String propertyStorePath = constructPropertyStorePathForKafkaPartitions(realtimeTableName);
  if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
    propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:7,代码来源:ZKMetadataProvider.java

示例12: removeInstancePartitionAssignmentFromPropertyStore

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入方法依赖的package包/类
public static void removeInstancePartitionAssignmentFromPropertyStore(ZkHelixPropertyStore<ZNRecord> propertyStore, String offlineTableName) {
  String propertyStorePath = constructPropertyStorePathForInstancePartitions(offlineTableName);
  if (propertyStore.exists(propertyStorePath, AccessOption.PERSISTENT)) {
    propertyStore.remove(propertyStorePath, AccessOption.PERSISTENT);
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:7,代码来源:ZKMetadataProvider.java


注:本文中的org.apache.helix.store.zk.ZkHelixPropertyStore.exists方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。