[32/50] [abbrv] hadoop git commit: HDFS-7853. Erasure coding: extend LocatedBlocks to support reading from striped files. Contributed by Jing Zhao.
HDFS-7853. Erasure coding: extend LocatedBlocks to support reading from striped files. Contributed by Jing Zhao. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ec4f2243 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ec4f2243 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ec4f2243 Branch: refs/heads/HDFS-7285 Commit: ec4f2243fd2c50ca00db3a609d11feaf177846a9 Parents: 0c6ed98 Author: Jing Zhao ji...@apache.org Authored: Mon Mar 9 14:59:58 2015 -0700 Committer: Zhe Zhang z...@apache.org Committed: Mon Mar 30 10:11:26 2015 -0700 -- .../hadoop/hdfs/protocol/LocatedBlock.java | 5 +- .../hdfs/protocol/LocatedStripedBlock.java | 68 + ...tNamenodeProtocolServerSideTranslatorPB.java | 14 +- .../ClientNamenodeProtocolTranslatorPB.java | 13 +- .../DatanodeProtocolClientSideTranslatorPB.java | 2 +- .../DatanodeProtocolServerSideTranslatorPB.java | 2 +- .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 80 +++ .../blockmanagement/BlockInfoStriped.java | 5 + .../BlockInfoStripedUnderConstruction.java | 99 +++-- .../server/blockmanagement/BlockManager.java| 51 --- .../blockmanagement/DatanodeDescriptor.java | 4 +- .../blockmanagement/DatanodeStorageInfo.java| 3 +- .../server/namenode/FSImageFormatPBINode.java | 21 +-- .../hdfs/server/namenode/FSNamesystem.java | 34 +++-- .../hadoop-hdfs/src/main/proto/hdfs.proto | 1 + .../org/apache/hadoop/hdfs/DFSTestUtil.java | 12 ++ .../hadoop/hdfs/protocolPB/TestPBHelper.java| 16 +-- .../datanode/TestIncrementalBrVariations.java | 14 +- .../server/namenode/TestAddStripedBlocks.java | 141 +++ .../hdfs/server/namenode/TestFSImage.java | 5 +- 20 files changed, 444 insertions(+), 146 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/ec4f2243/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java index e729869..a38e8f2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java @@ -25,7 +25,6 @@ import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier; import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo; -import org.apache.hadoop.hdfs.protocol.DatanodeInfoWithStorage; import org.apache.hadoop.security.token.Token; import com.google.common.collect.Lists; @@ -51,14 +50,14 @@ public class LocatedBlock { // else false. If block has few corrupt replicas, they are filtered and // their locations are not part of this object private boolean corrupt; - private TokenBlockTokenIdentifier blockToken = new TokenBlockTokenIdentifier(); + private TokenBlockTokenIdentifier blockToken = new Token(); /** * List of cached datanode locations */ private DatanodeInfo[] cachedLocs; // Used when there are no locations - private static final DatanodeInfoWithStorage[] EMPTY_LOCS = + static final DatanodeInfoWithStorage[] EMPTY_LOCS = new DatanodeInfoWithStorage[0]; public LocatedBlock(ExtendedBlock b, DatanodeInfo[] locs) { http://git-wip-us.apache.org/repos/asf/hadoop/blob/ec4f2243/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java new file mode 100644 index 000..97e3a69 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java @@ -0,0 +1,68 @@ +/** + * 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
[32/50] [abbrv] hadoop git commit: HDFS-7853. Erasure coding: extend LocatedBlocks to support reading from striped files. Contributed by Jing Zhao.
HDFS-7853. Erasure coding: extend LocatedBlocks to support reading from striped files. Contributed by Jing Zhao. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2acf8b18 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2acf8b18 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2acf8b18 Branch: refs/heads/HDFS-7285 Commit: 2acf8b18d74d7300062904d307d8d33cab587648 Parents: 11b648b Author: Jing Zhao ji...@apache.org Authored: Mon Mar 9 14:59:58 2015 -0700 Committer: Zhe Zhang z...@apache.org Committed: Tue Mar 24 11:16:33 2015 -0700 -- .../hadoop/hdfs/protocol/LocatedBlock.java | 5 +- .../hdfs/protocol/LocatedStripedBlock.java | 68 + ...tNamenodeProtocolServerSideTranslatorPB.java | 14 +- .../ClientNamenodeProtocolTranslatorPB.java | 13 +- .../DatanodeProtocolClientSideTranslatorPB.java | 2 +- .../DatanodeProtocolServerSideTranslatorPB.java | 2 +- .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 80 +++ .../blockmanagement/BlockInfoStriped.java | 5 + .../BlockInfoStripedUnderConstruction.java | 99 +++-- .../server/blockmanagement/BlockManager.java| 51 --- .../blockmanagement/DatanodeDescriptor.java | 4 +- .../blockmanagement/DatanodeStorageInfo.java| 3 +- .../server/namenode/FSImageFormatPBINode.java | 21 +-- .../hdfs/server/namenode/FSNamesystem.java | 34 +++-- .../hadoop-hdfs/src/main/proto/hdfs.proto | 1 + .../org/apache/hadoop/hdfs/DFSTestUtil.java | 12 ++ .../hadoop/hdfs/protocolPB/TestPBHelper.java| 16 +-- .../datanode/TestIncrementalBrVariations.java | 14 +- .../server/namenode/TestAddStripedBlocks.java | 141 +++ .../hdfs/server/namenode/TestFSImage.java | 5 +- 20 files changed, 444 insertions(+), 146 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2acf8b18/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java index e729869..a38e8f2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedBlock.java @@ -25,7 +25,6 @@ import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier; import org.apache.hadoop.hdfs.server.blockmanagement.DatanodeStorageInfo; -import org.apache.hadoop.hdfs.protocol.DatanodeInfoWithStorage; import org.apache.hadoop.security.token.Token; import com.google.common.collect.Lists; @@ -51,14 +50,14 @@ public class LocatedBlock { // else false. If block has few corrupt replicas, they are filtered and // their locations are not part of this object private boolean corrupt; - private TokenBlockTokenIdentifier blockToken = new TokenBlockTokenIdentifier(); + private TokenBlockTokenIdentifier blockToken = new Token(); /** * List of cached datanode locations */ private DatanodeInfo[] cachedLocs; // Used when there are no locations - private static final DatanodeInfoWithStorage[] EMPTY_LOCS = + static final DatanodeInfoWithStorage[] EMPTY_LOCS = new DatanodeInfoWithStorage[0]; public LocatedBlock(ExtendedBlock b, DatanodeInfo[] locs) { http://git-wip-us.apache.org/repos/asf/hadoop/blob/2acf8b18/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java new file mode 100644 index 000..97e3a69 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/LocatedStripedBlock.java @@ -0,0 +1,68 @@ +/** + * 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