Skip to main content

ArchiveCopySlice

Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData

One unit of a native copy: the rows of one archive table in one time range (or the whole generation map). A slice is one COPY statement, one folder in the staging area and one entry of the dump manifest.

public record ArchiveCopySlice : IEquatable<ArchiveCopySlice>

Inheritance Object → ArchiveCopySlice
Implements IEquatable<ArchiveCopySlice>

Remarks:

ArchiveCopySlice.RowCount is the number counted before the dump copied the slice, and the number a restore has to load back. ArchiveCopySlice.StagedBytes is the size of the slice's files in the staging area when known (the dump job sums it after the copy); a restore uses it for the free disk space check.

Properties​

Table​

public ArchiveCopyTable Table { get; }

Property Value​

ArchiveCopyTable

Key​

The folder name of the slice below <rtId>/data or <rtId>/genmap.

public string Key { get; }

Property Value​

String

RowCount​

public long RowCount { get; }

Property Value​

Int64

FromUtc​

Inclusive start of the time range, null for the generation map.

public Nullable<DateTime> FromUtc { get; }

Property Value​

Nullable<DateTime>

ToUtc​

Exclusive end of the time range, null for the generation map.

public Nullable<DateTime> ToUtc { get; }

Property Value​

Nullable<DateTime>

StagedBytes​

public Nullable<long> StagedBytes { get; }

Property Value​

Nullable<Int64>

Constructors​

ArchiveCopySlice(ArchiveCopyTable, String, Int64, Nullable<DateTime>, Nullable<DateTime>, Nullable<Int64>)​

public ArchiveCopySlice(ArchiveCopyTable table, string key, long rowCount, Nullable<DateTime> fromUtc, Nullable<DateTime> toUtc, Nullable<long> stagedBytes)

Parameters​

table ArchiveCopyTable

key String

rowCount Int64

fromUtc Nullable<DateTime>

toUtc Nullable<DateTime>

stagedBytes Nullable<Int64>

Methods​

ForTimeRange(DateTime, DateTime, Int64)​

A time slice of a data table: [fromUtc, toUtc) with the rows counted in it.

public static ArchiveCopySlice ForTimeRange(DateTime fromUtc, DateTime toUtc, long rowCount)

Parameters​

fromUtc DateTime

toUtc DateTime

rowCount Int64

Returns​

ArchiveCopySlice

ForGenerationMap(Int64)​

The single slice of a rollup's generation map.

public static ArchiveCopySlice ForGenerationMap(long rowCount)

Parameters​

rowCount Int64

Returns​

ArchiveCopySlice

WithStagedBytes(Int64)​

The same slice with the size of its staged files.

public ArchiveCopySlice WithStagedBytes(long stagedBytes)

Parameters​

stagedBytes Int64

Returns​

ArchiveCopySlice

GetStagingPath(OctoObjectId)​

The folder of the slice below the staging root: <rtId>/data/<key> or <rtId>/genmap/all (concept §4). archiveRtId is the archive the files were dumped from, ArchiveCopyPlan.ArchiveRtId.

public string GetStagingPath(OctoObjectId archiveRtId)

Parameters​

archiveRtId OctoObjectId

Returns​

String