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


Java ZNRecord.getLongField方法代码示例

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


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

示例1: OfflineSegmentZKMetadata

import org.apache.helix.ZNRecord; //导入方法依赖的package包/类
public OfflineSegmentZKMetadata(ZNRecord znRecord) {
  super(znRecord);
  setSegmentType(SegmentType.OFFLINE);
  _downloadUrl = znRecord.getSimpleField(CommonConstants.Segment.Offline.DOWNLOAD_URL);
  _pushTime = znRecord.getLongField(CommonConstants.Segment.Offline.PUSH_TIME, Long.MIN_VALUE);
  _refreshTime = znRecord.getLongField(CommonConstants.Segment.Offline.REFRESH_TIME, Long.MIN_VALUE);
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:8,代码来源:OfflineSegmentZKMetadata.java

示例2: SegmentZKMetadata

import org.apache.helix.ZNRecord; //导入方法依赖的package包/类
public SegmentZKMetadata(ZNRecord znRecord) {
  _segmentName = znRecord.getSimpleField(CommonConstants.Segment.SEGMENT_NAME);
  _tableName = znRecord.getSimpleField(CommonConstants.Segment.TABLE_NAME);
  _segmentType = znRecord.getEnumField(CommonConstants.Segment.SEGMENT_TYPE, SegmentType.class, SegmentType.OFFLINE);
  _startTime = znRecord.getLongField(CommonConstants.Segment.START_TIME, -1);
  _endTime = znRecord.getLongField(CommonConstants.Segment.END_TIME, -1);
  if (znRecord.getSimpleFields().containsKey(CommonConstants.Segment.TIME_UNIT) &&
      !znRecord.getSimpleField(CommonConstants.Segment.TIME_UNIT).equals(NULL)) {
    _timeUnit = znRecord.getEnumField(CommonConstants.Segment.TIME_UNIT, TimeUnit.class, TimeUnit.DAYS);
  }
  _indexVersion = znRecord.getSimpleField(CommonConstants.Segment.INDEX_VERSION);
  _totalDocs = znRecord.getLongField(CommonConstants.Segment.TOTAL_DOCS, -1);
  _crc = znRecord.getLongField(CommonConstants.Segment.CRC, -1);
  _creationTime = znRecord.getLongField(CommonConstants.Segment.CREATION_TIME, -1);
}
 
开发者ID:Hanmourang,项目名称:Pinot,代码行数:16,代码来源:SegmentZKMetadata.java

示例3: RebalanceConfig

import org.apache.helix.ZNRecord; //导入方法依赖的package包/类
/**
 * Instantiate from an znRecord
 *
 * @param znRecord
 */
public RebalanceConfig(ZNRecord znRecord) {
  _rebalanceDelay = znRecord.getLongField(RebalanceConfigProperty.REBALANCE_DELAY.name(), -1);
  _rebalanceMode = znRecord
      .getEnumField(RebalanceConfigProperty.REBALANCE_MODE.name(), RebalanceMode.class,
          RebalanceMode.NONE);
  _rebalancerClassName =
      znRecord.getSimpleField(RebalanceConfigProperty.REBALANCER_CLASS_NAME.name());
  _rebalanceStrategy = znRecord.getSimpleField(RebalanceConfigProperty.REBALANCE_STRATEGY.name());
  _delayRebalanceDisabled =
      znRecord.getBooleanField(RebalanceConfigProperty.DELAY_REBALANCE_DISABLED.name(), false);
  _rebalanceTimerPeriod =
      znRecord.getLongField(RebalanceConfigProperty.REBALANCE_TIMER_PERIOD.name(), -1);
}
 
开发者ID:apache,项目名称:helix,代码行数:19,代码来源:RebalanceConfig.java

示例4: SegmentZKMetadata

import org.apache.helix.ZNRecord; //导入方法依赖的package包/类
public SegmentZKMetadata(ZNRecord znRecord) {
  _segmentName = znRecord.getSimpleField(CommonConstants.Segment.SEGMENT_NAME);
  _tableName = znRecord.getSimpleField(CommonConstants.Segment.TABLE_NAME);
  _segmentType = znRecord.getEnumField(CommonConstants.Segment.SEGMENT_TYPE, SegmentType.class, SegmentType.OFFLINE);
  _startTime = znRecord.getLongField(CommonConstants.Segment.START_TIME, -1);
  _endTime = znRecord.getLongField(CommonConstants.Segment.END_TIME, -1);
  if (znRecord.getSimpleFields().containsKey(CommonConstants.Segment.TIME_UNIT) && !znRecord.getSimpleField(
      CommonConstants.Segment.TIME_UNIT).equals(NULL)) {
    setTimeUnit(znRecord.getEnumField(CommonConstants.Segment.TIME_UNIT, TimeUnit.class, TimeUnit.DAYS));
  }
  _indexVersion = znRecord.getSimpleField(CommonConstants.Segment.INDEX_VERSION);
  _totalRawDocs = znRecord.getLongField(CommonConstants.Segment.TOTAL_DOCS, -1);
  _crc = znRecord.getLongField(CommonConstants.Segment.CRC, -1);
  _creationTime = znRecord.getLongField(CommonConstants.Segment.CREATION_TIME, -1);

  try {
    String partitionMetadataJson = znRecord.getSimpleField(CommonConstants.Segment.PARTITION_METADATA);
    if (partitionMetadataJson != null) {
      _partitionMetadata = SegmentPartitionMetadata.fromJsonString(partitionMetadataJson);
    }
  } catch (IOException e) {
    LOGGER.error(
        "Exception caught while reading partition info from zk metadata for segment '{}', partition info dropped.",
        _segmentName, e);
  }
  _segmentUploadStartTime = znRecord.getLongField(CommonConstants.Segment.SEGMENT_UPLOAD_START_TIME, -1);
  _customMap = znRecord.getMapField(CommonConstants.Segment.CUSTOM_MAP);
}
 
开发者ID:linkedin,项目名称:pinot,代码行数:29,代码来源:SegmentZKMetadata.java


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