StorageContainerLocationProtocol.proto 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. /**
  19. * These .proto interfaces are private and unstable.
  20. * Please see http://wiki.apache.org/hadoop/Compatibility
  21. * for what changes are allowed for a *unstable* .proto interface.
  22. */
  23. option java_package = "org.apache.hadoop.ozone.protocol.proto";
  24. option java_outer_classname = "StorageContainerLocationProtocolProtos";
  25. option java_generic_services = true;
  26. option java_generate_equals_and_hash = true;
  27. package hadoop.hdfs;
  28. import "hdfs.proto";
  29. /**
  30. * keys - batch of object keys to find
  31. */
  32. message GetStorageContainerLocationsRequestProto {
  33. repeated string keys = 1;
  34. }
  35. /**
  36. * locatedContainers - for each requested hash, nodes that currently host the
  37. * container for that object key hash
  38. */
  39. message GetStorageContainerLocationsResponseProto {
  40. repeated LocatedContainerProto locatedContainers = 1;
  41. }
  42. /**
  43. * Holds the nodes that currently host the container for an object key.
  44. */
  45. message LocatedContainerProto {
  46. required string key = 1;
  47. required string matchedKeyPrefix = 2;
  48. required string containerName = 3;
  49. repeated DatanodeInfoProto locations = 4;
  50. required DatanodeInfoProto leader = 5;
  51. }
  52. /**
  53. * Protocol used from an HDFS node to StorageContainerManager. See the request
  54. * and response messages for details of the RPC calls.
  55. */
  56. service StorageContainerLocationProtocolService {
  57. /**
  58. * Find the set of nodes that currently host the container of an object, as
  59. * identified by the object key hash. This method supports batch lookup by
  60. * passing multiple key hashes.
  61. */
  62. rpc getStorageContainerLocations(GetStorageContainerLocationsRequestProto)
  63. returns(GetStorageContainerLocationsResponseProto);
  64. }