-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-5047. Refactor Pipeline to use ReplicationConfig instead of factor/type #2096
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. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d934186
3a406d1
4abd3d9
ca24972
177ce8f
22f6587
78f1446
0f34d5b
8ba1d59
a576fab
3787cb2
d8d038a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |
| */ | ||
| package org.apache.hadoop.hdds.scm.protocol; | ||
|
|
||
| import org.apache.hadoop.hdds.client.ReplicationConfig; | ||
| import org.apache.hadoop.hdds.protocol.DatanodeDetails; | ||
| import org.apache.hadoop.hdds.scm.AddSCMRequest; | ||
| import org.apache.hadoop.hdds.scm.ScmConfig; | ||
|
|
@@ -59,8 +60,30 @@ public interface ScmBlockLocationProtocol extends Closeable { | |
| * @return allocated block accessing info (key, pipeline). | ||
| * @throws IOException | ||
| */ | ||
| List<AllocatedBlock> allocateBlock(long size, int numBlocks, | ||
| @Deprecated | ||
| default List<AllocatedBlock> allocateBlock(long size, int numBlocks, | ||
| ReplicationType type, ReplicationFactor factor, String owner, | ||
| ExcludeList excludeList) throws IOException { | ||
| return allocateBlock(size, numBlocks, ReplicationConfig | ||
| .fromTypeAndFactor(type, factor), owner, excludeList); | ||
| } | ||
|
|
||
| /** | ||
| * Asks SCM where a block should be allocated. SCM responds with the | ||
| * set of datanodes that should be used creating this block. | ||
| * | ||
| * @param size - size of the block. | ||
| * @param numBlocks - number of blocks. | ||
| * @param replicationConfig - replicationConfiguration | ||
| * @param owner - service owner of the new block | ||
| * @param excludeList List of datanodes/containers to exclude during | ||
| * block | ||
| * allocation. | ||
| * @return allocated block accessing info (key, pipeline). | ||
| * @throws IOException | ||
| */ | ||
| List<AllocatedBlock> allocateBlock(long size, int numBlocks, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why owner fix included in this patch?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only javadoc fixes are included. Here it is showed only because I modified ReplicationConfig at the same line: Old code New code: |
||
| ReplicationConfig replicationConfig, String owner, | ||
| ExcludeList excludeList) throws IOException; | ||
|
|
||
| /** | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.