-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SERIALIZATION] Serialize Borker info in Clusterinfo (#1721)
- Loading branch information
1 parent
6b4e546
commit 5114183
Showing
8 changed files
with
258 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
common/src/main/proto/org/astraea/common/generated/ClusterInfo.proto
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
common/src/main/proto/org/astraea/common/generated/admin/Broker.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
|
||
package org.astraea.common.generated.admin; | ||
|
||
import "org/astraea/common/generated/admin/TopicPartition.proto"; | ||
|
||
message Broker { | ||
int32 id = 1; | ||
string host = 2; | ||
int32 port = 3; | ||
bool isController = 4; | ||
map<string, string> config = 5; | ||
repeated DataFolder dataFolder = 6; | ||
repeated TopicPartition topicPartitions = 7; | ||
repeated TopicPartition topicPartitionLeaders = 8; | ||
|
||
message DataFolder { | ||
string path = 1; | ||
map<string, int64> partitionSizes = 2; | ||
map<string, int64> orphanPartitionSizes = 3; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
common/src/main/proto/org/astraea/common/generated/admin/ClusterInfo.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
syntax = "proto3"; | ||
|
||
package org.astraea.common.generated.admin; | ||
|
||
import "org/astraea/common/generated/admin/Broker.proto"; | ||
import "org/astraea/common/generated/admin/Topic.proto"; | ||
import "org/astraea/common/generated/admin/Replica.proto"; | ||
|
||
message ClusterInfo { | ||
string clusterId = 1; | ||
repeated Broker broker = 2; | ||
repeated Topic topic = 3; | ||
repeated Replica replica = 4; | ||
} |
22 changes: 22 additions & 0 deletions
22
common/src/main/proto/org/astraea/common/generated/admin/Replica.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
|
||
package org.astraea.common.generated.admin; | ||
|
||
import "org/astraea/common/generated/admin/Broker.proto"; | ||
|
||
message Replica { | ||
string topic = 1; | ||
int32 partition = 2; | ||
Broker broker = 3; | ||
bool isLeader = 7; | ||
bool isSync = 10; | ||
bool isOffline = 12; | ||
bool isAdding = 8; | ||
bool isRemoving = 9; | ||
bool isFuture = 11; | ||
bool isPreferredLeader = 13; | ||
int64 lag = 4; | ||
int64 size = 5; | ||
string path = 14; | ||
bool isInternal = 6; | ||
} |
10 changes: 10 additions & 0 deletions
10
common/src/main/proto/org/astraea/common/generated/admin/Topic.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
syntax = "proto3"; | ||
|
||
package org.astraea.common.generated.admin; | ||
|
||
message Topic { | ||
string name = 1; | ||
map<string, string> config = 2; | ||
bool internal = 3; | ||
repeated int32 partitionIds = 4; | ||
} |
8 changes: 8 additions & 0 deletions
8
common/src/main/proto/org/astraea/common/generated/admin/TopicPartition.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
syntax = "proto3"; | ||
|
||
package org.astraea.common.generated.admin; | ||
|
||
message TopicPartition { | ||
int32 partition = 1; | ||
string topic = 2; | ||
} |
Oops, something went wrong.