hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject hadoop git commit: HDFS-11130. Block Storage : Add storage client to server protocol. Contributed by Chen Lian
Date Mon, 14 Nov 2016 20:28:19 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-7240 e55bdefda -> 23eba1540


HDFS-11130. Block Storage : Add storage client to server protocol. Contributed by Chen Lian


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/23eba154
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/23eba154
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/23eba154

Branch: refs/heads/HDFS-7240
Commit: 23eba154094b383ed9a9be1b293f318788bdfecc
Parents: e55bdef
Author: Anu Engineer <aengineer@apache.org>
Authored: Mon Nov 14 12:27:38 2016 -0800
Committer: Anu Engineer <aengineer@apache.org>
Committed: Mon Nov 14 12:27:38 2016 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/pom.xml         |  1 +
 .../main/proto/CBlockClientServerProtocol.proto | 76 ++++++++++++++++++++
 2 files changed, 77 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/23eba154/hadoop-hdfs-project/hadoop-hdfs/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/pom.xml
index 2bbf253..d375cc7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml
+++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml
@@ -353,6 +353,7 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd">
                   <include>StorageContainerLocationProtocol.proto</include>
                   <include>StorageContainerDatanodeProtocol.proto</include>
                   <include>CBlockServiceProtocol.proto</include>
+                  <include>CBlockClientServerProtocol.proto</include>
                 </includes>
               </source>
             </configuration>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/23eba154/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/CBlockClientServerProtocol.proto
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/CBlockClientServerProtocol.proto
b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/CBlockClientServerProtocol.proto
new file mode 100644
index 0000000..d19dd4b
--- /dev/null
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/CBlockClientServerProtocol.proto
@@ -0,0 +1,76 @@
+/**
+ * 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.cblock.protocol.proto";
+option java_outer_classname = "CBlockClientServerProtocolProtos";
+option java_generic_services = true;
+option java_generate_equals_and_hash = true;
+package hadoop.cblock;
+
+/**
+* This message is sent from CBlock client side to CBlock server to
+* mount a volume specified by owner name and volume name.
+*
+* Right now, this is the only communication between client and server.
+* After the volume is mounted, CBlock client will talk to containers
+* by itself, nothing to do with CBlock server.
+*/
+message MountVolumeRequestProto {
+    required string userName = 1;
+    required string volumeName = 2;
+}
+
+/**
+* This message is sent from CBlock server to CBlock client as response
+* of mount a volume. It checks the whether the volume is valid to access
+* at all.(e.g. volume exist)
+*
+* And include enough information (volume size, block size, list of
+* containers for this volume) for client side to perform read/write on
+* the volume.
+*/
+message MountVolumeResponseProto {
+    required bool isValid = 1;
+    optional string userName = 2;
+    optional string volumeName = 3;
+    optional uint64 volumeSize = 4;
+    optional uint32 blockSize = 5;
+    repeated ContainerIDProto allContainerIDs = 6;
+}
+
+/**
+* This message include ID of container which can be used to locate the
+* container. Since the order of containers needs to be maintained, also
+* includes a index field to verify the correctness of the order.
+*/
+message ContainerIDProto {
+    required string containerID = 1;
+    required uint64 index = 2;
+}
+
+service CBlockClientServerProtocolService {
+    /**
+    * mount the volume.
+    */
+    rpc mountVolume(MountVolumeRequestProto) returns (MountVolumeResponseProto);
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message