mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
a bit more docs to etl #463
This commit is contained in:
parent
26e4d01d16
commit
2bfb6d70bb
@ -64,6 +64,7 @@ type LoadCommitHandler func(db kv.Putter, key []byte, isDone bool) error
|
|||||||
type AdditionalLogArguments func(k, v []byte) (additionalLogArguments []interface{})
|
type AdditionalLogArguments func(k, v []byte) (additionalLogArguments []interface{})
|
||||||
|
|
||||||
type TransformArgs struct {
|
type TransformArgs struct {
|
||||||
|
// [ExtractStartKey, ExtractEndKey)
|
||||||
ExtractStartKey []byte
|
ExtractStartKey []byte
|
||||||
ExtractEndKey []byte
|
ExtractEndKey []byte
|
||||||
BufferType int
|
BufferType int
|
||||||
@ -106,6 +107,7 @@ func Transform(
|
|||||||
return collector.Load(db, toBucket, loadFunc, args)
|
return collector.Load(db, toBucket, loadFunc, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// extractBucketIntoFiles - [startkey, endkey)
|
||||||
func extractBucketIntoFiles(
|
func extractBucketIntoFiles(
|
||||||
logPrefix string,
|
logPrefix string,
|
||||||
db kv.Tx,
|
db kv.Tx,
|
||||||
@ -148,7 +150,7 @@ func extractBucketIntoFiles(
|
|||||||
log.Info(fmt.Sprintf("[%s] ETL [1/2] Extracting", logPrefix), logArs...)
|
log.Info(fmt.Sprintf("[%s] ETL [1/2] Extracting", logPrefix), logArs...)
|
||||||
}
|
}
|
||||||
if endkey != nil && bytes.Compare(k, endkey) >= 0 {
|
if endkey != nil && bytes.Compare(k, endkey) >= 0 {
|
||||||
// endKey is exclusive bound
|
// endKey is exclusive bound: [startkey, endkey)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if err := extractFunc(k, v, collector.extractNextFunc); err != nil {
|
if err := extractFunc(k, v, collector.extractNextFunc); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user