[08/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/48f975a2 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/48f975a2 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/48f975a2 Branch: refs/heads/HDFS-7285 Commit: 48f975a2f8841b7e8948361aa5153e4b2975c97c Parents: db6c56e Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon May 4 10:13:01 2015 -0700 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 46 .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/48f975a2/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/48f975a2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index cc6a7a1..8415ac8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -118,6 +118,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3097,6 +3098,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/48f975a2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index a94caad..d27dac7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface ClientProtocol { */ @Idempotent public EventBatchList getEditsFromTxid(long txid)
[10/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/736202e9 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/736202e9 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/736202e9 Branch: refs/heads/HDFS-7285 Commit: 736202e96c572b5e920a370aa5c7170b9fdc3b56 Parents: 48f975a Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon May 4 10:13:07 2015 -0700 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/736202e9/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
[17/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/96173cea Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/96173cea Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/96173cea Branch: refs/heads/HDFS-7285 Commit: 96173ceac4ac8fd32c5f4c5414df1bb69d8466c9 Parents: 631916c Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Jing Zhao ji...@apache.org Committed: Wed Apr 29 11:14:10 2015 -0700 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 46 .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/96173cea/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/96173cea/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index f4eea49..16f876c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -117,6 +117,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3095,6 +3096,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/96173cea/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 8efe344..45d92f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface ClientProtocol { */ @Idempotent public EventBatchList getEditsFromTxid(long txid)
[16/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a7a65f22 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a7a65f22 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a7a65f22 Branch: refs/heads/HDFS-7285 Commit: a7a65f225bbfca94a1baa383be634d687da782d2 Parents: 96173ce Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Jing Zhao ji...@apache.org Committed: Wed Apr 29 11:14:10 2015 -0700 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/a7a65f22/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
[15/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/1fd973f2 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/1fd973f2 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/1fd973f2 Branch: refs/heads/HDFS-7285 Commit: 1fd973f224ef1a832c0f47b8a195ef22d4666fd2 Parents: af9472c Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 27 10:42:29 2015 -0700 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/1fd973f2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
[16/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/af9472cb Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/af9472cb Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/af9472cb Branch: refs/heads/HDFS-7285 Commit: af9472cbd777928e65281fdeed8f82e9fbe61d5a Parents: 534fde5 Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 27 10:42:29 2015 -0700 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 46 .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/af9472cb/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/af9472cb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index f4eea49..16f876c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -117,6 +117,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3095,6 +3096,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/af9472cb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 8efe344..45d92f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface ClientProtocol { */ @Idempotent public EventBatchList getEditsFromTxid(long txid)
[28/50] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/2a5cfca2 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/2a5cfca2 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/2a5cfca2 Branch: refs/heads/HDFS-7285 Commit: 2a5cfca2f3856b19f5b2d2f66ba9c4f3e02c5fc0 Parents: 06987aa Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 20 10:28:31 2015 -0700 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 46 .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/2a5cfca2/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/2a5cfca2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index f7b48eb..6627124 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -117,6 +117,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3086,6 +3087,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/2a5cfca2/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 8efe344..45d92f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface ClientProtocol { */ @Idempotent public EventBatchList getEditsFromTxid(long txid)
[39/50] [abbrv] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/afb51edb Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/afb51edb Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/afb51edb Branch: refs/heads/HDFS-7285 Commit: afb51edb8eeb34777d305b8b4d8b5a3a8d1606c9 Parents: bc71c02 Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 13 13:09:58 2015 -0700 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/afb51edb/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
[43/50] [abbrv] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/bc69d45a Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/bc69d45a Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/bc69d45a Branch: refs/heads/HDFS-7285 Commit: bc69d45af3a81f4c1e61ae7829265391d2781e36 Parents: e67086d Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 13 10:56:56 2015 -0700 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 47 +++- .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/bc69d45a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/bc69d45a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index 2ef1d36..b2a69dd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -117,6 +117,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3091,6 +3092,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/bc69d45a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 8efe344..45d92f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface ClientProtocol { */ @Idempotent public EventBatchList getEditsFromTxid(long txid)
[42/50] [abbrv] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/228c6b42 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/228c6b42 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/228c6b42 Branch: refs/heads/HDFS-7285 Commit: 228c6b42b6cbbd3075178f7e47073018a37d2087 Parents: bc69d45 Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 13 10:56:56 2015 -0700 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/228c6b42/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
[02/12] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/75b32770 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/75b32770 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/75b32770 Branch: refs/heads/HDFS-7285 Commit: 75b32770fbc25f1c41dc7212966511ad5d7a481a Parents: c11a02c Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 13 14:08:18 2015 -0700 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/75b32770/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
[03/12] hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c11a02c5 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c11a02c5 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c11a02c5 Branch: refs/heads/HDFS-7285 Commit: c11a02c5f96bfa9db36abc63b19716e3da7d0735 Parents: ae8f0c1 Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Zhe Zhang z...@apache.org Committed: Mon Apr 13 14:08:18 2015 -0700 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 47 +++- .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/c11a02c5/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/c11a02c5/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index 2ef1d36..b2a69dd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -117,6 +117,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3091,6 +3092,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/c11a02c5/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 8efe344..45d92f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface ClientProtocol { */ @Idempotent public EventBatchList getEditsFromTxid(long txid)
hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file
Repository: hadoop Updated Branches: refs/heads/HDFS-7285 d63800e84 - ead48867a HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Added missed file Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ead48867 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ead48867 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ead48867 Branch: refs/heads/HDFS-7285 Commit: ead48867a5aa9ad608c93fa45e2c51022f62ced5 Parents: d63800e Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 14:23:03 2015 +0530 Committer: Vinayakumar B vinayakum...@apache.org Committed: Wed Apr 8 14:23:03 2015 +0530 -- .../org/apache/hadoop/hdfs/protocol/ECInfo.java | 41 1 file changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/ead48867/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java new file mode 100644 index 000..ca642c2 --- /dev/null +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ECInfo.java @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.hadoop.hdfs.protocol; + +import org.apache.hadoop.io.erasurecode.ECSchema; + +/** + * Class to provide information, such as ECSchema, for a file/block. + */ +public class ECInfo { + private final String src; + private final ECSchema schema; + + public ECInfo(String src, ECSchema schema) { +this.src = src; +this.schema = schema; + } + + public String getSrc() { +return src; + } + + public ECSchema getSchema() { +return schema; + } +}
hadoop git commit: HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B)
Repository: hadoop Updated Branches: refs/heads/HDFS-7285 196774350 - d63800e84 HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from NameNode (Contributed by Vinayakumar B) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d63800e8 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d63800e8 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d63800e8 Branch: refs/heads/HDFS-7285 Commit: d63800e84e64d4ce91953efe5604c3129d9f47c0 Parents: 1967743 Author: Vinayakumar B vinayakum...@apache.org Authored: Wed Apr 8 12:48:59 2015 +0530 Committer: Vinayakumar B vinayakum...@apache.org Committed: Wed Apr 8 12:48:59 2015 +0530 -- .../hadoop-hdfs/CHANGES-HDFS-EC-7285.txt| 5 ++- .../java/org/apache/hadoop/hdfs/DFSClient.java | 14 ++ .../hadoop/hdfs/protocol/ClientProtocol.java| 10 + ...tNamenodeProtocolServerSideTranslatorPB.java | 19 .../ClientNamenodeProtocolTranslatorPB.java | 18 .../apache/hadoop/hdfs/protocolPB/PBHelper.java | 47 +++- .../hdfs/server/namenode/FSNamesystem.java | 31 + .../hdfs/server/namenode/NameNodeRpcServer.java | 7 +++ .../src/main/proto/ClientNamenodeProtocol.proto | 10 + .../hadoop-hdfs/src/main/proto/hdfs.proto | 28 .../hadoop/hdfs/TestErasureCodingZones.java | 38 +++- 11 files changed, 223 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d63800e8/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt index 9927ccf..7423033 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES-HDFS-EC-7285.txt @@ -49,4 +49,7 @@ (Hui Zheng via Zhe Zhang) HDFS-7839. Erasure coding: implement facilities in NameNode to create and -manage EC zones (Zhe Zhang) \ No newline at end of file +manage EC zones (Zhe Zhang) + +HDFS-8023. Erasure Coding: retrieve eraure coding schema for a file from +NameNode (vinayakumarb) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hadoop/blob/d63800e8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java index bfb1022..a4cfc55 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java @@ -157,6 +157,7 @@ import org.apache.hadoop.hdfs.protocol.DSQuotaExceededException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.DirectoryListing; +import org.apache.hadoop.hdfs.protocol.ECInfo; import org.apache.hadoop.hdfs.protocol.EncryptionZone; import org.apache.hadoop.hdfs.protocol.EncryptionZoneIterator; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; @@ -3460,6 +3461,19 @@ public class DFSClient implements java.io.Closeable, RemotePeerFactory, } } + public ECInfo getErasureCodingInfo(String src) throws IOException { +checkOpen(); +TraceScope scope = getPathTraceScope(getErasureCodingInfo, src); +try { + return namenode.getErasureCodingInfo(src); +} catch (RemoteException re) { + throw re.unwrapRemoteException(AccessControlException.class, + FileNotFoundException.class, UnresolvedPathException.class); +} finally { + scope.close(); +} + } + public DFSInotifyEventInputStream getInotifyEventStream() throws IOException { return new DFSInotifyEventInputStream(traceSampler, namenode); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/d63800e8/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java -- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 8efe344..45d92f3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -1464,4 +1464,14 @@ public interface