// SetPartition sets the Partition field's value.
16078
func (s *Resource) SetPartition(v string) *Resource {
	s.Partition = &v
	return s
}
1053487
func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput {
	s.PartLastByte = &v
	return s
}
1019311
func (cgi *ConsumergroupInstance) ReleasePartition(topic string, partition int32) error {
	owner, err := cgi.cg.PartitionOwner(topic, partition)
	if err != nil {
		return err
	}
	if owner == nil || owner.ID != cgi.ID {
		return ErrPartitionNotClaimed
	}

	node := fmt.Sprintf("%s/consumers/%s/owners/%s/%d", cgi.cg.kz.conf.Chroot, cgi.cg.Name, topic, partition)
	return cgi.cg.kz.conn.Delete(node, 0)
}
1018521
func (s *S3ObjectMetadata) SetContentDisposition(v string) *S3ObjectMetadata {
	s.ContentDisposition = &v
	return s
}
367366
func (s *GetPartitionInput) SetPartitionValues(v []*string) *GetPartitionInput {
	s.PartitionValues = v
	return s
}
488659
func (s *UpdatePartitionInput) SetPartitionValueList(v []*string) *UpdatePartitionInput {
	s.PartitionValueList = v
	return s
}
611260
func onAddTablePartition(t *meta.Meta, job *model.Job) (ver int64, _ error) {
	partInfo := &model.PartitionInfo{}
	err := job.DecodeArgs(&partInfo)
	if err != nil {
		job.State = model.JobStateCancelled
		return ver, errors.Trace(err)
	}

	tblInfo, err := getTableInfoAndCancelFaultJob(t, job, job.SchemaID)
	if err != nil {
		job.State = model.JobStateCancelled
		return ver, errors.Trace(err)
	}
	err = checkAddPartitionTooManyPartitions(uint64(len(tblInfo.Partition.Definitions) + len(partInfo.Definitions)))
	if err != nil {
		job.State = model.JobStateCancelled
		return ver, errors.Trace(err)
	}

	err = checkAddPartitionValue(tblInfo, partInfo)
	if err != nil {
		job.State = model.JobStateCancelled
		return ver, errors.Trace(err)
	}

	err = checkPartitionNameUnique(tblInfo, partInfo)
	if err != nil {
		job.State = model.JobStateCancelled
		return ver, errors.Trace(err)
	}

	updatePartitionInfo(partInfo, tblInfo)
	ver, err = updateVersionAndTableInfo(t, job, tblInfo, true)
	if err != nil {
		return ver, errors.Trace(err)
	}
	// Finish this job.
	job.FinishTableJob(model.JobStateDone, model.StatePublic, ver, tblInfo)
	return ver, errors.Trace(err)
}
259778
func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
	s.PartNumber = &v
	return s
}
391491
func (s *DescribeDimensionKeysInput) SetPartitionBy(v *DimensionGroup) *DescribeDimensionKeysInput {
	s.PartitionBy = v
	return s
}
613682
func (e *RadixHashJoinExec) doInnerPartition(workerID int) {
	chkIdx, chkNum := workerID, e.innerResult.NumChunks()
	for ; chkIdx < chkNum; chkIdx += int(e.concurrency) {
		if e.finished.Load().(bool) {
			return
		}
		chk := e.innerResult.GetChunk(chkIdx)
		for srcRowIdx, partPtr := range e.innerRowPrts[chkIdx] {
			if partPtr == partPtr4NullKey {
				continue
			}
			partIdx, destRowIdx := partPtr.partitionIdx, partPtr.rowIdx
			part := e.innerParts[partIdx]
			part.Insert(int(destRowIdx), chk.GetRow(srcRowIdx))
		}
	}
}
1350109
func (s *UploadListElement) SetPartSizeInBytes(v int64) *UploadListElement {
	s.PartSizeInBytes = &v
	return s
}
1372221
func (s *CreateJobOutput) SetSegmentDuration(v string) *CreateJobOutput {
	s.SegmentDuration = &v
	return s
}
1371923
func (s *SendAnnouncementInput) SetContent(v *Content) *SendAnnouncementInput {
	s.Content = v
	return s
}
1354951
func (s *GetPartitionsInput) SetSegment(v *Segment) *GetPartitionsInput {
	s.Segment = v
	return s
}
209613
func (s *PutRecordsRequestEntry) SetPartitionKey(v string) *PutRecordsRequestEntry {
	s.PartitionKey = &v
	return s
}
496360
func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput {
	s.PartFirstByte = &v
	return s
}
579340
func (t *seriesPartitionTracker) SetDiskSize(sz uint64) {
	if !t.enabled {
		return
	}

	labels := t.Labels()
	t.metrics.DiskSize.With(labels).Set(float64(sz))
}