|
@@ -1097,6 +1097,9 @@ public class TimelineReaderWebServices {
|
|
|
* METRICS makes sense for flow runs hence only ALL or METRICS are
|
|
|
* supported as fields for fetching flow runs. Other fields will lead to
|
|
|
* HTTP 400 (Bad Request) response. (Optional query param).
|
|
|
+ * @param fromId Defines the flow run id. If specified, retrieve the next
|
|
|
+ * set of flow runs from the given id. The set of flow runs retrieved
|
|
|
+ * is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing a
|
|
|
* set of <cite>FlowRunEntity</cite> instances for the given flow are
|
|
@@ -1118,7 +1121,8 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("createdtimestart") String createdTimeStart,
|
|
|
@QueryParam("createdtimeend") String createdTimeEnd,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
- @QueryParam("fields") String fields) {
|
|
|
+ @QueryParam("fields") String fields,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
String url = req.getRequestURI() +
|
|
|
(req.getQueryString() == null ? "" :
|
|
|
QUERY_STRING_SEP + req.getQueryString());
|
|
@@ -1140,11 +1144,12 @@ public class TimelineReaderWebServices {
|
|
|
entities = timelineReaderManager.getEntities(context,
|
|
|
TimelineReaderWebServicesUtils.createTimelineEntityFilters(
|
|
|
limit, createdTimeStart, createdTimeEnd, null, null, null,
|
|
|
- null, null, null, null, null),
|
|
|
+ null, null, null, null, fromId),
|
|
|
TimelineReaderWebServicesUtils.createTimelineDataToRetrieve(
|
|
|
null, metricsToRetrieve, fields, null));
|
|
|
} catch (Exception e) {
|
|
|
- handleException(e, url, startTime, "createdTime start/end or limit");
|
|
|
+ handleException(e, url, startTime,
|
|
|
+ "createdTime start/end or limit or fromId");
|
|
|
}
|
|
|
long endTime = Time.monotonicNow();
|
|
|
if (entities == null) {
|
|
@@ -1182,6 +1187,9 @@ public class TimelineReaderWebServices {
|
|
|
* METRICS makes sense for flow runs hence only ALL or METRICS are
|
|
|
* supported as fields for fetching flow runs. Other fields will lead to
|
|
|
* HTTP 400 (Bad Request) response. (Optional query param).
|
|
|
+ * @param fromId Defines the flow run id. If specified, retrieve the next
|
|
|
+ * set of flow runs from the given id. The set of flow runs retrieved
|
|
|
+ * is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing a
|
|
|
* set of <cite>FlowRunEntity</cite> instances for the given flow are
|
|
@@ -1204,9 +1212,10 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("createdtimestart") String createdTimeStart,
|
|
|
@QueryParam("createdtimeend") String createdTimeEnd,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
- @QueryParam("fields") String fields) {
|
|
|
+ @QueryParam("fields") String fields,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
return getFlowRuns(req, res, null, userId, flowName, limit,
|
|
|
- createdTimeStart, createdTimeEnd, metricsToRetrieve, fields);
|
|
|
+ createdTimeStart, createdTimeEnd, metricsToRetrieve, fields, fromId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1237,6 +1246,9 @@ public class TimelineReaderWebServices {
|
|
|
* METRICS makes sense for flow runs hence only ALL or METRICS are
|
|
|
* supported as fields for fetching flow runs. Other fields will lead to
|
|
|
* HTTP 400 (Bad Request) response. (Optional query param).
|
|
|
+ * @param fromId Defines the flow run id. If specified, retrieve the next
|
|
|
+ * set of flow runs from the given id. The set of flow runs retrieved
|
|
|
+ * is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing a
|
|
|
* set of <cite>FlowRunEntity</cite> instances for the given flow are
|
|
@@ -1260,7 +1272,8 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("createdtimestart") String createdTimeStart,
|
|
|
@QueryParam("createdtimeend") String createdTimeEnd,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
- @QueryParam("fields") String fields) {
|
|
|
+ @QueryParam("fields") String fields,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
String url = req.getRequestURI() +
|
|
|
(req.getQueryString() == null ? "" :
|
|
|
QUERY_STRING_SEP + req.getQueryString());
|
|
@@ -1279,11 +1292,12 @@ public class TimelineReaderWebServices {
|
|
|
TimelineEntityType.YARN_FLOW_RUN.toString(), null, null),
|
|
|
TimelineReaderWebServicesUtils.createTimelineEntityFilters(
|
|
|
limit, createdTimeStart, createdTimeEnd, null, null, null,
|
|
|
- null, null, null, null, null),
|
|
|
+ null, null, null, null, fromId),
|
|
|
TimelineReaderWebServicesUtils.createTimelineDataToRetrieve(
|
|
|
null, metricsToRetrieve, fields, null));
|
|
|
} catch (Exception e) {
|
|
|
- handleException(e, url, startTime, "createdTime start/end or limit");
|
|
|
+ handleException(e, url, startTime,
|
|
|
+ "createdTime start/end or limit or fromId");
|
|
|
}
|
|
|
long endTime = Time.monotonicNow();
|
|
|
if (entities == null) {
|
|
@@ -1719,6 +1733,9 @@ public class TimelineReaderWebServices {
|
|
|
* or has a value less than 1, and metrics have to be retrieved, then
|
|
|
* metricsLimit will be considered as 1 i.e. latest single value of
|
|
|
* metric(s) will be returned. (Optional query param).
|
|
|
+ * @param fromId Defines the application id. If specified, retrieve the next
|
|
|
+ * set of applications from the given id. The set of applications
|
|
|
+ * retrieved is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing
|
|
|
* a set of <cite>TimelineEntity</cite> instances representing apps is
|
|
@@ -1748,7 +1765,8 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("confstoretrieve") String confsToRetrieve,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
@QueryParam("fields") String fields,
|
|
|
- @QueryParam("metricslimit") String metricsLimit) {
|
|
|
+ @QueryParam("metricslimit") String metricsLimit,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
String url = req.getRequestURI() +
|
|
|
(req.getQueryString() == null ? "" :
|
|
|
QUERY_STRING_SEP + req.getQueryString());
|
|
@@ -1771,7 +1789,7 @@ public class TimelineReaderWebServices {
|
|
|
TimelineReaderWebServicesUtils.createTimelineEntityFilters(
|
|
|
limit, createdTimeStart, createdTimeEnd, relatesTo, isRelatedTo,
|
|
|
infofilters, conffilters, metricfilters, eventfilters, null,
|
|
|
- null),
|
|
|
+ fromId),
|
|
|
TimelineReaderWebServicesUtils.createTimelineDataToRetrieve(
|
|
|
confsToRetrieve, metricsToRetrieve, fields, metricsLimit));
|
|
|
} catch (Exception e) {
|
|
@@ -1847,6 +1865,9 @@ public class TimelineReaderWebServices {
|
|
|
* or has a value less than 1, and metrics have to be retrieved, then
|
|
|
* metricsLimit will be considered as 1 i.e. latest single value of
|
|
|
* metric(s) will be returned. (Optional query param).
|
|
|
+ * @param fromId Defines the application id. If specified, retrieve the next
|
|
|
+ * set of applications from the given id. The set of applications
|
|
|
+ * retrieved is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing
|
|
|
* a set of <cite>TimelineEntity</cite> instances representing apps is
|
|
@@ -1878,12 +1899,13 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("confstoretrieve") String confsToRetrieve,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
@QueryParam("fields") String fields,
|
|
|
- @QueryParam("metricslimit") String metricsLimit) {
|
|
|
+ @QueryParam("metricslimit") String metricsLimit,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
return getEntities(req, res, null, null,
|
|
|
TimelineEntityType.YARN_APPLICATION.toString(), userId, flowName,
|
|
|
flowRunId, limit, createdTimeStart, createdTimeEnd, relatesTo,
|
|
|
isRelatedTo, infofilters, conffilters, metricfilters, eventfilters,
|
|
|
- confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, null);
|
|
|
+ confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, fromId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1947,6 +1969,9 @@ public class TimelineReaderWebServices {
|
|
|
* or has a value less than 1, and metrics have to be retrieved, then
|
|
|
* metricsLimit will be considered as 1 i.e. latest single value of
|
|
|
* metric(s) will be returned. (Optional query param).
|
|
|
+ * @param fromId Defines the application id. If specified, retrieve the next
|
|
|
+ * set of applications from the given id. The set of applications
|
|
|
+ * retrieved is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing
|
|
|
* a set of <cite>TimelineEntity</cite> instances representing apps is
|
|
@@ -1980,12 +2005,13 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("confstoretrieve") String confsToRetrieve,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
@QueryParam("fields") String fields,
|
|
|
- @QueryParam("metricslimit") String metricsLimit) {
|
|
|
+ @QueryParam("metricslimit") String metricsLimit,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
return getEntities(req, res, clusterId, null,
|
|
|
TimelineEntityType.YARN_APPLICATION.toString(), userId, flowName,
|
|
|
flowRunId, limit, createdTimeStart, createdTimeEnd, relatesTo,
|
|
|
isRelatedTo, infofilters, conffilters, metricfilters, eventfilters,
|
|
|
- confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, null);
|
|
|
+ confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, fromId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2046,6 +2072,9 @@ public class TimelineReaderWebServices {
|
|
|
* or has a value less than 1, and metrics have to be retrieved, then
|
|
|
* metricsLimit will be considered as 1 i.e. latest single value of
|
|
|
* metric(s) will be returned. (Optional query param).
|
|
|
+ * @param fromId Defines the application id. If specified, retrieve the next
|
|
|
+ * set of applications from the given id. The set of applications
|
|
|
+ * retrieved is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing
|
|
|
* a set of <cite>TimelineEntity</cite> instances representing apps is
|
|
@@ -2076,12 +2105,13 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("confstoretrieve") String confsToRetrieve,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
@QueryParam("fields") String fields,
|
|
|
- @QueryParam("metricslimit") String metricsLimit) {
|
|
|
+ @QueryParam("metricslimit") String metricsLimit,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
return getEntities(req, res, null, null,
|
|
|
TimelineEntityType.YARN_APPLICATION.toString(), userId, flowName,
|
|
|
null, limit, createdTimeStart, createdTimeEnd, relatesTo, isRelatedTo,
|
|
|
infofilters, conffilters, metricfilters, eventfilters,
|
|
|
- confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, null);
|
|
|
+ confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, fromId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -2143,6 +2173,9 @@ public class TimelineReaderWebServices {
|
|
|
* or has a value less than 1, and metrics have to be retrieved, then
|
|
|
* metricsLimit will be considered as 1 i.e. latest single value of
|
|
|
* metric(s) will be returned. (Optional query param).
|
|
|
+ * @param fromId Defines the application id. If specified, retrieve the next
|
|
|
+ * set of applications from the given id. The set of applications
|
|
|
+ * retrieved is inclusive of specified fromId.
|
|
|
*
|
|
|
* @return If successful, a HTTP 200(OK) response having a JSON representing
|
|
|
* a set of <cite>TimelineEntity</cite> instances representing apps is
|
|
@@ -2174,12 +2207,13 @@ public class TimelineReaderWebServices {
|
|
|
@QueryParam("confstoretrieve") String confsToRetrieve,
|
|
|
@QueryParam("metricstoretrieve") String metricsToRetrieve,
|
|
|
@QueryParam("fields") String fields,
|
|
|
- @QueryParam("metricslimit") String metricsLimit) {
|
|
|
+ @QueryParam("metricslimit") String metricsLimit,
|
|
|
+ @QueryParam("fromid") String fromId) {
|
|
|
return getEntities(req, res, clusterId, null,
|
|
|
TimelineEntityType.YARN_APPLICATION.toString(), userId, flowName,
|
|
|
null, limit, createdTimeStart, createdTimeEnd, relatesTo, isRelatedTo,
|
|
|
infofilters, conffilters, metricfilters, eventfilters,
|
|
|
- confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, null);
|
|
|
+ confsToRetrieve, metricsToRetrieve, fields, metricsLimit, null, fromId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3107,4 +3141,4 @@ public class TimelineReaderWebServices {
|
|
|
" (Took " + (endTime - startTime) + " ms.)");
|
|
|
return results;
|
|
|
}
|
|
|
-}
|
|
|
+}
|