erasurecoding.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. syntax="proto2";
  19. option java_package = "org.apache.hadoop.hdfs.protocol.proto";
  20. option java_outer_classname = "ErasureCodingProtos";
  21. option java_generate_equals_and_hash = true;
  22. package hadoop.hdfs;
  23. import "hdfs.proto";
  24. message SetErasureCodingPolicyRequestProto {
  25. required string src = 1;
  26. optional string ecPolicyName = 2;
  27. }
  28. message SetErasureCodingPolicyResponseProto {
  29. }
  30. message GetErasureCodingPoliciesRequestProto { // void request
  31. }
  32. message GetErasureCodingPoliciesResponseProto {
  33. repeated ErasureCodingPolicyProto ecPolicies = 1;
  34. }
  35. message GetErasureCodingCodecsRequestProto { // void request
  36. }
  37. message GetErasureCodingCodecsResponseProto {
  38. repeated CodecProto codec = 1;
  39. }
  40. message GetErasureCodingPolicyRequestProto {
  41. required string src = 1; // path to get the policy info
  42. }
  43. message GetErasureCodingPolicyResponseProto {
  44. optional ErasureCodingPolicyProto ecPolicy = 1;
  45. }
  46. message AddErasureCodingPoliciesRequestProto {
  47. repeated ErasureCodingPolicyProto ecPolicies = 1;
  48. }
  49. message AddErasureCodingPoliciesResponseProto {
  50. repeated AddErasureCodingPolicyResponseProto responses = 1;
  51. }
  52. message RemoveErasureCodingPolicyRequestProto {
  53. required string ecPolicyName = 1;
  54. }
  55. message RemoveErasureCodingPolicyResponseProto {
  56. }
  57. message EnableErasureCodingPolicyRequestProto {
  58. required string ecPolicyName = 1;
  59. }
  60. message EnableErasureCodingPolicyResponseProto {
  61. }
  62. message DisableErasureCodingPolicyRequestProto {
  63. required string ecPolicyName = 1;
  64. }
  65. message DisableErasureCodingPolicyResponseProto {
  66. }
  67. message UnsetErasureCodingPolicyRequestProto {
  68. required string src = 1;
  69. }
  70. message UnsetErasureCodingPolicyResponseProto {
  71. }
  72. /**
  73. * Block erasure coding reconstruction info
  74. */
  75. message BlockECReconstructionInfoProto {
  76. required ExtendedBlockProto block = 1;
  77. required DatanodeInfosProto sourceDnInfos = 2;
  78. required DatanodeInfosProto targetDnInfos = 3;
  79. required StorageUuidsProto targetStorageUuids = 4;
  80. required StorageTypesProto targetStorageTypes = 5;
  81. required bytes liveBlockIndices = 6;
  82. required ErasureCodingPolicyProto ecPolicy = 7;
  83. }
  84. /**
  85. * Codec and it's corresponding coders
  86. */
  87. message CodecProto {
  88. required string codec = 1;
  89. required string coders = 2;
  90. }