Return-Path: X-Original-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA26F7AF6 for ; Mon, 21 Nov 2011 21:10:26 +0000 (UTC) Received: (qmail 12145 invoked by uid 500); 21 Nov 2011 21:10:26 -0000 Delivered-To: apmail-hadoop-hdfs-commits-archive@hadoop.apache.org Received: (qmail 12117 invoked by uid 500); 21 Nov 2011 21:10:26 -0000 Mailing-List: contact hdfs-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-commits@hadoop.apache.org Received: (qmail 12109 invoked by uid 99); 21 Nov 2011 21:10:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2011 21:10:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2011 21:10:25 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2717023889B3; Mon, 21 Nov 2011 21:10:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1204707 [3/3] - in /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/main/java/org/apache/hadoop/hdfs/protocol/proto/NamenodeProtocolProtos.java src/proto/NamenodeProtocol.proto Date: Mon, 21 Nov 2011 21:10:04 -0000 To: hdfs-commits@hadoop.apache.org From: suresh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111121211005.2717023889B3@eris.apache.org> Added: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/proto/NamenodeProtocol.proto URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/proto/NamenodeProtocol.proto?rev=1204707&view=auto ============================================================================== --- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/proto/NamenodeProtocol.proto (added) +++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/proto/NamenodeProtocol.proto Mon Nov 21 21:10:04 2011 @@ -0,0 +1,225 @@ +/** + * 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. + */ + +// This file contains protocol buffers that are used throughout HDFS -- i.e. +// by the client, server, and data transfer protocols. + +option java_package = "org.apache.hadoop.hdfs.protocol.proto"; +option java_outer_classname = "NamenodeProtocolProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; + +import "hdfs.proto"; + +/** + * Get list of blocks for a given datanode with the total length + * of adding up to given size + * datanode - Datanode ID to get list of block from + * size - size to which the block lengths must add up to + */ +message GetBlocksRequestProto { + required DatanodeIDProto datanode = 1; // Datanode ID + required uint64 size = 2; // Size in bytes +} + + +/** + * blocks - List of returned blocks + */ +message GetBlocksResponseProto { + required BlockWithLocationsProto blocks = 1; // List of blocks +} + +/** + * void request + */ +message GetBlockKeysRequestProto { +} + +/** + * keys - Information about block keys at the active namenode + */ +message GetBlockKeysResponseProto { + required ExportedBlockKeysProto keys = 1; +} + +/** + * void request + */ +message GetTransactionIdRequestProto { +} + +/** + * txId - Transaction ID of the most recently persisted edit log record + */ +message GetTransactionIdResponseProto { + required uint64 txId = 1; // Transaction ID +} + +/** + * void request + */ +message RollEditLogRequestProto { +} + +/** + * signature - A unique token to identify checkpoint transaction + */ +message RollEditLogResponseProto { + required CheckpointSignatureProto signature = 1; +} + +/** + * registartion - Namenode reporting the error + * errorCode - error code indicating the error + * msg - Free text description of the error + */ +message ErrorReportRequestProto { + required NamenodeRegistrationProto registartion = 1; // Registartion info + required uint32 errorCode = 2; // Error code + required string msg = 3; // Error message +} + +/** + * void response + */ +message ErrorReportResponseProto { +} + +/** + * registration - Information of the namenode registering with primary namenode + */ +message RegisterRequestProto { + required NamenodeRegistrationProto registration = 1; // Registration info +} + +/** + * registration - Updated registration information of the newly registered + * datanode. + */ +message RegisterResponseProto { + required NamenodeRegistrationProto registration = 1; // Registration info +} + +/** + * Start checkpoint request + * registration - Namenode that is starting the checkpoint + */ +message StartCheckpointRequestProto { + required NamenodeRegistrationProto registration = 1; // Registration info +} + +/** + * command - Command returned by the active namenode to be + * be handled by the caller. + */ +message StartCheckpointResponseProto { + required NamenodeCommandProto command = 1; +} + +/** + * End or finalize the previously started checkpoint + * registration - Namenode that is ending the checkpoint + * signature - unique token to identify checkpoint transaction, + * that was received when checkpoint was started. + */ +message EndCheckpointRequestProto { + required NamenodeRegistrationProto registration = 1; // Registration info + required CheckpointSignatureProto signature = 2; +} + +/** + * void response + */ +message EndCheckpointResponseProto { +} + +/** + * sinceTxId - return the editlog information for transactions >= sinceTxId + */ +message GetEditLogManifestRequestProto { + required uint64 sinceTxId = 1; // Transaction ID +} + +/** + * manifest - Enumeration of editlogs from namenode for + * logs >= sinceTxId in the request + */ +message GetEditLogManifestResponseProto { + required RemoteEditLogManifestProto manifest = 1; +} + +/** + * Protocol used by the sub-ordinate namenode to send requests + * the active/primary namenode. + * + * See the request and response for details of rpc call. + */ +service NamenodeProtocolService { + /** + * Get list of blocks for a given datanode with length + * of blocks adding up to given size. + */ + rpc getBlocks(GetBlocksRequestProto) returns(GetBlocksResponseProto); + + /** + * Get the current block keys + */ + rpc getBlockKeys(GetBlockKeysRequestProto) returns(GetBlockKeysResponseProto); + + /** + * Get the transaction ID of the most recently persisted editlog record + */ + rpc getTransationId(GetTransactionIdRequestProto) + returns(GetTransactionIdResponseProto); + + /** + * Close the current editlog and open a new one for checkpointing purposes + */ + rpc rollEditLog(RollEditLogRequestProto) returns(RollEditLogResponseProto); + + /** + * Report from a sub-ordinate namenode of an error to the active namenode. + * Active namenode may decide to unregister the reporting namenode + * depending on the error. + */ + rpc errorReport(ErrorReportRequestProto) returns(ErrorReportResponseProto); + + /** + * Request to register a sub-ordinate namenode + */ + rpc register(RegisterRequestProto) returns(RegisterResponseProto); + + /** + * Request to start a checkpoint. + */ + rpc startCheckpoint(StartCheckpointRequestProto) + returns(StartCheckpointResponseProto); + + /** + * End of finalize the previously started checkpoint + */ + rpc endCheckpoint(EndCheckpointRequestProto) + returns(EndCheckpointResponseProto); + + /** + * Get editlog manifests from the active namenode for all the editlogs + */ + rpc getEditLogManifest(GetEditLogManifestRequestProto) + returns(GetEditLogManifestResponseProto); +}