gpt4 book ai didi

org.apache.helix.ZNRecord.getVersion()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-16 06:38:40 28 4
gpt4 key购买 nike

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

ZNRecord.getVersion介绍

[英]Get the version of this record
[中]获取此记录的版本

代码示例

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

int externalViewRecordVersion = externalView.getRecord().getVersion();
int lastKnownExternalViewVersion = _lastKnownExternalViewVersionMap.get(tableName);
 if (previousInstanceConfig.getRecord().getVersion() == currentInstanceConfig.getRecord().getVersion()) {
  continue;

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

String instanceName = instancesUsed.get(i);
int currentInstanceConfigVersion = instanceConfigStat.getVersion();
int lastKnownInstanceConfigVersion = _lastKnownInstanceConfigs.get(instanceName).getRecord().getVersion();

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

private void buildRoutingTable(String tableNameWithType, ExternalView externalView,
  List<InstanceConfig> instanceConfigs) {
 int externalViewRecordVersion = externalView.getRecord().getVersion();
 _lastKnownExternalViewVersionMap.put(tableNameWithType, externalViewRecordVersion);

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

return;
int currentVersionNumber = currentBrokerResource.getRecord().getVersion();
if (currentVersionNumber == _lastKnownBrokerResourceVersion.get()) {
 LOGGER.info("No qps quota change: external view for broker resource remains the same.");

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

@Test
public void testUpdateSegmentZKMetadata() {
 OfflineSegmentZKMetadata segmentZKMetadata = new OfflineSegmentZKMetadata();
 segmentZKMetadata.setTableName("testTable");
 segmentZKMetadata.setSegmentName("testSegment");
 // Segment ZK metadata does not exist
 Assert.assertFalse(_pinotHelixResourceManager.updateZkMetadata(segmentZKMetadata, 0));
 // Set segment ZK metadata
 Assert.assertTrue(_pinotHelixResourceManager.updateZkMetadata(segmentZKMetadata));
 // Update ZK metadata
 Assert.assertEquals(
   _pinotHelixResourceManager.getSegmentMetadataZnRecord("testTable_OFFLINE", "testSegment").getVersion(), 0);
 Assert.assertTrue(_pinotHelixResourceManager.updateZkMetadata(segmentZKMetadata, 0));
 Assert.assertEquals(
   _pinotHelixResourceManager.getSegmentMetadataZnRecord("testTable_OFFLINE", "testSegment").getVersion(), 1);
 Assert.assertFalse(_pinotHelixResourceManager.updateZkMetadata(segmentZKMetadata, 0));
}

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

.set(idealStateKey.getPath(), updatedIdealState.getRecord(), idealState.getRecord().getVersion(),
   AccessOption.PERSISTENT)) {
return true;

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

if (!_pinotHelixResourceManager.updateZkMetadata(existingSegmentZKMetadata, znRecord.getVersion())) {
 throw new ControllerApplicationException(LOGGER,
   "Failed to lock the segment: " + segmentName + " of table: " + offlineTableName + ", retry later",

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

LOGGER.info("Updating IdealState for table {}", tableName);
if (zkBaseDataAccessor
  .set(idealStateKey.getPath(), nextIdealState.getRecord(), currentIdealState.getRecord().getVersion(),
    AccessOption.PERSISTENT)) {

代码示例来源:origin: org.apache.helix/helix-core

/**
 * Initialize with a pre-populated ZNRecord, overwriting the identifier
 * @param record
 * @param id
 */
public ZNRecord(ZNRecord record, String id) {
 this(id);
 simpleFields.putAll(record.getSimpleFields());
 mapFields.putAll(record.getMapFields());
 listFields.putAll(record.getListFields());
 if (record.rawPayload != null) {
  rawPayload = new byte[record.rawPayload.length];
  System.arraycopy(record.rawPayload, 0, rawPayload, 0, record.rawPayload.length);
 } else {
  rawPayload = null;
 }
 _version = record.getVersion();
 _creationTime = record.getCreationTime();
 _modifiedTime = record.getModifiedTime();
}

代码示例来源:origin: apache/helix

/**
 * Initialize with a pre-populated ZNRecord, overwriting the identifier
 * @param record
 * @param id
 */
public ZNRecord(ZNRecord record, String id) {
 this(id);
 simpleFields.putAll(record.getSimpleFields());
 mapFields.putAll(record.getMapFields());
 listFields.putAll(record.getListFields());
 if (record.rawPayload != null) {
  rawPayload = new byte[record.rawPayload.length];
  System.arraycopy(record.rawPayload, 0, rawPayload, 0, record.rawPayload.length);
 } else {
  rawPayload = null;
 }
 _version = record.getVersion();
 _creationTime = record.getCreationTime();
 _modifiedTime = record.getModifiedTime();
 _ephemeralOwner = record.getEphemeralOwner();
}

代码示例来源:origin: org.apache.helix/helix-core

/**
 * Initialize the property with an existing ZNRecord with new record id
 * @param record
 * @param id
 */
public HelixProperty(ZNRecord record, String id) {
 _record = new ZNRecord(record, id);
 _stat = new Stat(_record.getVersion(), _record.getCreationTime(), _record.getModifiedTime());
}

代码示例来源:origin: apache/helix

/**
 * Initialize the property with an existing ZNRecord with new record id
 * @param record
 * @param id
 */
public HelixProperty(ZNRecord record, String id) {
 _record = new ZNRecord(record, id);
 _stat = new Stat(_record.getVersion(), _record.getCreationTime(), _record.getModifiedTime(), _record.getEphemeralOwner());
}

代码示例来源:origin: apache/helix

copy.setVersion(record.getVersion());
copy.setCreationTime(record.getCreationTime());
copy.setModifiedTime(record.getModifiedTime());

代码示例来源:origin: apache/helix

int v1 = ev.getRecord().getVersion();
int v2 = ev.getRecord().getVersion();
Assert.assertEquals(v2 > v1, true);

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