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

grpc.common.proto Maven / Gradle / Ivy

syntax = "proto2";

option java_multiple_files = true;
option java_package = "alluxio.grpc";
option java_outer_classname = "CommonProto";

package alluxio.grpc;

enum Bits {
  NONE = 1;
  EXECUTE = 2;
  WRITE = 3;
  WRITE_EXECUTE = 4;
  READ = 5;
  READ_EXECUTE = 6;
  READ_WRITE = 7;
  ALL = 8;
}

message PMode {
  required Bits ownerBits = 1;
  required Bits groupBits = 2;
  required Bits otherBits = 3;
}

/**
 * Contains the information of a block in Alluxio. It maintains the worker nodes where the replicas
 * of the blocks are stored.
 */
message BlockInfo {
  optional int64 blockId = 1;
  optional int64 length = 2;
  repeated BlockLocation locations = 3;
}

/**
 * Information about blocks.
 */
message BlockLocation {
  optional int64 workerId = 1;
  optional WorkerNetAddress workerAddress = 2;
  optional string tierAlias = 3;
  optional string mediumType = 4;
}

/**
 * Information about metrics.
 */
message Metric {
  optional string instance = 1;
  optional string source = 2;
  optional string name = 3;
  optional double value = 4;
  required MetricType metricType = 5;
  map tags = 6;
}

enum MetricType {
  // GAUGE is the simplest type of metric. If you're not sure which to use, gauge is a safe choice. It is represents a
  // general K-V pair.
  GAUGE = 0;
  // COUNTER represents values which can be incremented or decremented over time by certain operations. It does not rely
  // on timing to determine the value.
  COUNTER = 1;
  // METER represents a metric value at a _rate_. The value of the metric varies with the time over which events are
  // recorded
  METER = 2;
  // HISTOGRAM gives statistics about the value of past occurrences of an event.
  HISTOGRAM = 5;
  // TIMER represents a histogram of the rate of the specified events.
  TIMER = 3;
  // EXECUTOR_SERVICE represents an executor service.
  EXECUTOR_SERVICE = 4;
}

enum CommandType {
  Unknown = 0;
  Nothing = 1;
  Register = 2; // Ask the worker to re-register.
  Free = 3;     // Ask the worker to free files.
  Delete = 4;   // Ask the worker to delete files.
  Persist = 5;  // Ask the worker to persist a file for lineage
  Decommissioned = 6; // Notify the worker that it has been decommissioned
  Disabled = 7; // Notify the worker that it has been disabled
}

message ConfigProperty {
  optional string name = 1;
  optional string source = 2;
  optional string value = 3;
}

enum TtlAction {
  DELETE = 0; // Delete the file after TTL expires.
  FREE = 1;   // Free the file after TTL expires.
  DELETE_ALLUXIO = 2; // Delete the data and metadata in Alluxio after TTL expires.
}

message Command {
  optional CommandType commandType = 1;
  repeated int64 data = 2;
}

/**
 * Address information about masters.
 */
message NetAddress {
  optional string host = 1;
  optional int32 rpcPort = 2;
}

/**
 * Address information about workers.
 */
message WorkerNetAddress {
  optional string host = 1;
  optional int32 rpcPort = 2;
  optional int32 dataPort = 3;
  optional int32 webPort = 4;
  optional string domainSocketPath = 5;
  optional string containerHost = 7;
}

message BlockStoreLocationProto {
  optional string tierAlias = 1;
  optional string mediumType = 2;
}

message RetryInfo {
  optional bool isRetryable = 1;
}

message ErrorInfo {
  optional ErrorType errorType = 1;
}

enum ErrorType {
  User = 0;
  Internal = 1;
  External = 2;
}

message BuildVersion {
  /** the project version */
  optional string version = 1;
  /** the git revision at the time of building */
  optional string revision = 2;
}

message WorkerIdentity {
  /** opaque identifier that uniquely identifies a worker */
  /** exactly how this byte sequence is interpreted depends on the version of its definition */
  optional bytes identifier = 1;
  /** version of the definition of the opaque identifier */
  optional int32 version = 2;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy