|
| 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 | +see: http://plantuml.com/sequence.html |
| 20 | + |
| 21 | + |
| 22 | +@startuml |
| 23 | + |
| 24 | +autonumber |
| 25 | + |
| 26 | +actor Client |
| 27 | +database NN |
| 28 | +database DN |
| 29 | +database LocalFS |
| 30 | +database fsEditLog |
| 31 | + |
| 32 | +Title HDFS Startup |
| 33 | + |
| 34 | +== Initialization == |
| 35 | + |
| 36 | +NN -> LocalFS: load keytab |
| 37 | +LocalFS --> NN: keytab |
| 38 | +NN -> KDC: authenticate(hdfs@namenode) |
| 39 | +KDC --> NN: TGT |
| 40 | + |
| 41 | +NN -> fsEditLog : replay |
| 42 | +fsEditLog --> NN : history |
| 43 | + |
| 44 | +rnote over NN |
| 45 | + rebuilds state: all delegation token |
| 46 | + events rebuild delegation token tables. |
| 47 | +endrnote |
| 48 | + |
| 49 | +== Datanode == |
| 50 | + |
| 51 | +DN -> LocalFS: load keytab |
| 52 | +LocalFS --> DN: keytab |
| 53 | +DN -> KDC: authenticate(hdfs@datanode) |
| 54 | +KDC --> DN: TGT |
| 55 | + |
| 56 | +DN -> LocalFS: load block metadata |
| 57 | +LocalFS --> DN: all block information, including BlockKeys |
| 58 | + |
| 59 | +rnote over DN |
| 60 | + DN init BlockTokenSecretManager |
| 61 | +endrnote |
| 62 | + |
| 63 | +DN -> NN : RPC.open |
| 64 | +NN --> DN : authenticate(hdfs@namenode) |
| 65 | +DN -> KDC : request-ticket(hdfs@namenode, TGT) |
| 66 | +KDC -> DN : ticket(hdfs@namenode, hdfs@datanode) |
| 67 | +DN -> NN: ticket(hdfs@namenode, hdfs@datanode) |
| 68 | +DN -> NN : heartbeat (block info, block keys) |
| 69 | + |
| 70 | +rnote over NN |
| 71 | + NN init BlockTokenSecretManager |
| 72 | +endrnote |
| 73 | + |
| 74 | + |
| 75 | +@enduml |
0 commit comments