public RavenEtlItem(Tombstone tombstone, string collection, EtlItemType type) : base(tombstone, collection, type) { if (tombstone.Type == Tombstone.TombstoneType.Attachment) { AttachmentTombstoneId = tombstone.LowerId; } }
protected ExtractedItem(Tombstone tombstone, string collection, EtlItemType type) { Etag = tombstone.Etag; switch (type) { case EtlItemType.Document: Debug.Assert(tombstone.Type == Tombstone.TombstoneType.Document || tombstone.Type == Tombstone.TombstoneType.Attachment); DocumentId = tombstone.LowerId; Collection = collection; break; case EtlItemType.Counter: Debug.Assert(tombstone.Type == Tombstone.TombstoneType.Counter); Collection = tombstone.Collection; CounterTombstoneId = tombstone.LowerId; break; } IsDelete = true; ChangeVector = tombstone.ChangeVector; Type = type; if (Collection == null) { CollectionFromMetadata = tombstone.Collection; } }
public void RecordLastTransformedEtag(long etag, EtlItemType type) { Debug.Assert(type != EtlItemType.None); var current = _stats.LastTransformedEtags[type]; if (etag > current) { _stats.LastTransformedEtags[type] = etag; } }
public void RecordTransformedItem(EtlItemType itemType, bool isTombstone) { if (isTombstone) { _stats.NumberOfTransformedTombstones[itemType]++; } else { _stats.NumberOfTransformedItems[itemType]++; } }
protected ExtractedItem(Document document, string collection, EtlItemType type) { DocumentId = document.Id; Etag = document.Etag; Document = document; Collection = collection; ChangeVector = document.ChangeVector; Type = type; if (collection == null && type == EtlItemType.Document && document.Data.TryGet(Constants.Documents.Metadata.Key, out BlittableJsonReaderObject metadata) && metadata.TryGet(Constants.Documents.Metadata.Collection, out LazyStringValue docCollection)) { CollectionFromMetadata = docCollection; } }
protected override IEnumerator <RavenEtlItem> ConvertTombstonesEnumerator(IEnumerator <Tombstone> tombstones, string collection, EtlItemType type) { return(new TombstonesToRavenEtlItems(tombstones, collection, type)); }
public TombstonesToRavenEtlItems(IEnumerator <Tombstone> tombstones, string collection, EtlItemType tombstoneType) { _tombstones = tombstones; _collection = collection; _tombstoneType = tombstoneType; }
public void RecordExtractedItem(EtlItemType itemType) { _stats.NumberOfExtractedItems[itemType]++; }
public long GetLastTransformedOrFilteredEtag(EtlItemType type) { return(Math.Max(LastTransformedEtags[type], LastFilteredOutEtags[type])); }
public ExtractedItemsEnumerator(EtlStatsScope stats, EtlItemType itemType) { _itemType = itemType; _extractionStats = stats.For(EtlOperations.Extract, start: false); }
public void RecordTransformedItem(EtlItemType itemType) { _stats.NumberOfTransformedItems[itemType]++; }