Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

add job history rest-server & webportal, query by frameworkcontroller… #3623

Closed
wants to merge 14 commits into from

Conversation

dbyoung18
Copy link
Contributor

add job history rest-server & webportal, query by frameworkcontroller…

Copy link
Member

@yqwang-ms yqwang-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abuccts @sunqinzheng It is a low priority PR and will not be included in the first release, so could u please take a look this when you free?

@@ -35,4 +35,11 @@ app.listen(config.serverPort, () => {
logger.info('RESTful API server starts on port %d', config.serverPort);
});

module.exports = app;
esApp.listen(config.esPort, () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the elastic search apis should be a sub router of the current rest server so that the third party extensions and rest api users could access these apis easily.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another solution is just like the prometheus server. We just expose the elastic search's endpoint and let user customizes their queries.

@@ -94,8 +94,10 @@ export default class Summary extends React.Component {
modalTitle: '',
autoReloadInterval: 10 * 1000,
hideDialog: true,
currentAttemptID: this.props.jobInfo.jobStatus.retries,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will implement an independent job attempts page. Please seperate the frontend works and check in the api changes only.

Copy link
Contributor

@debuggy debuggy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the API endpoints added here should also be included in API doc

},
},
'sort': {
'CollectTime': 'desc',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CollectTime [](start = 7, length = 11)

Rename all places:
CollectTime -> collectTime
ObjectSnapshot -> objectSnapshot

let resultObj = {'items': []};
for (let i = 0; i < aggResults.length; i++) {
resultObj['items'].push(aggResults[i].CollectTime_sort.buckets[0].top.hits.hits[0]._source.ObjectSnapshot);
}
Copy link
Member

@yqwang-ms yqwang-ms Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May can be replaced by:

        "CollectTime_sort": {
          "terms": {
            "field": "collectTime",
            "size": 1,
            "order": {
              "_key": "desc"
            }
          },
          "aggs": {
            "top": {
              "top_hits": {
                "size": 1
              }
            }
          }
        }

Copy link
Member

@yqwang-ms yqwang-ms Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or:

        "CollectTime_sort": {
          "top_hits": {
            "sort": [
              {
                "collectTime": {
                  "order": "desc"
                }
              }
            ],
            "size": 1
          }
        }

In reply to: 339911150 [](ancestors = 339911150)

@yqwang-ms
Copy link
Member

Close it as it is refined to be #3831

@yqwang-ms yqwang-ms closed this Nov 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants