[
https://issues.apache.org/jira/browse/FALCON-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13963477#comment-13963477
]
Michael Miklavcic commented on FALCON-391:
------------------------------------------
Actually, I take that back. From what I can tell, the code is there to handle
bandwidth throttling via the passed parameters.
{code}
DistCp.java
protected Job createJob() throws IOException {
...
inputOptions.appendToConf(job.getConfiguration());
...
}
DistCpOptions.java
public void appendToConf(Configuration conf) {
...
DistCpOptionSwitch.addToConf(conf, DistCpOptionSwitch.BANDWIDTH_KB,
String.valueOf(mapBandwidth));
...
}
{code}
And inside of RetriableFileCopyCommand.java
{code}
private static ThrottledInputStream getInputStream(Path path, Configuration
conf)
throws IOException {
try {
FileSystem fs = path.getFileSystem(conf);
long bandwidthKB = getAllowedBandwidth(conf);
return new ThrottledInputStream(new BufferedInputStream(fs.open(path)),
bandwidthKB * 1024);
}
catch (IOException e) {
throw new CopyReadException(e);
}
}
private static long getAllowedBandwidth(Configuration conf) {
return (long) conf.getInt(DistCpConstants.CONF_LABEL_BANDWIDTH_KB,
DistCpConstants.DEFAULT_BANDWIDTH_KB);
}
{code}
Let me know if I've missed something, but I think we should be all set.
> Add ability to set mapBandwidth
> -------------------------------
>
> Key: FALCON-391
> URL: https://issues.apache.org/jira/browse/FALCON-391
> Project: Falcon
> Issue Type: Improvement
> Components: feed, replication
> Affects Versions: 0.4, 0.5
> Reporter: Michael Miklavcic
> Assignee: Michael Miklavcic
> Labels: features, patch
> Fix For: 0.5
>
> Attachments: FALCON-391_v1.patch
>
>
> Related to https://issues.apache.org/jira/browse/FALCON-342
--
This message was sent by Atlassian JIRA
(v6.2#6252)