• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ZkHelixPropertyStore类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ZkHelixPropertyStore类属于org.apache.helix.store.zk包,在下文中一共展示了ZkHelixPropertyStore类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getAssignedInstances

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@Override
public List<String> getAssignedInstances(HelixAdmin helixAdmin, ZkHelixPropertyStore<ZNRecord> propertyStore,
    String helixClusterName, SegmentMetadata segmentMetadata, int numReplicas, String tenantName) {
  String serverTenantName = ControllerTenantNameBuilder.getOfflineTenantNameForTenant(tenantName);
  final Random random = new Random(System.currentTimeMillis());

  List<String> allInstanceList =
      HelixHelper.getEnabledInstancesWithTag(helixAdmin, helixClusterName, serverTenantName);
  List<String> selectedInstanceList = new ArrayList<>();
  for (int i = 0; i < numReplicas; ++i) {
    final int idx = random.nextInt(allInstanceList.size());
    selectedInstanceList.add(allInstanceList.get(idx));
    allInstanceList.remove(idx);
  }
  LOGGER.info("Segment assignment result for : " + segmentMetadata.getName() + ", in resource : "
      + segmentMetadata.getTableName() + ", selected instances: " + Arrays.toString(selectedInstanceList.toArray()));

  return selectedInstanceList;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:20,代码来源:RandomAssignmentStrategy.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<>();
  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


示例3: buildInitialRealtimeIdealStateFor

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
public static IdealState buildInitialRealtimeIdealStateFor(String realtimeTableName,
    AbstractTableConfig realtimeTableConfig, HelixAdmin helixAdmin, String helixClusterName,
    ZkHelixPropertyStore<ZNRecord> zkHelixPropertyStore) {
  KafkaStreamMetadata kafkaStreamMetadata =
      new KafkaStreamMetadata(realtimeTableConfig.getIndexingConfig().getStreamConfigs());
  String realtimeServerTenant =
      ControllerTenantNameBuilder.getRealtimeTenantNameForTenant(realtimeTableConfig.getTenantConfig().getServer());
  switch (kafkaStreamMetadata.getConsumerType()) {
    case highLevel:
      IdealState idealState =
          buildInitialKafkaHighLevelConsumerRealtimeIdealStateFor(realtimeTableName, helixAdmin, helixClusterName,
              zkHelixPropertyStore);
      List<String> realtimeInstances = helixAdmin.getInstancesInClusterWithTag(helixClusterName, realtimeServerTenant);
      if (realtimeInstances.size() % Integer.parseInt(realtimeTableConfig.getValidationConfig().getReplication()) != 0) {
        throw new RuntimeException("Number of instance in current tenant should be an integer multiples of the number of replications");
      }
      setupInstanceConfigForKafkaHighLevelConsumer(realtimeTableName, realtimeInstances.size(),
          Integer.parseInt(realtimeTableConfig.getValidationConfig().getReplication()), realtimeTableConfig
              .getIndexingConfig().getStreamConfigs(), zkHelixPropertyStore, realtimeInstances);
      return idealState;
    case simple:
    default:
      throw new UnsupportedOperationException("Not support kafka consumer type: "
          + kafkaStreamMetadata.getConsumerType());
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:27,代码来源:PinotTableIdealStateBuilder.java


示例4: HelixExternalViewBasedRouting

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
public HelixExternalViewBasedRouting(RoutingTableBuilder defaultOfflineRoutingTableBuilder,
    RoutingTableBuilder defaultRealtimeRoutingTableBuilder, Map<String, RoutingTableBuilder> routingTableBuilderMap,
    ZkHelixPropertyStore<ZNRecord> propertyStore) {
  _timeBoundaryService = new HelixExternalViewBasedTimeBoundaryService(propertyStore);
  if (defaultOfflineRoutingTableBuilder != null) {
    _defaultOfflineRoutingTableBuilder = defaultOfflineRoutingTableBuilder;
  } else {
    _defaultOfflineRoutingTableBuilder = new BalancedRandomRoutingTableBuilder();
  }
  if (defaultRealtimeRoutingTableBuilder != null) {
    _defaultRealtimeRoutingTableBuilder = defaultRealtimeRoutingTableBuilder;
  } else {
    _defaultRealtimeRoutingTableBuilder = new KafkaHighLevelConsumerBasedRoutingTableBuilder();
  }
  if (routingTableBuilderMap != null) {
    _routingTableBuilderMap = routingTableBuilderMap;
  } else {
    _routingTableBuilderMap = new HashMap<String, RoutingTableBuilder>();
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:21,代码来源:HelixExternalViewBasedRouting.java


示例5: addingSegmentsToPropertyStore

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
private void addingSegmentsToPropertyStore(int numSegments, ZkHelixPropertyStore<ZNRecord> propertyStore,
    String tableName) {
  for (int i = 0; i < numSegments; ++i) {
    OfflineSegmentZKMetadata offlineSegmentZKMetadata = new OfflineSegmentZKMetadata();
    offlineSegmentZKMetadata.setSegmentName(tableName + "_" + System.currentTimeMillis() + "_" + i);
    offlineSegmentZKMetadata.setTimeUnit(TimeUnit.DAYS);
    offlineSegmentZKMetadata.setEndTime(i);
    offlineSegmentZKMetadata.setCrc(-1);
    offlineSegmentZKMetadata.setCreationTime(-1);
    offlineSegmentZKMetadata.setStartTime(i - 1);
    offlineSegmentZKMetadata.setIndexVersion("0");
    offlineSegmentZKMetadata.setPushTime(i + 5);
    offlineSegmentZKMetadata.setTableName(tableName);
    offlineSegmentZKMetadata.setSegmentType(SegmentType.OFFLINE);
    ZKMetadataProvider.setOfflineSegmentZKMetadata(_propertyStore, offlineSegmentZKMetadata);
  }
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:18,代码来源:TimeBoundaryServiceTest.java


示例6: 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


示例7: 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


示例8: execute

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@Override
public boolean execute()
    throws Exception {
  if (!_validateTableConfig && !_validateSchema) {
    throw new RuntimeException("Need to specify at least one of -schema and -tableConfig");
  }

  LOGGER.info("Connecting to Zookeeper: {}, cluster: ", _zkAddress, _clusterName);
  ZNRecordSerializer serializer = new ZNRecordSerializer();
  String path = PropertyPathConfig.getPath(PropertyType.PROPERTYSTORE, _clusterName);
  _helixPropertyStore = new ZkHelixPropertyStore<>(_zkAddress, serializer, path);

  LOGGER.info("\n\n-------------------- Starting Validation --------------------");
  if (_validateTableConfig) {
    validateTableConfig();
  }
  if (_validateSchema) {
    validateSchema();
  }

  return true;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:23,代码来源:ValidateConfigCommand.java


示例9: PinotZKChanger

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
public PinotZKChanger(String zkAddress, String clusterName) {
  this.clusterName = clusterName;
  helixAdmin = new ZKHelixAdmin(zkAddress);
  helixManager =
      HelixManagerFactory
          .getZKHelixManager(clusterName, "PinotNumReplicaChanger", InstanceType.ADMINISTRATOR, zkAddress);
  try {
    helixManager.connect();
  } catch (Exception e) {
    throw new RuntimeException(e);
  }
  ZNRecordSerializer serializer = new ZNRecordSerializer();
  String path = PropertyPathConfig.getPath(PropertyType.PROPERTYSTORE, clusterName);
  propertyStore = new ZkHelixPropertyStore<>(zkAddress, serializer, path);
  objectMapper = new ObjectMapper();
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:17,代码来源:PinotZKChanger.java


示例10: getAssignedInstances

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@Override
public List<String> getAssignedInstances(HelixAdmin helixAdmin, ZkHelixPropertyStore<ZNRecord> propertyStore,
    String helixClusterName, SegmentMetadata segmentMetadata, int numReplicas, String tenantName) {
  String serverTenantName = ControllerTenantNameBuilder.getOfflineTenantNameForTenant(tenantName);

  List<String> allInstances = HelixHelper.getEnabledInstancesWithTag(helixAdmin, helixClusterName, serverTenantName);
  List<String> selectedInstanceList = new ArrayList<>();
  if (segmentMetadata.getShardingKey() != null) {
    for (String instance : allInstances) {
      if (HelixHelper.getInstanceConfigsMapFor(instance, helixClusterName, helixAdmin)
          .get("shardingKey")
          .equalsIgnoreCase(segmentMetadata.getShardingKey())) {
        selectedInstanceList.add(instance);
      }
    }
    LOGGER.info("Segment assignment result for : " + segmentMetadata.getName() + ", in resource : "
        + segmentMetadata.getTableName() + ", selected instances: " + Arrays.toString(
        selectedInstanceList.toArray()));
    return selectedInstanceList;
  } else {
    throw new RuntimeException("Segment missing sharding key!");
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:24,代码来源:BucketizedSegmentStrategy.java


示例11: PinotLLCRealtimeSegmentManager

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
protected PinotLLCRealtimeSegmentManager(HelixAdmin helixAdmin, String clusterName, HelixManager helixManager,
    ZkHelixPropertyStore propertyStore, PinotHelixResourceManager helixResourceManager, ControllerConf controllerConf,
    ControllerMetrics controllerMetrics) {
  _helixAdmin = helixAdmin;
  _helixManager = helixManager;
  _propertyStore = propertyStore;
  _helixResourceManager = helixResourceManager;
  _clusterName = clusterName;
  _controllerConf = controllerConf;
  _controllerMetrics = controllerMetrics;
  _idealstateUpdateLocks = new Lock[NUM_LOCKS];
  for (int i = 0; i < NUM_LOCKS; i++) {
    _idealstateUpdateLocks[i] = new ReentrantLock();
  }
  _tableConfigCache = new TableConfigCache(_propertyStore);
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:17,代码来源:PinotLLCRealtimeSegmentManager.java


示例12: buildInitialHighLevelRealtimeIdealStateFor

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
public static IdealState buildInitialHighLevelRealtimeIdealStateFor(String realtimeTableName,
    TableConfig realtimeTableConfig, HelixAdmin helixAdmin, String helixClusterName,
    ZkHelixPropertyStore<ZNRecord> zkHelixPropertyStore) {
  String realtimeServerTenant =
      ControllerTenantNameBuilder.getRealtimeTenantNameForTenant(realtimeTableConfig.getTenantConfig().getServer());
  final List<String> realtimeInstances = helixAdmin.getInstancesInClusterWithTag(helixClusterName,
      realtimeServerTenant);
  IdealState idealState = buildEmptyKafkaConsumerRealtimeIdealStateFor(realtimeTableName, 1);
  if (realtimeInstances.size() % Integer.parseInt(realtimeTableConfig.getValidationConfig().getReplication()) != 0) {
    throw new RuntimeException(
        "Number of instance in current tenant should be an integer multiples of the number of replications");
  }
  setupInstanceConfigForKafkaHighLevelConsumer(realtimeTableName, realtimeInstances.size(),
      Integer.parseInt(realtimeTableConfig.getValidationConfig().getReplication()),
      realtimeTableConfig.getIndexingConfig().getStreamConfigs(), zkHelixPropertyStore, realtimeInstances);
  return idealState;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:18,代码来源:PinotTableIdealStateBuilder.java


示例13: testBulkDeleteWithFailures

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
public void testBulkDeleteWithFailures(boolean useSet) throws Exception {
  HelixAdmin helixAdmin =  makeHelixAdmin();
  ZkHelixPropertyStore<ZNRecord> propertyStore = makePropertyStore();
  FakeDeletionManager deletionManager = new FakeDeletionManager(helixAdmin, propertyStore);
  Collection<String> segments;
  if (useSet) {
    segments = new HashSet<String>();
  } else {
    segments = new ArrayList<String>();
  }

  segments.addAll(segmentsThatShouldBeDeleted());
  segments.addAll(segmentsInIdealStateOrExtView());
  segments.addAll(segmentsFailingPropStore());
  deletionManager.deleteSegmentsFromPropertyStoreAndLocal(tableName, segments);

  Assert.assertTrue(deletionManager.segmentsToRetry.containsAll(segmentsFailingPropStore()));
  Assert.assertTrue(deletionManager.segmentsToRetry.containsAll(segmentsInIdealStateOrExtView()));
  Assert.assertTrue(deletionManager.segmentsRemovedFromStore.containsAll(segmentsThatShouldBeDeleted()));
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:21,代码来源:SegmentDeletionManagerTest.java


示例14: init

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@Override
public void init(Configuration configuration, TableConfig tableConfig, ZkHelixPropertyStore<ZNRecord> propertyStore) {
  // TODO jfim This is a broker-level configuration for now, until we refactor the configuration of the routing table to allow per-table routing settings
  if (configuration.containsKey("offlineTargetServerCountPerQuery")) {
    final String targetServerCountPerQuery = configuration.getString("offlineTargetServerCountPerQuery");
    try {
      _targetNumServersPerQuery = Integer.parseInt(targetServerCountPerQuery);
      LOGGER.info("Using offline target server count of {}", _targetNumServersPerQuery);
    } catch (Exception e) {
      LOGGER.warn(
          "Could not get the offline target server count per query from configuration value {}, keeping default value {}",
          targetServerCountPerQuery, _targetNumServersPerQuery, e);
    }
  } else {
    LOGGER.info("Using default value for offline target server count of {}", _targetNumServersPerQuery);
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:18,代码来源:LargeClusterRoutingTableBuilder.java


示例15: init

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@Override
public void init(Configuration configuration, TableConfig tableConfig, ZkHelixPropertyStore<ZNRecord> propertyStore) {
  // TODO jfim This is a broker-level configuration for now, until we refactor the configuration of the routing table to allow per-table routing settings
  if (configuration.containsKey("realtimeTargetServerCountPerQuery")) {
    final String targetServerCountPerQuery = configuration.getString("realtimeTargetServerCountPerQuery");
    try {
      _targetNumServersPerQuery = Integer.parseInt(targetServerCountPerQuery);
      LOGGER.info("Using realtime target server count of {}", _targetNumServersPerQuery);
    } catch (Exception e) {
      LOGGER.warn(
          "Could not get the realtime target server count per query from configuration value {}, keeping default value {}",
          targetServerCountPerQuery, _targetNumServersPerQuery, e);
    }
  } else {
    LOGGER.info("Using default value for realtime target server count of {}", _targetNumServersPerQuery);
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:18,代码来源:KafkaLowLevelConsumerRoutingTableBuilder.java


示例16: getRealtimeSegmentZKMetadata

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@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);
  }
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:17,代码来源:ZKMetadataProvider.java


示例17: 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


示例18: getTableDataManager

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
public static TableDataManager getTableDataManager(@Nonnull TableDataManagerConfig tableDataManagerConfig,
    @Nonnull String instanceId, @Nonnull ZkHelixPropertyStore<ZNRecord> propertyStore,
    @Nonnull ServerMetrics serverMetrics) {
  String tableDataManagerType = tableDataManagerConfig.getTableDataManagerType().toUpperCase();
  TableDataManager tableDataManager;
  switch (tableDataManagerType) {
    case OFFLINE_TABLE_DATA_MANAGER_TYPE:
      tableDataManager = new OfflineTableDataManager();
      break;
    case REALTIME_TABLE_DATA_MANAGER_TYPE:
      tableDataManager = new RealtimeTableDataManager();
      break;
    default:
      throw new UnsupportedOperationException(
          "Unsupported table data manager type: " + tableDataManagerType + " for table: "
              + tableDataManagerConfig.getTableName());
  }
  tableDataManager.init(tableDataManagerConfig, instanceId, propertyStore, serverMetrics);
  return tableDataManager;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:21,代码来源:TableDataManagerProvider.java


示例19: init

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
@Override
public void init(@Nonnull TableDataManagerConfig tableDataManagerConfig, @Nonnull String instanceId,
    @Nonnull ZkHelixPropertyStore<ZNRecord> propertyStore, @Nonnull ServerMetrics serverMetrics) {
  _tableDataManagerConfig = tableDataManagerConfig;
  _instanceId = instanceId;
  _propertyStore = propertyStore;
  _serverMetrics = serverMetrics;

  _tableName = tableDataManagerConfig.getTableName();
  _tableDataDir = tableDataManagerConfig.getDataDir();
  _indexDir = new File(_tableDataDir);
  if (!_indexDir.exists()) {
    Preconditions.checkState(_indexDir.mkdirs());
  }
  _logger = LoggerFactory.getLogger(_tableName + "-" + getClass().getSimpleName());

  doInit();

  _logger.info("Initialized table: {} with data directory: {}", _tableName, _tableDataDir);
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:21,代码来源:AbstractTableDataManager.java


示例20: makeTestableManager

import org.apache.helix.store.zk.ZkHelixPropertyStore; //导入依赖的package包/类
private OfflineTableDataManager makeTestableManager() throws Exception {
  OfflineTableDataManager tableDataManager = new OfflineTableDataManager();
  TableDataManagerConfig config;
  {
    config = mock(TableDataManagerConfig.class);
    when(config.getTableName()).thenReturn(tableName);
    when(config.getDataDir()).thenReturn(_tmpDir.getAbsolutePath());
  }
  tableDataManager.init(config, "dummyInstance", mock(ZkHelixPropertyStore.class),
      new ServerMetrics(new MetricsRegistry()));
  tableDataManager.start();
  Field segsMapField = AbstractTableDataManager.class.getDeclaredField("_segmentsMap");
  segsMapField.setAccessible(true);
  _internalSegMap = (Map<String, OfflineSegmentDataManager>)segsMapField.get(tableDataManager);
  return tableDataManager;
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:17,代码来源:OfflineTableDataManagerTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SerializationFeature类代码示例发布时间:2022-05-22
下一篇:
Java PersistableBundleCompat类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap