hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Kumar Vavilapalli <vino...@hortonworks.com>
Subject Re: API Design: getClusterMetrics
Date Wed, 10 Oct 2012 19:47:43 GMT

This is to help evolve the APIs easily. All apis have request and response objects, instead
of passing in parameters directly. Some of the APIs clearly may not need this extra layer,
but doing so helps uniformity.

Irrespective of that, following the original goal, GetClusterMetricsResponse itself could
have all the fields, instead of one more nested ClusterMetrics object.

Thanks,
+Vinod

On Oct 9, 2012, at 9:11 PM, Saptarshi Guha wrote:

> Hello
> (sorry for cross post)
> I am reading the DistributedShell code and came across
> 
> GetClusterMetricsRequest clusterMetricsReq =
> Records.newRecord(GetClusterMetricsRequest.class);
> GetClusterMetricsResponse clusterMetricsResp =
> applicationsManager.getClusterMetrics(clusterMetricsReq);
> 
> In the page: http://hadoop.apache.org/docs/current/api/org/apache/hadoop/yarn/api/ClientRMProtocol.html#getClusterMetrics%28org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest%29
> 
> I can't find any other function getClusterMetrics.
> 
> Why was the choice made to pass a GetClusterMetricsRequest object to
> getClusterMetrics?
> why couldn't the programmer invoke
> applicationsManager.getClusterMetrics() and the method would reply
> with a GetClusterMetricsResponse?
> 
> Regards
> Sapsi
> (P.S I havent used YARN or even written code with it, i'm just reading
> some sources and my reading is incomplete, so apologies if this comes
> across
> as stupid)


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message