luci: go.chromium.org/luci/resultdb/internal/services/bqexporter Index | Files

package bqexporter

import "go.chromium.org/luci/resultdb/internal/services/bqexporter"

Index

Package Files

bqexporter.go quota_iterator.go test_result_row.go

Variables

var Tasks = tq.RegisterTaskClass(tq.TaskClass{
    ID:            "bq-export",
    Prototype:     &taskspb.ExportInvocationToBQ{},
    Kind:          tq.Transactional,
    Queue:         "bqexporter",
    RoutingPrefix: "/internal/tasks/bqexporter",
})

Tasks describes how to route bq export tasks.

var UseTQ = experiments.Register("rdb-use-tq-bq-export")

UseTQ experiment enables using server/tq for bq export tasks.

func InitServer Uses

func InitServer(srv *server.Server, opts Options)

InitServer initializes a bqexporter server.

func Schedule Uses

func Schedule(ctx context.Context, invID invocations.ID) error

Schedule schedules tasks for all the given invocation's BigQuery Exports.

type Options Uses

type Options struct {
    // How often to query for tasks.
    TaskQueryInterval time.Duration

    // How long to lease a task for.
    TaskLeaseDuration time.Duration

    // Whether to use InsertIDs in BigQuery Streaming Inserts.
    UseInsertIDs bool

    // Maximum number of rows in a batch.
    MaxBatchRowCount int

    // Maximum size of a batch in bytes, approximate.
    MaxBatchSizeApprox int

    // Maximum size of all batches held in memory, approximate.
    MaxBatchTotalSizeApprox int

    // Maximum rate for BigQuery Streaming Inserts.
    RateLimit rate.Limit

    // Number of invocations to export concurrently.
    // This number should be small (e.g. 10) if this ResultDB instance mostly
    // exports huge invocations (10k-100k results per invocation), and it should
    // be large (e.g. 100) if exports small invocations (1000 results per
    // invocation).
    TaskWorkers int
}

Options is bqexporter configuration.

func DefaultOptions Uses

func DefaultOptions() Options

DefaultOptions returns Options with default values.

Package bqexporter imports 39 packages (graph) and is imported by 2 packages. Updated 2021-01-26. Refresh now. Tools for package owners.