chore: move v2/v1/tsdb → v2/tsdb
parent
d20440a09f
commit
dee8977d2c
|
@ -18,9 +18,9 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/logger"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/pkg/file"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/index/tsi1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/index/tsi1"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
"github.com/influxdata/influxdb/v2/cmd/influx_inspect/verify/seriesfile"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
// Command represents the program execution for "influx_inspect verify-tombstone".
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"bufio"
|
||||
"os"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/index/tsi1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/index/tsi1"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -66,11 +66,11 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/task/backend/scheduler"
|
||||
"github.com/influxdata/influxdb/v2/telemetry"
|
||||
"github.com/influxdata/influxdb/v2/tenant"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/engine/tsm1" // needed for tsm1
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/index/tsi1" // needed for tsi1
|
||||
iqlcoordinator "github.com/influxdata/influxdb/v2/v1/coordinator"
|
||||
"github.com/influxdata/influxdb/v2/v1/services/meta"
|
||||
storage2 "github.com/influxdata/influxdb/v2/v1/services/storage"
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1" // needed for tsm1
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/index/tsi1" // needed for tsi1
|
||||
"github.com/influxdata/influxdb/v2/vault"
|
||||
pzap "github.com/influxdata/influxdb/v2/zap"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
|
|
|
@ -10,8 +10,8 @@ import (
|
|||
"github.com/influxdata/flux"
|
||||
"github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/cmd/influxd/launcher"
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/index/tsi1"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/index/tsi1"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package internal
|
||||
|
||||
import "github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
import "github.com/influxdata/influxdb/v2/tsdb"
|
||||
|
||||
var (
|
||||
_ tsdb.IntegerArrayCursor = NewIntegerArrayCursorMock()
|
|
@ -0,0 +1,151 @@
|
|||
package internal
|
||||
|
||||
import (
|
||||
"io"
|
||||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/influxql/query"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxql"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// TSDBStoreMock is a mockable implementation of tsdb.Store.
|
||||
type TSDBStoreMock struct {
|
||||
BackupShardFn func(id uint64, since time.Time, w io.Writer) error
|
||||
BackupSeriesFileFn func(database string, w io.Writer) error
|
||||
ExportShardFn func(id uint64, ExportStart time.Time, ExportEnd time.Time, w io.Writer) error
|
||||
CloseFn func() error
|
||||
CreateShardFn func(database, policy string, shardID uint64, enabled bool) error
|
||||
CreateShardSnapshotFn func(id uint64) (string, error)
|
||||
DatabasesFn func() []string
|
||||
DeleteDatabaseFn func(name string) error
|
||||
DeleteMeasurementFn func(database, name string) error
|
||||
DeleteRetentionPolicyFn func(database, name string) error
|
||||
DeleteSeriesFn func(database string, sources []influxql.Source, condition influxql.Expr) error
|
||||
DeleteShardFn func(id uint64) error
|
||||
DiskSizeFn func() (int64, error)
|
||||
ExpandSourcesFn func(sources influxql.Sources) (influxql.Sources, error)
|
||||
ImportShardFn func(id uint64, r io.Reader) error
|
||||
MeasurementSeriesCountsFn func(database string) (measuments int, series int)
|
||||
MeasurementsCardinalityFn func(database string) (int64, error)
|
||||
MeasurementNamesFn func(auth query.Authorizer, database string, cond influxql.Expr) ([][]byte, error)
|
||||
OpenFn func() error
|
||||
PathFn func() string
|
||||
RestoreShardFn func(id uint64, r io.Reader) error
|
||||
SeriesCardinalityFn func(database string) (int64, error)
|
||||
SetShardEnabledFn func(shardID uint64, enabled bool) error
|
||||
ShardFn func(id uint64) *tsdb.Shard
|
||||
ShardGroupFn func(ids []uint64) tsdb.ShardGroup
|
||||
ShardIDsFn func() []uint64
|
||||
ShardNFn func() int
|
||||
ShardRelativePathFn func(id uint64) (string, error)
|
||||
ShardsFn func(ids []uint64) []*tsdb.Shard
|
||||
StatisticsFn func(tags map[string]string) []models.Statistic
|
||||
TagKeysFn func(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagKeys, error)
|
||||
TagValuesFn func(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagValues, error)
|
||||
WithLoggerFn func(log *zap.Logger)
|
||||
WriteToShardFn func(shardID uint64, points []models.Point) error
|
||||
}
|
||||
|
||||
func (s *TSDBStoreMock) BackupShard(id uint64, since time.Time, w io.Writer) error {
|
||||
return s.BackupShardFn(id, since, w)
|
||||
}
|
||||
func (s *TSDBStoreMock) BackupSeriesFile(database string, w io.Writer) error {
|
||||
return s.BackupSeriesFileFn(database, w)
|
||||
}
|
||||
func (s *TSDBStoreMock) ExportShard(id uint64, ExportStart time.Time, ExportEnd time.Time, w io.Writer) error {
|
||||
return s.ExportShardFn(id, ExportStart, ExportEnd, w)
|
||||
}
|
||||
func (s *TSDBStoreMock) Close() error { return s.CloseFn() }
|
||||
func (s *TSDBStoreMock) CreateShard(database string, retentionPolicy string, shardID uint64, enabled bool) error {
|
||||
return s.CreateShardFn(database, retentionPolicy, shardID, enabled)
|
||||
}
|
||||
func (s *TSDBStoreMock) CreateShardSnapshot(id uint64) (string, error) {
|
||||
return s.CreateShardSnapshotFn(id)
|
||||
}
|
||||
func (s *TSDBStoreMock) Databases() []string {
|
||||
return s.DatabasesFn()
|
||||
}
|
||||
func (s *TSDBStoreMock) DeleteDatabase(name string) error {
|
||||
return s.DeleteDatabaseFn(name)
|
||||
}
|
||||
func (s *TSDBStoreMock) DeleteMeasurement(database string, name string) error {
|
||||
return s.DeleteMeasurementFn(database, name)
|
||||
}
|
||||
func (s *TSDBStoreMock) DeleteRetentionPolicy(database string, name string) error {
|
||||
return s.DeleteRetentionPolicyFn(database, name)
|
||||
}
|
||||
func (s *TSDBStoreMock) DeleteSeries(database string, sources []influxql.Source, condition influxql.Expr) error {
|
||||
return s.DeleteSeriesFn(database, sources, condition)
|
||||
}
|
||||
func (s *TSDBStoreMock) DeleteShard(shardID uint64) error {
|
||||
return s.DeleteShardFn(shardID)
|
||||
}
|
||||
func (s *TSDBStoreMock) DiskSize() (int64, error) {
|
||||
return s.DiskSizeFn()
|
||||
}
|
||||
func (s *TSDBStoreMock) ExpandSources(sources influxql.Sources) (influxql.Sources, error) {
|
||||
return s.ExpandSourcesFn(sources)
|
||||
}
|
||||
func (s *TSDBStoreMock) ImportShard(id uint64, r io.Reader) error {
|
||||
return s.ImportShardFn(id, r)
|
||||
}
|
||||
func (s *TSDBStoreMock) MeasurementNames(auth query.Authorizer, database string, cond influxql.Expr) ([][]byte, error) {
|
||||
return s.MeasurementNamesFn(auth, database, cond)
|
||||
}
|
||||
func (s *TSDBStoreMock) MeasurementSeriesCounts(database string) (measuments int, series int) {
|
||||
return s.MeasurementSeriesCountsFn(database)
|
||||
}
|
||||
func (s *TSDBStoreMock) MeasurementsCardinality(database string) (int64, error) {
|
||||
return s.MeasurementsCardinalityFn(database)
|
||||
}
|
||||
func (s *TSDBStoreMock) Open() error {
|
||||
return s.OpenFn()
|
||||
}
|
||||
func (s *TSDBStoreMock) Path() string {
|
||||
return s.PathFn()
|
||||
}
|
||||
func (s *TSDBStoreMock) RestoreShard(id uint64, r io.Reader) error {
|
||||
return s.RestoreShardFn(id, r)
|
||||
}
|
||||
func (s *TSDBStoreMock) SeriesCardinality(database string) (int64, error) {
|
||||
return s.SeriesCardinalityFn(database)
|
||||
}
|
||||
func (s *TSDBStoreMock) SetShardEnabled(shardID uint64, enabled bool) error {
|
||||
return s.SetShardEnabledFn(shardID, enabled)
|
||||
}
|
||||
func (s *TSDBStoreMock) Shard(id uint64) *tsdb.Shard {
|
||||
return s.ShardFn(id)
|
||||
}
|
||||
func (s *TSDBStoreMock) ShardGroup(ids []uint64) tsdb.ShardGroup {
|
||||
return s.ShardGroupFn(ids)
|
||||
}
|
||||
func (s *TSDBStoreMock) ShardIDs() []uint64 {
|
||||
return s.ShardIDsFn()
|
||||
}
|
||||
func (s *TSDBStoreMock) ShardN() int {
|
||||
return s.ShardNFn()
|
||||
}
|
||||
func (s *TSDBStoreMock) ShardRelativePath(id uint64) (string, error) {
|
||||
return s.ShardRelativePathFn(id)
|
||||
}
|
||||
func (s *TSDBStoreMock) Shards(ids []uint64) []*tsdb.Shard {
|
||||
return s.ShardsFn(ids)
|
||||
}
|
||||
func (s *TSDBStoreMock) Statistics(tags map[string]string) []models.Statistic {
|
||||
return s.StatisticsFn(tags)
|
||||
}
|
||||
func (s *TSDBStoreMock) TagKeys(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagKeys, error) {
|
||||
return s.TagKeysFn(auth, shardIDs, cond)
|
||||
}
|
||||
func (s *TSDBStoreMock) TagValues(auth query.Authorizer, shardIDs []uint64, cond influxql.Expr) ([]tsdb.TagValues, error) {
|
||||
return s.TagValuesFn(auth, shardIDs, cond)
|
||||
}
|
||||
func (s *TSDBStoreMock) WithLogger(log *zap.Logger) {
|
||||
s.WithLoggerFn(log)
|
||||
}
|
||||
func (s *TSDBStoreMock) WriteToShard(shardID uint64, points []models.Point) error {
|
||||
return s.WriteToShardFn(shardID, points)
|
||||
}
|
|
@ -4,7 +4,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/pkg/data/gen"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
type GeneratorResultSet struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/mock"
|
||||
"github.com/influxdata/influxdb/v2/pkg/data/gen"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
func mustNewSpecFromToml(tb testing.TB, toml string) *gen.Spec {
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
package gen
|
||||
|
||||
import (
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
type FloatValues interface {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package gen
|
||||
|
||||
import (
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
{{range .}}
|
||||
|
|
|
@ -8,7 +8,7 @@ package gen
|
|||
|
||||
import (
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
type FloatValuesSequence interface {
|
||||
|
|
|
@ -2,7 +2,7 @@ package gen
|
|||
|
||||
import (
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
{{range .}}
|
||||
|
|
|
@ -3,7 +3,7 @@ package predicate
|
|||
import (
|
||||
"github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
// Node is a predicate node.
|
||||
|
|
|
@ -2,7 +2,7 @@ package querytest
|
|||
|
||||
import (
|
||||
"github.com/influxdata/flux/plan"
|
||||
"github.com/influxdata/flux/stdlib/influxdata/influxdb/v1"
|
||||
v1 "github.com/influxdata/flux/stdlib/influxdata/influxdb/v1"
|
||||
"github.com/influxdata/influxdb/v2/query/influxql"
|
||||
"github.com/influxdata/influxdb/v2/query/stdlib/influxdata/influxdb"
|
||||
)
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
platform "github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/kit/tracing"
|
||||
"github.com/influxdata/influxdb/v2/query"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/kit/prom/promtest"
|
||||
"github.com/influxdata/influxdb/v2/mock"
|
||||
"github.com/influxdata/influxdb/v2/query/stdlib/influxdata/influxdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/uuid"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/influxdata/flux/semantic"
|
||||
platform "github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/kit/prom"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/influxdata/flux/execute"
|
||||
"github.com/influxdata/flux/memory"
|
||||
"github.com/influxdata/flux/plan"
|
||||
"github.com/influxdata/flux/stdlib/influxdata/influxdb/v1"
|
||||
v1 "github.com/influxdata/flux/stdlib/influxdata/influxdb/v1"
|
||||
"github.com/influxdata/flux/values"
|
||||
platform "github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/query"
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/influxdata/flux/plan"
|
||||
"github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
// StorageReader is an interface for reading tables from the storage subsystem.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/toml"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// Default configuration values.
|
||||
|
|
|
@ -7,17 +7,17 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/engine"
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/index/inmem"
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/index/tsi1"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/engine"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/index/inmem"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/index/tsi1"
|
||||
|
||||
"github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/kit/tracing"
|
||||
"github.com/influxdata/influxdb/v2/logger"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/coordinator"
|
||||
"github.com/influxdata/influxdb/v2/v1/services/meta"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"go.uber.org/zap"
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/query/stdlib/influxdata/influxdb"
|
||||
storage "github.com/influxdata/influxdb/v2/storage/reads"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
// GroupCursorError is returned when two different cursor types
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
storage "github.com/influxdata/influxdb/v2/storage/reads"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
//
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2"
|
||||
storage "github.com/influxdata/influxdb/v2/storage/reads"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
{{range .}}
|
||||
//
|
||||
|
|
|
@ -6,10 +6,11 @@ package mocks
|
|||
|
||||
import (
|
||||
context "context"
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
influxdb "github.com/influxdata/influxdb/v2"
|
||||
reflect "reflect"
|
||||
time "time"
|
||||
|
||||
gomock "github.com/golang/mock/gomock"
|
||||
influxdb "github.com/influxdata/influxdb/v2"
|
||||
)
|
||||
|
||||
// MockEngineSchema is a mock of EngineSchema interface
|
||||
|
|
|
@ -9,7 +9,7 @@ package reads
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -3,7 +3,7 @@ package reads
|
|||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
type singleValue struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package reads
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
func TestIntegerFilterArrayCursor(t *testing.T) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
type groupResultSet struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
type multiShardCursors interface {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
// ResultSetToLineProtocol transforms rs to line protocol and writes the
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
"github.com/influxdata/influxql"
|
||||
)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads/datatypes"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
type ResultSet interface {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/storage/reads"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
func cursorToString(wr io.Writer, cur cursors.Cursor) {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2"
|
||||
"github.com/influxdata/influxdb/v2/kit/tracing"
|
||||
"github.com/influxdata/influxdb/v2/logger"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"go.uber.org/zap"
|
||||
"go.uber.org/zap/zapcore"
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// TestBatch_Size ensures that a batcher generates a batch when the size threshold is reached.
|
|
@ -5,7 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/BurntSushi/toml"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
func TestConfig_Parse(t *testing.T) {
|
|
@ -4,7 +4,7 @@ import (
|
|||
"context"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/influxql/query"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
type (
|
|
@ -5,7 +5,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
func makeBooleanArray(v ...interface{}) *cursors.BooleanArray {
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/pkg/testing/assert"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/cursors"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/cursors"
|
||||
)
|
||||
|
||||
// Verifies FieldType precedence behavior is equivalent to influxql.DataType#LessThan
|
|
@ -1,9 +1,9 @@
|
|||
// Package engine can be imported to initialize and register all available TSDB engines.
|
||||
//
|
||||
// Alternatively, you can import any individual subpackage underneath engine.
|
||||
package engine // import "github.com/influxdata/influxdb/v2/v1/tsdb/engine"
|
||||
package engine // import "github.com/influxdata/influxdb/v2/tsdb/engine"
|
||||
|
||||
import (
|
||||
// Initialize and register tsm1 engine
|
||||
_ "github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
_ "github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
|
@ -9,7 +9,7 @@ package tsm1
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// Array Cursors
|
|
@ -3,7 +3,7 @@ package tsm1
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// Array Cursors
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
"github.com/influxdata/influxdb/v2/influxql/query"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// buildFloatArrayCursor creates an array cursor for a float field.
|
|
@ -5,7 +5,7 @@ import (
|
|||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/influxql/query"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
{{range .}}
|
|
@ -7,7 +7,7 @@ import (
|
|||
"github.com/influxdata/influxdb/v2/influxql/query"
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/pkg/metrics"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxql"
|
||||
)
|
||||
|
|
@ -3,7 +3,7 @@ package tsm1
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// DecodeBooleanArrayBlock decodes the boolean block from the byte slice
|
|
@ -7,8 +7,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func TestDecodeFloatArrayBlock(t *testing.T) {
|
|
@ -9,7 +9,7 @@ import (
|
|||
"testing/quick"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func TestBooleanArrayEncodeAll_NoValues(t *testing.T) {
|
|
@ -10,7 +10,7 @@ import (
|
|||
"testing/quick"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
var fullBlockFloat64Ones []float64
|
|
@ -10,8 +10,8 @@ import (
|
|||
"testing/quick"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/influxdata/influxdb/v2/internal/testutil"
|
||||
"github.com/influxdata/influxdb/v2/uuid"
|
||||
"github.com/influxdata/influxdb/v2/v1/internal/testutil"
|
||||
)
|
||||
|
||||
func equalError(a, b error) bool {
|
|
@ -10,7 +10,7 @@ import (
|
|||
"testing/quick"
|
||||
|
||||
"github.com/dgryski/go-bitstream"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func TestBitStreamEOF(t *testing.T) {
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
"testing/quick"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func Test_BooleanEncoder_NoValues(t *testing.T) {
|
|
@ -9,7 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/models"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxql"
|
||||
"go.uber.org/zap"
|
||||
)
|
|
@ -6,7 +6,7 @@ import (
|
|||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func TestCacheCheckConcurrentReadsAreSafe(t *testing.T) {
|
|
@ -9,7 +9,7 @@ package tsm1
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// merge combines the next set of blocks into merged blocks.
|
|
@ -3,7 +3,7 @@ package tsm1
|
|||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
{{range .}}
|
|
@ -27,7 +27,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/pkg/limiter"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
const maxTSMFileSize = uint32(2048 * 1024 * 1024) // 2GB
|
|
@ -10,8 +10,8 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
// Tests compacting a Cache snapshot into a single TSM file
|
|
@ -9,7 +9,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func TestDigest_None(t *testing.T) {
|
|
@ -6,7 +6,7 @@ import (
|
|||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
// Test that an error is returned if a manifest isn't the first thing written
|
|
@ -10,7 +10,7 @@ import (
|
|||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
// Values represents a slice of values.
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
)
|
||||
|
||||
{{range .}}
|
|
@ -7,7 +7,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdata/influxdb/v2/pkg/pool"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb"
|
||||
"github.com/influxdata/influxdb/v2/tsdb"
|
||||
"github.com/influxdata/influxql"
|
||||
)
|
||||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/influxdata/influxdb/v2/v1/tsdb/engine/tsm1"
|
||||
"github.com/influxdata/influxdb/v2/tsdb/engine/tsm1"
|
||||
)
|
||||
|
||||
func TestEncoding_FloatBlock(t *testing.T) {
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue