All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yamcs.protobuf.archive.rocksdb_service.proto Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
syntax="proto2";

package yamcs.protobuf.archive;

option java_package = "org.yamcs.protobuf";
option java_outer_classname = "RocksDbServiceProto";
option java_multiple_files = true;

import "google/protobuf/empty.proto";

import "yamcs/api/annotations.proto";
import "yamcs/api/httpbody.proto";

service RocksDbApi {
  option (yamcs.api.label) = "RocksDB";

  // List tablespaces
  rpc ListTablespaces(google.protobuf.Empty) returns (ListRocksDbTablespacesResponse) {
    option (yamcs.api.route) = {
      get: "/api/archive/rocksdb/tablespaces"
    };
  }

  // Backup database
  rpc BackupDatabase(BackupDatabaseRequest) returns (google.protobuf.Empty) {
    option (yamcs.api.route) = {
      post: "/api/archive/rocksdb/{tablespace}/{dbpath*}:backup"
      log: "Tablespace {tablespace} backed up to {backupDir}"
    };
  }

  // List databases
  rpc ListDatabases(google.protobuf.Empty) returns (ListRocksDbDatabasesResponse) {
    option (yamcs.api.route) = {
      get: "/api/archive/rocksdb/databases"
    };
  }

  // Compact database
  rpc CompactDatabase(CompactDatabaseRequest) returns (google.protobuf.Empty) {
    option (yamcs.api.route) = {
      post: "/api/archive/rocksdb/{tablespace}/{dbpath**}:compact"
      body: "*"
      offloaded: true
      log: "Compaction triggered on tablespace {tablespace}"
    };
  }

  // Get a text-dump with general RocksDB info
  rpc DescribeRocksDb(google.protobuf.Empty) returns (yamcs.api.HttpBody) {
    option (yamcs.api.route) = {
      label: "Describe RocksDB"
      get: "/api/archive/rocksdb:describe"
    };
  }

  // Get a text-dump describing a database
  //
  // This operation can be used to debug the inner workings of RocksDB database.
  // For example the property rocksdb.estimate-table-readers-mem will provide an
  // estimation of how much memory is used by the index and filter cache of
  // RocksDB (note that the memory used by RocksDB is outside the java heap space).
  //
  // See also: https://github.com/facebook/rocksdb/blob/master/include/rocksdb/db.h
  //
  // The response contains a dump of various rocksdb properties for each column
  // family. The single value properties are presented in a "name: value" list.
  // The multiline properties are preceded by a line including the property name
  // between dashes.
  rpc DescribeDatabase(DescribeDatabaseRequest) returns (yamcs.api.HttpBody) {
    option (yamcs.api.route) = {
      get: "/api/archive/rocksdb/{tablespace}/{dbpath**}:describe"
    };
  }
}

message ListRocksDbTablespacesResponse {
  repeated RocksDbTablespaceInfo tablespaces = 1;
}

message RocksDbTablespaceInfo {
  optional string name = 1;
  optional string dataDir = 2;
  repeated RocksDbDatabaseInfo databases = 3;
}

message ListRocksDbDatabasesResponse {
  repeated RocksDbDatabaseInfo databases = 1;
}

message RocksDbDatabaseInfo {
  optional string tablespace = 1;
  optional string dataDir = 2;
  optional string dbPath = 3;
}

message BackupDatabaseRequest {
  optional string tablespace = 1;
  optional string dbpath = 2;
  optional string backupDir = 3;
}

message CompactDatabaseRequest {
  optional string tablespace = 1;
  optional string dbpath = 2;

  // Column family
  //
  // Starting with Yamcs 5.9.0 the following column families are used:
  //
  // _metadata_
  //     Stores information about tables, partitions
  // rt_data
  //     Stores the tm, pp and events tables
  // parameter_archive
  //     Stores the parameter archive
  // default
  //     Stores everything else: cmdhistory, alarms, completeness indices,
  //     timeline, activities, users, buckets, ...
  optional string cfname = 3;
}

message DescribeDatabaseRequest {
  optional string tablespace = 1;
  optional string dbpath = 2;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy