-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17381. Distcp of EC files should not be limited to DFS. #6551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. W 8000 e’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d28aba3
HDFS-17381. Distcp of EC files should not be limited to DFS.
bb74b5c
create an interface for EC
fb1c8fc
remove unwanted methods
76722aa
remove unused imports
608c0b0
use createFile builder API
d030903
remove unused method
292e110
address comments and add tests
f22360a
fix test
79e99d3
address comments
04e281f
left out changes
44ee8e1
remove import
3c0b1fb
fix javadoc
6b056ff
address comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...op-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/WithErasureCoding.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* 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.fs; | ||
|
||
import ja 8000 va.io.IOException; | ||
|
||
/** | ||
* Filesystems that support EC can implement this interface. | ||
*/ | ||
public interface WithErasureCoding { | ||
|
||
/** | ||
* Get the EC Policy name of the given file's fileStatus. | ||
* If the file is not erasure coded, this shall return null. | ||
* Callers will make sure to check if fileStatus isInstance of | ||
* an FS that implements this interface. | ||
* If the call fails due to some error, this shall return null. | ||
* @param fileStatus object of the file whose ecPolicy needs to be obtained. | ||
* @return the ec Policy name | ||
*/ | ||
String getErasureCodingPolicyName(FileStatus fileStatus); | ||
sadanand48 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* Set the given ecPolicy on the path. | ||
* The path and ecPolicyName should be valid (not null/empty, the | ||
* implementing FS shall support the supplied ecPolicy). | ||
* implementations can throw IOException if these conditions are not met. | ||
* @param path on which the EC policy needs to be set. | ||
* @param ecPolicyName the EC policy. | ||
* @throws IOException if there is an error during the set op. | ||
*/ | ||
void setErasureCodingPolicy(Path path, String ecPolicyName) throws | ||
sadanand48 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
IOException; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.