123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300 |
- /**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- option java_package = "org.apache.hadoop.hdfs.federation.protocol.proto";
- option java_outer_classname = "HdfsServerFederationProtos";
- option java_generic_services = true;
- option java_generate_equals_and_hash = true;
- package hadoop.hdfs;
- import "hdfs.proto";
- /////////////////////////////////////////////////
- // Membership
- /////////////////////////////////////////////////
- message NamenodeMembershipStatsRecordProto {
- optional uint64 totalSpace = 1;
- optional uint64 availableSpace = 2;
- optional uint64 providedSpace = 3;
- optional uint64 numOfFiles = 10;
- optional uint64 numOfBlocks = 11;
- optional uint64 numOfBlocksMissing = 12;
- optional uint64 numOfBlocksPendingReplication = 13;
- optional uint64 numOfBlocksUnderReplicated = 14;
- optional uint64 numOfBlocksPendingDeletion = 15;
- optional uint32 numOfActiveDatanodes = 20;
- optional uint32 numOfDeadDatanodes = 21;
- optional uint32 numOfDecommissioningDatanodes = 22;
- optional uint32 numOfDecomActiveDatanodes = 23;
- optional uint32 numOfDecomDeadDatanodes = 24;
- optional uint32 numOfStaleDatanodes = 25;
- optional uint32 numOfInMaintenanceLiveDataNodes = 26;
- optional uint32 numOfInMaintenanceDeadDataNodes = 27;
- optional uint32 numOfEnteringMaintenanceDataNodes = 28;
- }
- message NamenodeMembershipRecordProto {
- optional uint64 dateCreated = 1;
- optional uint64 dateModified = 2;
- optional uint64 lastContact = 3;
- optional string routerId = 4;
- optional string nameserviceId = 5;
- optional string namenodeId = 6;
- optional string clusterId = 7;
- optional string blockPoolId = 8;
- optional string webAddress = 9;
- optional string rpcAddress = 10;
- optional string serviceAddress = 11;
- optional string lifelineAddress = 12;
- optional string state = 13;
- optional bool isSafeMode = 14;
- optional NamenodeMembershipStatsRecordProto stats = 15;
- }
- message FederationNamespaceInfoProto {
- optional string blockPoolId = 1;
- optional string clusterId = 2;
- optional string nameserviceId = 3;
- }
- message GetNamenodeRegistrationsRequestProto {
- optional NamenodeMembershipRecordProto membership = 1;
- }
- message GetNamenodeRegistrationsResponseProto {
- repeated NamenodeMembershipRecordProto namenodeMemberships = 1;
- }
- message GetExpiredRegistrationsRequestProto {
- }
- message GetNamespaceInfoRequestProto {
- }
- message GetNamespaceInfoResponseProto {
- repeated FederationNamespaceInfoProto namespaceInfos = 1;
- }
- message UpdateNamenodeRegistrationRequestProto {
- optional string nameserviceId = 1;
- optional string namenodeId = 2;
- optional string state = 3;
- }
- message UpdateNamenodeRegistrationResponseProto {
- optional bool status = 1;
- }
- message NamenodeHeartbeatRequestProto {
- optional NamenodeMembershipRecordProto namenodeMembership = 1;
- }
- message NamenodeHeartbeatResponseProto {
- optional bool status = 1;
- }
- /////////////////////////////////////////////////
- // Mount table
- /////////////////////////////////////////////////
- message RemoteLocationProto {
- optional string nameserviceId = 1;
- optional string path = 2;
- }
- message MountTableRecordProto {
- optional string srcPath = 1;
- repeated RemoteLocationProto destinations = 2;
- optional uint64 dateCreated = 3;
- optional uint64 dateModified = 4;
- optional bool readOnly = 5 [default = false];
- enum DestOrder {
- HASH = 0;
- LOCAL = 1;
- RANDOM = 2;
- HASH_ALL = 3;
- SPACE = 4;
- }
- optional DestOrder destOrder = 6 [default = HASH];
- optional string ownerName = 10;
- optional string groupName = 11;
- optional int32 mode = 12;
- optional QuotaUsageProto quota = 13;
- optional bool faultTolerant = 14 [default = false];
- }
- message AddMountTableEntryRequestProto {
- optional MountTableRecordProto entry = 1;
- }
- message AddMountTableEntryResponseProto {
- optional bool status = 1;
- }
- message UpdateMountTableEntryRequestProto {
- optional MountTableRecordProto entry = 1;
- }
- message UpdateMountTableEntryResponseProto {
- optional bool status = 1;
- }
- message RemoveMountTableEntryRequestProto {
- optional string srcPath = 1;
- }
- message RemoveMountTableEntryResponseProto{
- optional bool status = 1;
- }
- message GetMountTableEntriesRequestProto {
- optional string srcPath = 1;
- }
- message GetMountTableEntriesResponseProto {
- repeated MountTableRecordProto entries = 1;
- optional uint64 timestamp = 2;
- }
- message GetDestinationRequestProto {
- optional string srcPath = 1;
- }
- message GetDestinationResponseProto {
- repeated string destinations = 1;
- }
- /////////////////////////////////////////////////
- // Routers
- /////////////////////////////////////////////////
- message StateStoreVersionRecordProto {
- optional uint64 membershipVersion = 1;
- optional uint64 mountTableVersion = 2;
- }
- message RouterRecordProto {
- optional uint64 dateCreated = 1;
- optional uint64 dateModified = 2;
- optional string address = 3;
- optional string status = 4;
- optional StateStoreVersionRecordProto stateStoreVersion = 5;
- optional string version = 6;
- optional string compileInfo = 7;
- optional uint64 dateStarted = 8;
- optional string adminAddress = 9;
- }
- message GetRouterRegistrationRequestProto {
- optional string routerId = 1;
- }
- message GetRouterRegistrationResponseProto {
- optional RouterRecordProto router = 1;
- }
- message GetRouterRegistrationsRequestProto {
- }
- message GetRouterRegistrationsResponseProto {
- optional uint64 timestamp = 1;
- repeated RouterRecordProto routers = 2;
- }
- message RouterHeartbeatRequestProto {
- optional RouterRecordProto router = 1;
- }
- message RouterHeartbeatResponseProto {
- optional bool status = 1;
- }
- message RefreshMountTableEntriesRequestProto {
- }
- message RefreshMountTableEntriesResponseProto {
- optional bool result = 1;
- }
- /////////////////////////////////////////////////
- // Route State
- /////////////////////////////////////////////////
- message EnterSafeModeRequestProto {
- }
- message EnterSafeModeResponseProto {
- optional bool status = 1;
- }
- message LeaveSafeModeRequestProto {
- }
- message LeaveSafeModeResponseProto {
- optional bool status = 1;
- }
- message GetSafeModeRequestProto {
- }
- message GetSafeModeResponseProto {
- optional bool isInSafeMode = 1;
- }
- /////////////////////////////////////////////////
- // Disabled Nameservice State
- /////////////////////////////////////////////////
- message DisabledNameserviceRecordProto {
- optional uint64 dateCreated = 1;
- optional uint64 dateModified = 2;
- optional string nameServiceId = 3;
- }
- message DisableNameserviceRequestProto {
- optional string nameServiceId = 1;
- }
- message DisableNameserviceResponseProto {
- optional bool status = 1;
- }
- message EnableNameserviceRequestProto {
- optional string nameServiceId = 1;
- }
- message EnableNameserviceResponseProto {
- optional bool status = 1;
- }
- message GetDisabledNameservicesRequestProto {
- }
- message GetDisabledNameservicesResponseProto {
- repeated string nameServiceIds = 1;
- }
|