You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pa...@apache.org on 2016/05/20 11:33:07 UTC
ambari git commit: AMBARI-16675. History tab in hive view does not
show recent jobs (Nitiraj Rathore via pallavkul)
Repository: ambari
Updated Branches:
refs/heads/trunk c2c5cb3f5 -> 286e614cf
AMBARI-16675. History tab in hive view does not show recent jobs (Nitiraj Rathore via pallavkul)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/286e614c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/286e614c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/286e614c
Branch: refs/heads/trunk
Commit: 286e614cf67025b5a2338e9fd1a400ada8f15798
Parents: c2c5cb3
Author: Pallav Kulshreshtha <pa...@gmail.com>
Authored: Fri May 20 17:02:45 2016 +0530
Committer: Pallav Kulshreshtha <pa...@gmail.com>
Committed: Fri May 20 17:02:45 2016 +0530
----------------------------------------------------------------------
.../ambari/view/hive/resources/jobs/Aggregator.java | 11 ++++++-----
.../main/resources/ui/hive-web/app/controllers/index.js | 10 +++++++++-
.../src/main/resources/ui/hive-web/app/routes/history.js | 9 +--------
3 files changed, 16 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/286e614c/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/Aggregator.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/Aggregator.java b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/Aggregator.java
index e646fd7..f119ff3 100644
--- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/Aggregator.java
+++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/Aggregator.java
@@ -80,8 +80,8 @@ public class Aggregator {
Set<String> addedOperationIds = new HashSet<String>();
List<Job> allJobs = new LinkedList<Job>();
- for (HiveQueryId atsHiveQuery : ats.getHiveQueryIdsList(username)) {
-
+ List<HiveQueryId> queries = ats.getHiveQueryIdsList(username);
+ for (HiveQueryId atsHiveQuery : queries) {
TezDagId atsTezDag = getTezDagFromHiveQueryId(atsHiveQuery);
JobImpl atsJob;
@@ -102,12 +102,11 @@ public class Aggregator {
addedOperationIds.add(atsHiveQuery.operationId);
}
-
//cover case when operationId is present, but not exists in ATS
//e.g. optimized queries without executing jobs, like "SELECT * FROM TABLE"
- for (Job job : viewJobResourceManager.readAll(new OnlyOwnersFilteringStrategy(username))) {
+ List<Job> jobs = viewJobResourceManager.readAll(new OnlyOwnersFilteringStrategy(username));
+ for (Job job : jobs ) {
List<StoredOperationHandle> operationHandles = operationHandleResourceManager.readJobRelatedHandles(job);
- assert operationHandles.size() <= 1;
if (operationHandles.size() > 0) {
StoredOperationHandle operationHandle = operationHandles.get(0);
@@ -116,6 +115,8 @@ public class Aggregator {
//e.g. query without hadoop job: select * from table
allJobs.add(job);
}
+ }else{
+ LOG.error("operationHandle not found for job : {}", job.getId());
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/286e614c/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/index.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/index.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/index.js
index 9584508..36faa86 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/index.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/index.js
@@ -141,8 +141,16 @@ export default Ember.Controller.extend({
defer = Ember.RSVP.defer(),
originalModel = this.get('model');
+ var title = "";
+ if(shouldGetVisualExplain){
+ title += "Visual Explain "
+ }else if(shouldExplain){
+ title += "Explain "
+ }
+
+ title += originalModel.get('title');
job = this.store.createRecord(constants.namingConventions.job, {
- title: originalModel.get('title'),
+ title: title,
sessionTag: originalModel.get('sessionTag'),
dataBase: this.get('selectedDatabase.name'),
referrer: referrer
http://git-wip-us.apache.org/repos/asf/ambari/blob/286e614c/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/history.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/history.js b/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/history.js
index 848bee8..0aa3d41 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/history.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/routes/history.js
@@ -34,13 +34,6 @@ export default Ember.Route.extend({
if (!model) {
return;
}
-
- var filteredModel = model.filter(function (job) {
- //filter out jobs with referrer type of sample, explain and visual explain
- return (!job.get('referrer') || job.get('referrer') === constants.jobReferrer.job) &&
- !!job.get('id');
- });
-
- controller.set('history', filteredModel);
+ controller.set('history', model);
}
});