123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- /**
- * 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 required 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.
- */
- /**
- * These .proto interfaces are private and unstable.
- * Please see http://wiki.apache.org/hadoop/Compatibility
- * for what changes are allowed for a *unstable* .proto interface.
- */
- option java_package = "org.apache.hadoop.hdds.protocol.proto";
- option java_outer_classname = "ScmBlockLocationProtocolProtos";
- option java_generic_services = true;
- option java_generate_equals_and_hash = true;
- package hadoop.hdds;
- import "hdds.proto";
- // SCM Block protocol
- /**
- * Request send to SCM asking allocate block of specified size.
- */
- message AllocateScmBlockRequestProto {
- required uint64 size = 1;
- required ReplicationType type = 2;
- required hadoop.hdds.ReplicationFactor factor = 3;
- required string owner = 4;
- optional string traceID = 5;
- optional ExcludeListProto excludeList = 6;
- }
- /**
- * A delete key request sent by OM to SCM, it contains
- * multiple number of keys (and their blocks).
- */
- message DeleteScmKeyBlocksRequestProto {
- repeated KeyBlocks keyBlocks = 1;
- }
- /**
- * A object key and all its associated blocks.
- * We need to encapsulate object key name plus the blocks in this potocol
- * because SCM needs to response OM with the keys it has deleted.
- * If the response only contains blocks, it will be very expensive for
- * OM to figure out what keys have been deleted.
- */
- message KeyBlocks {
- required string key = 1;
- repeated BlockID blocks = 2;
- }
- /**
- * A delete key response from SCM to OM, it contains multiple child-results.
- * Each child-result represents a key deletion result, only if all blocks of
- * a key are successfully deleted, this key result is considered as succeed.
- */
- message DeleteScmKeyBlocksResponseProto {
- repeated DeleteKeyBlocksResultProto results = 1;
- optional string traceID = 2;
- }
- /**
- * A key deletion result. It contains all the block deletion results.
- */
- message DeleteKeyBlocksResultProto {
- required string objectKey = 1;
- repeated DeleteScmBlockResult blockResults = 2;
- }
- message DeleteScmBlockResult {
- enum Result {
- success = 1;
- chillMode = 2;
- errorNotFound = 3;
- unknownFailure = 4;
- }
- required Result result = 1;
- required BlockID blockID = 2;
- }
- /**
- * Reply from SCM indicating that the container.
- */
- message AllocateScmBlockResponseProto {
- enum Error {
- success = 1;
- errorNotEnoughSpace = 2;
- errorSizeTooBig = 3;
- unknownFailure = 4;
- }
- required Error errorCode = 1;
- optional ContainerBlockID containerBlockID = 2;
- optional hadoop.hdds.Pipeline pipeline = 3;
- optional string errorMessage = 4;
- }
- /**
- * Protocol used from OzoneManager to StorageContainerManager.
- * See request and response messages for details of the RPC calls.
- */
- service ScmBlockLocationProtocolService {
- /**
- * Creates a block entry in SCM.
- */
- rpc allocateScmBlock(AllocateScmBlockRequestProto)
- returns (AllocateScmBlockResponseProto);
- /**
- * Deletes blocks for a set of object keys from SCM.
- */
- rpc deleteScmKeyBlocks(DeleteScmKeyBlocksRequestProto)
- returns (DeleteScmKeyBlocksResponseProto);
- /**
- * Gets the scmInfo from SCM.
- */
- rpc getScmInfo(hadoop.hdds.GetScmInfoRequestProto)
- returns (hadoop.hdds.GetScmInfoRespsonseProto);
- }
|