func()

in api/om/om.go [131:159]


func (om *OmClient) CommitKey(volume string, bucket string, key string, id *uint64, keyLocations []*ozone_proto.KeyLocation, size uint64) (common.Key, error) {
	one := hdds.ReplicationFactor_ONE
	standalone := hdds.ReplicationType_STAND_ALONE
	req := ozone_proto.CommitKeyRequest{
		KeyArgs: &ozone_proto.KeyArgs{
			VolumeName:   &volume,
			BucketName:   &bucket,
			KeyName:      &key,
			KeyLocations: keyLocations,
			DataSize:     &size,
			Factor:       &one,
			Type:         &standalone,
		},
		ClientID: id,
	}

	messageType := ozone_proto.Type_CommitKey
	wrapperRequest := ozone_proto.OMRequest{
		CmdType:          &messageType,
		CommitKeyRequest: &req,
		ClientId:         &om.clientId,
	}
	_, err := om.submitRequest(&wrapperRequest)
	if err != nil {
		return common.Key{}, err
	}

	return common.Key{}, nil
}