cnosdb

package module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 6 Imported by: 0

README

codebeat badge GitHub

CnosDB

English | 简体中文

An Open Source Distributed Time Series Database with high performance, high compression ratio and high usability.

Click to view roadmap

Features

  • Ultra-large data size
    • Distributed support for more than 1 billion time series
    • Support more than 100 billion data points storage
    • Support distributed aggregation query under massive time series
  • Fast batch writing
    • Define new memory and disk data structure
    • Hardware resource abstraction and write optimization
    • Dynamic adjustment of node load to optimize performance under data skew
    • Multi-level storage strategy to optimize back-end IO
  • Ultra-high data compression ratio
    • Column based storage
    • Multi-level compression
    • Type and distribution adaptive compression algorithms
    • Comprehensive compression ratio over 60 times -Rich calculation functions
    • More than 50 calculation functions
    • Interface modular design
  • Excellent ecosystem
    • Native support for k8s and docker
    • Support for Java, Go, C/C++, Python development interfaces
    • Support for third-party tools such as Telegraf, Grafana, Prometheus, etc.

Join the community

All developers/users who love time series databases are welcome to participate in the CnosDB User Group. Scan the QR code below and add CC to join the group.

Please check Instructions for joining the group beforehand.

Quick start

If you need a complete getting started guide, please check the Quickstart Guide

Construct
  1. Clone

    git clone https://github.com/cnosdb/cnosdb.git
    
  2. Compile

    go install ./...
    
Operation
  1. Start

    $GOPATH/bin/cnosdb
    
  2. Use

    $GOPATH/bin/cnosdb-cli
    

User's Guide

Create database
curl -i -XPOST http://localhost:8086/query --data-urlencode "q=CREATE DATABASE mydb"
Insert data
curl -i -XPOST 'http://localhost:8086/write?db=db' --data-binary 'cpu,host=server01,region=Beijing idle=0.72 1434055562000000000'
Query
curl -G 'http://localhost:8086/query?pretty=true' --data-urlencode "db=db" --data-urlencode "q=SELECT \"idle\" FROM \"cpu\" WHERE \"region\"='Beijing'"

How to contribute

Please refer to Contribution Guide to contribute to CnosDB.

License

MIT License

Contact

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFieldTypeConflict = errors.New("field type conflict")

ErrFieldTypeConflict is returned when a new field already exists with a different type.

Functions

func ErrDatabaseNotFound

func ErrDatabaseNotFound(name string) error

ErrDatabaseNotFound indicates that a database operation failed on the specified database because the specified database does not exist.

func ErrRetentionPolicyNotFound

func ErrRetentionPolicyNotFound(name string) error

ErrRetentionPolicyNotFound indicates that the named retention policy could not be found in the database.

func IsAuthorizationError

func IsAuthorizationError(err error) bool

IsAuthorizationError indicates whether an error is due to an authorization failure

func IsClientError

func IsClientError(err error) bool

IsClientError indicates whether an error is a known client error.

Types

type Node

type Node struct {
	ID    uint64
	Peers []string
	// contains filtered or unexported fields
}

func LoadNode

func LoadNode(path, fileName string) (*Node, error)

LoadNode will load the node information from disk if present

func NewNode

func NewNode(path string) *Node

NewNode will return a new node

func (*Node) Save

func (n *Node) Save(fileName string) error

Save will save the node file to disk and replace the existing one if present

Directories

Path Synopsis
cmd
cnosdb-inspect/deletetsm
Package deletetsm bulk deletes a measurement from a raw tsm file.
Package deletetsm bulk deletes a measurement from a raw tsm file.
cnosdb-inspect/report
Package report reports statistics about TSM files.
Package report reports statistics about TSM files.
cnosdb-tools
The cnosdb_tools command displays detailed information about CnosDB data files.
The cnosdb_tools command displays detailed information about CnosDB data files.
cnosdb-tools/help
Package help is the help subcommand of the cnosdb command.
Package help is the help subcommand of the cnosdb command.
cnosdb-tools/internal/tlv
Package tlv contains code to read and write type-length-value messages.
Package tlv contains code to read and write type-length-value messages.
Package meta provides control over meta data for CnosDB, such as controlling databases, retention policies, users, etc.
Package meta provides control over meta data for CnosDB, such as controlling databases, retention policies, users, etc.
Package monitor provides a service and associated functionality for CnosDB to self-monitor internal statistics and diagnostics.
Package monitor provides a service and associated functionality for CnosDB to self-monitor internal statistics and diagnostics.
pkg
escape
Package escape contains utilities for escaping parts of CnosQL and CnosDB line protocol.
Package escape contains utilities for escaping parts of CnosQL and CnosDB line protocol.
tcp
uuid
Package uuid provides functions to create time-based UUIDs.
Package uuid provides functions to create time-based UUIDs.
continuous_querier
Package continuous_querier provides the continuous query service.
Package continuous_querier provides the continuous query service.
coordinator
Package coordinator contains abstractions for writing points, executing statements, and accessing meta data.
Package coordinator contains abstractions for writing points, executing statements, and accessing meta data.
hh
precreator
Package precreator provides the shard precreation service.
Package precreator provides the shard precreation service.
rp
Package rp provides the retention policy enforcement service.
Package rp provides the retention policy enforcement service.
snapshotter
Package snapshotter provides the meta snapshot service.
Package snapshotter provides the meta snapshot service.
storage
This package is a set of convenience helpers and structs to make integration testing easier
This package is a set of convenience helpers and structs to make integration testing easier
vend
common/monitor/diagnostics
Package diagnostics provides the diagnostics type so that other packages can provide diagnostics without depending on the monitor package.
Package diagnostics provides the diagnostics type so that other packages can provide diagnostics without depending on the monitor package.
common/pkg/toml
Package toml adds support to marshal and unmarshal types not in the official TOML spec.
Package toml adds support to marshal and unmarshal types not in the official TOML spec.
db/models
Package models implements basic objects
Package models implements basic objects
db/pkg/deep
Package deep provides a deep equality check for use in tests.
Package deep provides a deep equality check for use in tests.
db/pkg/encoding/simple8b
Package simple8b implements the 64bit integer encoding algorithm as published by Ann and Moffat in "Index compression using 64-bit words", Softw.
Package simple8b implements the 64bit integer encoding algorithm as published by Ann and Moffat in "Index compression using 64-bit words", Softw.
db/pkg/escape
Package escape contains utilities for escaping parts of CnosQL and CnosDB line protocol.
Package escape contains utilities for escaping parts of CnosQL and CnosDB line protocol.
db/pkg/estimator/hll
Package hll contains a HyperLogLog++ with a LogLog-Beta bias correction implementation that is adapted (mostly copied) from an implementation provided by Clark DuVall github.com/clarkduvall/hyperloglog.
Package hll contains a HyperLogLog++ with a LogLog-Beta bias correction implementation that is adapted (mostly copied) from an implementation provided by Clark DuVall github.com/clarkduvall/hyperloglog.
db/pkg/limiter
Package limiter provides concurrency limiters.
Package limiter provides concurrency limiters.
db/pkg/metrics
Package metrics provides various metrics that are safe for concurrent access.
Package metrics provides various metrics that are safe for concurrent access.
db/pkg/mmap
Package mmap provides a way to memory-map a file.
Package mmap provides a way to memory-map a file.
db/pkg/pool
Package pool provides pool structures to help reduce garbage collector pressure.
Package pool provides pool structures to help reduce garbage collector pressure.
db/pkg/reporthelper
Package report reports statistics about TSM files.
Package report reports statistics about TSM files.
db/pkg/roaring
Package roaring is an implementation of Roaring Bitmaps in Go.
Package roaring is an implementation of Roaring Bitmaps in Go.
db/pkg/slices
Package slices contains functions to operate on slices treated as sets.
Package slices contains functions to operate on slices treated as sets.
db/pkg/testing/assert
Package assert provides helper functions that can be used with the standard Go testing package.
Package assert provides helper functions that can be used with the standard Go testing package.
db/pkg/tracing
Package tracing provides a way for capturing hierarchical traces.
Package tracing provides a way for capturing hierarchical traces.
db/pkg/tracing/wire
Package wire is used to serialize a trace.
Package wire is used to serialize a trace.
db/query/neldermead
Package neldermead is an implementation of the Nelder-Mead optimization method.
Package neldermead is an implementation of the Nelder-Mead optimization method.
db/tsdb/engine
Package engine can be imported to initialize and register all available TSDB engines.
Package engine can be imported to initialize and register all available TSDB engines.
db/tsdb/engine/tsm1
Package tsm1 provides a TSDB in the Time Structured Merge tree format.
Package tsm1 provides a TSDB in the Time Structured Merge tree format.
db/tsdb/index/inmem
Package inmem implements a shared, in-memory index for each database.
Package inmem implements a shared, in-memory index for each database.
db/tsdb/index/tsi1
Package tsi1 provides a memory-mapped index implementation that supports high cardinality series.
Package tsi1 provides a memory-mapped index implementation that supports high cardinality series.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL