You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Viraj Jasani (Jira)" <ji...@apache.org> on 2021/04/15 18:14:00 UTC
[jira] [Resolved] (HBASE-25776) Use Class.asSubclass to fix the
warning in StochasticLoadBalancer.loadCustomCostFunctions
[ https://issues.apache.org/jira/browse/HBASE-25776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Viraj Jasani resolved HBASE-25776.
----------------------------------
Fix Version/s: 2.3.6
2.4.3
2.5.0
3.0.0-alpha-1
Hadoop Flags: Reviewed
Resolution: Fixed
Thanks for the contribution [~xiaoyu].
> Use Class.asSubclass to fix the warning in StochasticLoadBalancer.loadCustomCostFunctions
> -----------------------------------------------------------------------------------------
>
> Key: HBASE-25776
> URL: https://issues.apache.org/jira/browse/HBASE-25776
> Project: HBase
> Issue Type: Improvement
> Components: Balancer
> Reporter: Duo Zhang
> Assignee: Xiao Yu
> Priority: Minor
> Labels: beginner, trivial
> Fix For: 3.0.0-alpha-1, 2.5.0, 2.4.3, 2.3.6
>
>
> {code}
> klass = (Class<? extends CostFunction>) Class.forName(c);
> {code}
> This will generated a warning of unchecked casting, could simply use Class.forName(c).asSubclass(CostFunction.class).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)