cs-core.5.10.7.source-code.tablespace.proto Maven / Gradle / Ivy
syntax = "proto2";
option java_package = "org.yamcs.yarch.rocksdb.protobuf";
message TimeBasedPartition {
optional string partitionDir = 1;
optional int64 partitionStart = 2;
optional int64 partitionEnd = 3;
optional string partitionCf = 4;
optional uint32 parchiveVersion = 5 [default = 0];
}
/**
* This is used to encode values in the tablespace metadata database
*/
message TablespaceRecord {
enum Type {
//used to store table (partition) data
//relevant information: instanceName, tableName and optionally partitionValue, partitionDir, partitionStart and partitionEnd
TABLE_PARTITION = 1;
//used to store table histogram data
//relevant information: instanceName, tableName, columnName
HISTOGRAM = 2;
//used as part of the ParameterArchive to keep the parameter group id -> parameter group (list of parameter ids) mapping
//relevant information: instanceName
//there is only one record of this type for each instance and ParameterArchive
PARCHIVE_PGID2PG = 4;
//used to store ParameterArchive data. There is one record for each separate parameter
//(taking into account that a different type represents a different parameter in the ParameterArchive even if it has the same name)
//relevant information: instanceName, parameterFqn, parameterType
PARCHIVE_DATA = 5;
//used to store information about the partitions of the ParameterArchive in case they are partitioned by time
// relevant information: instanceName, partitioningSchema
//there is only one record of this type for each instance and ParameterArchive
PARCHIVE_PINFO = 6;
//used by the tag database
// relevant information: instanceName
TAGDB = 7;
//used to store bucket and user objects
// relevant information: instanceName, bucketProperties
BUCKET = 8;
//used to store (CCSDS) TM index
//relevant information: instanceName, tmIndexName
TM_INDEX = 9;
//used to store small named protobuf messages
PROTOBUF = 10;
//used to store table definitions
TABLE_DEFINITION = 11;
//secondary index records
SECONDARY_INDEX = 12;
//parameter archive info about array and aggregates - contains the list of member ids
//relevant information: instanceName, parameterFqn, memberId
PARCHIVE_AGGARR_INFO = 13;
}
optional uint32 tbsIndex = 1;
optional Type type = 2;
// used for all record types
//if not specified then instanceName = tablespaceName
optional string instanceName = 3;
//used for TABLE_DEFINITION, TABLE_PARTITION, HISTOGRAM and SECONDARY_INDEX
optional string tableName = 4;
//used for HISTOGRAM
optional string histogramColumnName = 5;
// used for TABLE_PARTITION: if partitioned by value - the value
optional bytes partitionValue = 6;
// used for TABLE_PARTITION, HISTOGRAM and PARCHIVE: if partition by time
// - partitionDir is subdirectory name (usually something like 2017/11)
// - partitionStart/End are the times representing partition start(inclusive) and end (exclusive)
optional TimeBasedPartition partition = 7;
//used by the PARCHIVE_DATA to associate parameter ids to (parameter qualified name, parameterType)
//tbsIndex is the parameter id
//parameterType is a number assigned to (rawType,engType) combination
//parameterFqn is the parameter fully qualified name (something like /system/subsystem1/subsystem2/paraName)
optional string parameterFqn = 8;
optional uint32 parameterType = 9;
//partitioning schema used currently for parameter archive
optional string partitioningSchema = 10;
//bucketProperties
optional BucketProperties bucketProperties = 11;
//used for TABLE_DEFINITION
optional ProtoTableDefinition tableDefinition = 12;
//used for SECONDARY_INDEX
optional SecondaryIndex secondaryIndex = 13;
//used for TM_INDEX
optional string tmIndexName = 14;
//used for PARCHIVE_AGGARR_INFO
repeated uint32 memberId = 15;
//used for PARCHIVE_AGGARR_INFO to store the numeric type (engType, rawType) of the parameter
optional uint32 numericType = 16;
//if time based partitioning is not used for the parameter archive, this indicates that parameter archive data is stored in separate column family
//if partitioning is used, each partition has the property partitionCf indicating the name of the column family
// if this is not set, the parameter archive is not stored in separate column family (databases created
// with Yamcs versions prior to 5.8.1)
optional string parchiveCf = 17;
//Starting with Yamcs 5.10.0 stores the version of the Parameter Archive in case time based partitioning is not used
// if time based partitioning is used, each partition has its own version
optional uint32 parchiveVersion = 18 [default = 0];
}
//associated to each bucket
message BucketProperties {
optional string name = 1;
optional int64 created = 2;
optional int32 maxNumObjects = 3; //maximum number of objects in the bucket
optional uint64 maxSize = 4; //maximum size in bytes
optional int32 numObjects = 5; //current number of objects in the bucket
optional uint64 size = 6; //current bucket size
}
//associated to each user object
message ObjectProperties {
optional string name = 1;
optional uint32 objectId = 2;
optional string contentType = 3;
optional int64 created = 4;
optional uint64 size = 5;
map metadata = 6;
}
message TableColumnInfo {
message EnumValue {
optional int32 value = 1;
optional string label = 2;
}
optional string name = 1;
optional string type = 2;
repeated EnumValue enumValue = 3;
optional bool autoincrement = 4;
}
message PartitioningInfo {
enum PartitioningType {
TIME = 1;
VALUE = 2;
TIME_AND_VALUE = 3;
}
optional PartitioningType type = 1;
optional string timeColumn = 2;
optional string timePartitionSchema = 3;
optional string valueColumn = 4;
optional string valueColumnType = 5;
}
//to allow future extensions we define multi-column secondary indices for each table
//as of now only a single index on one column is supported
message SecondaryIndex {
repeated string columnName = 1;
}
message ProtoTableDefinition {
repeated TableColumnInfo keyColumn = 2;
repeated TableColumnInfo valueColumn = 3;
repeated string histogramColumn = 5;
optional string storageEngine = 6;
optional int32 formatVersion = 7;
optional string tablespace = 8;
optional bool compressed = 9;
optional PartitioningInfo partitioningInfo = 10;
repeated SecondaryIndex secondaryIndex = 11;
optional string cfName = 12;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy