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); }
public SegmentZKMetadata(ZNRecord znRecord) { _segmentName = znRecord.getSimpleField(CommonConstants.Segment.SEGMENT_NAME); _tableName = znRecord.getSimpleField(CommonConstants.Segment.TABLE_NAME); _crypterName = znRecord.getSimpleField(CommonConstants.Segment.CRYPTER_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); }
/** * Get the time that this message was created * @return UNIX timestamp */ public long getCreateTimeStamp() { return _record.getLongField(Attributes.CREATE_TIMESTAMP.toString(), 0L); }
/** * Get the missing top state duration threshold * @return */ public long getMissTopStateDurationThreshold() { return _record.getLongField(ClusterConfigProperty.MISS_TOP_STATE_DURATION_THRESHOLD.name(), Long.MAX_VALUE); }
/** * Get the expiry period (in milliseconds) * * @return */ public long getExpiryPeriod() { return _record.getLongField(Attributes.EXPIRY_PERIOD.name(), -1); }
/** * Get when these statistics were created * @return a UNIX timestamp */ public long getCreateTimeStamp() { return _record.getLongField(Attributes.CREATE_TIMESTAMP.toString(), 0L); }
public long getJobPurgeInterval() { return _record.getLongField(WorkflowConfigProperty.JobPurgeInterval.name(), DEFAULT_JOB_PURGE_INTERVAL); }
public long getTimeout() { return _record.getLongField(WorkflowConfigProperty.Timeout.name(), TaskConstants.DEFAULT_NEVER_TIMEOUT); }
public long getTimeout() { return _record.getLongField(WorkflowConfigProperty.Timeout.name(), TaskConstants.DEFAULT_NEVER_TIMEOUT); }
/** * Get when these statistics were created * @return a UNIX timestamp */ public long getCreateTimeStamp() { return _record.getLongField(Attributes.CREATE_TIMESTAMP.toString(), 0L); }
/** * Get the timestamp (milliseconds from epoch) when this instance was enabled/disabled last time. * * @return */ public long getInstanceEnabledTime() { return _record.getLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(), -1); }
/** * Get the time that execution occurred as a result of this message * @return UNIX timestamp */ public long getExecuteStartTimeStamp() { return _record.getLongField(Attributes.EXECUTE_START_TIMESTAMP.toString(), 0L); }
/** * Get the completion time of previous task associated with this message. * This applies only when this is a relay message, * which specified the completion time of the task running on the participant that sent this relay message. * * @return */ public long getRelayTime() { return _record.getLongField(Attributes.RELAY_TIME.name(), -1); }
/** * Set the frequency with which to rebalance * @return the rebalancing timer period */ public long getRebalanceTimerPeriod() { return _record.getLongField(IdealStateProperty.REBALANCE_TIMER_PERIOD.toString(), -1); }
/** * Get the time that this message was read * @return UNIX timestamp */ public long getReadTimeStamp() { return _record.getLongField(Attributes.READ_TIMESTAMP.toString(), 0L); }
/** * Set the frequency with which to rebalance * @return the rebalancing timer period */ public long getRebalanceTimerPeriod() { return _record.getLongField(IdealStateProperty.REBALANCE_TIMER_PERIOD.toString(), -1); }
/** * Get the timestamp (milliseconds from epoch) when this instance was enabled/disabled last time. * * @return */ public long getInstanceEnabledTime() { return _record.getLongField(InstanceConfigProperty.HELIX_ENABLED_TIMESTAMP.name(), -1); }
/** * Get rebalance delay time (in ms). * @return */ public long getRebalanceDelay() { return _record.getLongField(IdealStateProperty.REBALANCE_DELAY.name(), -1); }
public long getTaskRetryDelay() { return getRecord().getLongField(JobConfigProperty.TaskRetryDelay.name(), DEFAULT_TASK_RETRY_DELAY); }
public long getExecutionDelay() { return getRecord().getLongField(JobConfigProperty.DelayTime.name(), DEFAULT_Job_EXECUTION_DELAY_TIME); }