You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ro...@apache.org on 2019/02/07 04:36:59 UTC

[hadoop] 01/02: YARN-7627. [ATSv2] When passing a non-number as metricslimit, the error message is wrong. Contributed by Charan Hebri.

This is an automated email from the ASF dual-hosted git repository.

rohithsharmaks pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git

commit 1e5e08d83b8dc168e636e0834584fecf5d44cb65
Author: Rohith Sharma K S <ro...@apache.org>
AuthorDate: Wed Feb 6 09:30:09 2019 +0530

    YARN-7627. [ATSv2] When passing a non-number as metricslimit, the error message is wrong. Contributed by Charan Hebri.
---
 .../reader/TimelineReaderWebServices.java          | 27 ++++++++++++++--------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java
index db48355..279cfdc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java
@@ -350,7 +350,8 @@ public class TimelineReaderWebServices {
       succeeded = true;
     } catch (Exception e) {
       handleException(e, url, startTime,
-          "createdTime start/end or limit or flowrunid");
+          "Either limit or createdtime start/end or metricslimit or metricstime"
+              + " start/end or fromid");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -631,7 +632,8 @@ public class TimelineReaderWebServices {
       succeeded = true;
     } catch (Exception e) {
       handleException(e, url, startTime,
-          "createdTime start/end or limit or flowrunid");
+          "Either flowrunid or limit or createdtime start/end or metricslimit"
+              + " or metricstime start/end or fromid");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -725,7 +727,8 @@ public class TimelineReaderWebServices {
       checkAccessForGenericEntity(entity, callerUGI);
       succeeded = true;
     } catch (Exception e) {
-      handleException(e, url, startTime, "flowrunid");
+      handleException(e, url, startTime, "Either metricslimit or metricstime"
+          + " start/end");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -919,7 +922,8 @@ public class TimelineReaderWebServices {
       checkAccessForGenericEntity(entity, callerUGI);
       succeeded = true;
     } catch (Exception e) {
-      handleException(e, url, startTime, "flowrunid");
+      handleException(e, url, startTime, "Either flowrunid or metricslimit or"
+          + " metricstime start/end");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -1606,7 +1610,8 @@ public class TimelineReaderWebServices {
       checkAccessForAppEntity(entity, callerUGI);
       succeeded = true;
     } catch (Exception e) {
-      handleException(e, url, startTime, "flowrunid");
+      handleException(e, url, startTime, "Either metricslimit or metricstime"
+          + " start/end");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -1781,7 +1786,8 @@ public class TimelineReaderWebServices {
       checkAccessForAppEntity(entity, callerUGI);
       succeeded = true;
     } catch (Exception e) {
-      handleException(e, url, startTime, "flowrunid");
+      handleException(e, url, startTime, "Either flowrunid or metricslimit or"
+          + " metricstime start/end");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -1927,7 +1933,8 @@ public class TimelineReaderWebServices {
       succeeded = true;
     } catch (Exception e) {
       handleException(e, url, startTime,
-          "createdTime start/end or limit or flowrunid");
+          "Either limit or createdtime start/end or metricslimit or"
+              + " metricstime start/end");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -3418,7 +3425,8 @@ public class TimelineReaderWebServices {
       succeeded = true;
     } catch (Exception e) {
       handleException(e, url, startTime,
-          "createdTime start/end or limit");
+          "Either limit or createdtime start/end or metricslimit or metricstime"
+              + " start/end or fromid");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);
@@ -3489,7 +3497,8 @@ public class TimelineReaderWebServices {
       checkAccessForSubAppEntities(entities,callerUGI);
       succeeded = true;
     } catch (Exception e) {
-      handleException(e, url, startTime, "");
+      handleException(e, url, startTime, "Either metricslimit or metricstime"
+          + " start/end");
     } finally {
       long latency = Time.monotonicNow() - startTime;
       METRICS.addGetEntitiesLatency(latency, succeeded);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org