Skip to content

Commit

Permalink
Fix indent of MLDataFormats.proto (apache#9181)
Browse files Browse the repository at this point in the history
Currently, our protobuf definition files have a mixed indent of tabs and spaces, which will make them have a different visual effect on different editors or IDEs, and it may become noise in code review.

Unfortunately, we don't have an automatic way to keep protobuf files in good format yet. This PR replaced existing tabs in protobuf definition files with spaces.
  • Loading branch information
Renkai authored Jan 13, 2021
1 parent 2cee0a8 commit 1aa7c9b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 59 deletions.
44 changes: 22 additions & 22 deletions managed-ledger/src/main/proto/MLDataFormats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ option java_package = "org.apache.bookkeeper.mledger.proto";
option optimize_for = SPEED;

message KeyValue {
required string key = 1;
required string value = 2;
required string key = 1;
required string value = 2;
}

message OffloadDriverMetadata {
Expand All @@ -42,10 +42,10 @@ message OffloadContext {

message ManagedLedgerInfo {
message LedgerInfo {
required int64 ledgerId = 1;
optional int64 entries = 2;
optional int64 size = 3;
optional int64 timestamp = 4;
required int64 ledgerId = 1;
optional int64 entries = 2;
optional int64 size = 3;
optional int64 timestamp = 4;
optional OffloadContext offloadContext = 5;
}

Expand All @@ -61,13 +61,13 @@ message ManagedLedgerInfo {
}

message PositionInfo {
required int64 ledgerId = 1;
required int64 entryId = 2;
required int64 ledgerId = 1;
required int64 entryId = 2;
repeated MessageRange individualDeletedMessages = 3;

// Additional custom properties associated with
// the current cursor position
repeated LongProperty properties = 4;
// the current cursor position
repeated LongProperty properties = 4;

// Store which index in the batch message has been deleted
repeated BatchedEntryDeletionIndexInfo batchedEntryDeletionIndexInfo = 5;
Expand Down Expand Up @@ -95,18 +95,18 @@ message LongProperty {
}

message ManagedCursorInfo {
// If the ledger id is -1, then the mark-delete position is
// the one from the (ledgerId, entryId) snapshot below
required int64 cursorsLedgerId = 1;

// Last snapshot of the mark-delete position
optional int64 markDeleteLedgerId = 2;
optional int64 markDeleteEntryId = 3;
repeated MessageRange individualDeletedMessages = 4;

// Additional custom properties associated with
// the current cursor position
repeated LongProperty properties = 5;
// If the ledger id is -1, then the mark-delete position is
// the one from the (ledgerId, entryId) snapshot below
required int64 cursorsLedgerId = 1;

// Last snapshot of the mark-delete position
optional int64 markDeleteLedgerId = 2;
optional int64 markDeleteEntryId = 3;
repeated MessageRange individualDeletedMessages = 4;

// Additional custom properties associated with
// the current cursor position
repeated LongProperty properties = 5;

optional int64 lastActive = 6;

Expand Down
32 changes: 16 additions & 16 deletions pulsar-broker/src/main/proto/SchemaRegistryFormat.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ message SchemaInfo {
JSON = 3;
PROTOBUF = 4;
AVRO = 5;
BOOLEAN = 6;
INT8 = 7;
INT16 = 8;
INT32 = 9;
INT64 = 10;
FLOAT = 11;
DOUBLE = 12;
DATE = 13;
TIME = 14;
TIMESTAMP = 15;
KEYVALUE = 16;
INSTANT = 17;
LOCALDATE = 18;
LOCALTIME = 19;
LOCALDATETIME = 20;
PROTOBUFNATIVE = 21;
BOOLEAN = 6;
INT8 = 7;
INT16 = 8;
INT32 = 9;
INT64 = 10;
FLOAT = 11;
DOUBLE = 12;
DATE = 13;
TIME = 14;
TIMESTAMP = 15;
KEYVALUE = 16;
INSTANT = 17;
LOCALDATE = 18;
LOCALTIME = 19;
LOCALDATETIME = 20;
PROTOBUFNATIVE = 21;
}
message KeyValuePair {
required string key = 1;
Expand Down
26 changes: 13 additions & 13 deletions pulsar-common/src/main/proto/PulsarApi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ enum CompressionType {
}

enum ProducerAccessMode {
Shared = 0; // By default multiple producers can publish on a topic
Exclusive = 1; // Require exclusive access for producer. Fail immediately if there's already a producer connected.
WaitForExclusive = 2; // Producer creation is pending until it can acquire exclusive access
Shared = 0; // By default multiple producers can publish on a topic
Exclusive = 1; // Require exclusive access for producer. Fail immediately if there's already a producer connected.
WaitForExclusive = 2; // Producer creation is pending until it can acquire exclusive access
}

message MessageMetadata {
Expand Down Expand Up @@ -150,11 +150,11 @@ message MessageMetadata {
optional uint64 highest_sequence_id = 24 [default = 0];

// Indicate if the message payload value is set
optional bool null_value = 25 [ default = false ];
optional bool null_value = 25 [default = false];
optional string uuid = 26;
optional int32 num_chunks_from_msg = 27;
optional int32 total_chunk_msg_size = 28;
optional int32 chunk_id = 29;
optional int32 num_chunks_from_msg = 27;
optional int32 total_chunk_msg_size = 28;
optional int32 chunk_id = 29;

// Indicate if the message partition key is set
optional bool null_partition_key = 30 [default = false];
Expand Down Expand Up @@ -474,11 +474,11 @@ message CommandProducer {
// Require that this producers will be the only producer allowed on the topic
optional ProducerAccessMode producer_access_mode = 10 [default = Shared];

// Topic epoch is used to fence off producers that reconnects after a new
// exclusive producer has already taken over. This id is assigned by the
// broker on the CommandProducerSuccess. The first time, the client will
// leave it empty and then it will always carry the same epoch number on
// the subsequent reconnections.
// Topic epoch is used to fence off producers that reconnects after a new
// exclusive producer has already taken over. This id is assigned by the
// broker on the CommandProducerSuccess. The first time, the client will
// leave it empty and then it will always carry the same epoch number on
// the subsequent reconnections.
optional uint64 topic_epoch = 11;
}

Expand Down Expand Up @@ -625,7 +625,7 @@ message CommandProducerSuccess {
optional uint64 topic_epoch = 5;

// If producer is not "ready", the client will avoid to timeout the request
// for creating the producer. Instead it will wait indefinitely until it gets
// for creating the producer. Instead it will wait indefinitely until it gets
// a subsequent `CommandProducerSuccess` with `producer_ready==true`.
optional bool producer_ready = 6 [default = true];
}
Expand Down
4 changes: 2 additions & 2 deletions pulsar-common/src/main/proto/PulsarMarkers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ message ClusterMessageId {
}

message MarkersMessageIdData {
required uint64 ledger_id = 1;
required uint64 entry_id = 2;
required uint64 ledger_id = 1;
required uint64 entry_id = 2;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ service InstanceControl {
}

message Metrics {
message InstanceMetrics {
string name = 1;
int32 instanceId = 2;
MetricsData metricsData = 3;
}
repeated InstanceMetrics metrics = 1;
message InstanceMetrics {
string name = 1;
int32 instanceId = 2;
MetricsData metricsData = 3;
}
repeated InstanceMetrics metrics = 1;
}

0 comments on commit 1aa7c9b

Please sign in to comment.