hdfs.proto 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. // This file contains protocol buffers that are used throughout HDFS -- i.e.
  19. // by the client, server, and data transfer protocols.
  20. option java_package = "org.apache.hadoop.hdfs.protocol.proto";
  21. option java_outer_classname = "HdfsProtos";
  22. option java_generate_equals_and_hash = true;
  23. message ExtendedBlockProto {
  24. required string poolId = 1;
  25. required uint64 blockId = 2;
  26. required uint64 numBytes = 3;
  27. required uint64 generationStamp = 4;
  28. }
  29. message BlockTokenIdentifierProto {
  30. required bytes identifier = 1;
  31. required bytes password = 2;
  32. required string kind = 3;
  33. required string service = 4;
  34. }
  35. message DatanodeIDProto {
  36. required string name = 1;
  37. required string storageID = 2;
  38. required uint32 infoPort = 3;
  39. }
  40. message DatanodeInfoProto {
  41. required DatanodeIDProto id = 1;
  42. optional uint64 capacity = 2;
  43. optional uint64 dfsUsed = 3;
  44. optional uint64 remaining = 4;
  45. optional uint64 blockPoolUsed = 5;
  46. optional uint64 lastUpdate = 6;
  47. optional uint32 xceiverCount = 7;
  48. optional string location = 8;
  49. optional string hostName = 9;
  50. enum AdminState {
  51. NORMAL = 0;
  52. DECOMMISSION_INPROGRESS = 1;
  53. DECOMMISSIONED = 2;
  54. }
  55. optional AdminState adminState = 10;
  56. }