[2/2] ambari git commit: AMBARI-18779: Fix the backend for HAWQ View BETA (adenissov via mithmatt)

2016-11-07 Thread mithmatt
AMBARI-18779: Fix the backend for HAWQ View BETA (adenissov via mithmatt)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e36afa3b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e36afa3b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e36afa3b

Branch: refs/heads/branch-2.4
Commit: e36afa3b34a0f52b9d1d559e5099e273e5010daa
Parents: 5e76b52
Author: Matt 
Authored: Mon Nov 7 13:31:03 2016 -0800
Committer: Matt 
Committed: Mon Nov 7 13:31:03 2016 -0800

--
 contrib/views/hawq/README.md|  94 ++---
 contrib/views/hawq/pom.xml  | 381 +++
 .../apache/ambari/view/hawq/HAWQDataSource.java |  94 +
 .../ambari/view/hawq/HAWQViewServlet.java   | 109 --
 .../ambari/view/hawq/JsonApiResource.java   |  98 +
 .../apache/ambari/view/hawq/QueryResource.java  |  36 ++
 .../ambari/view/hawq/QueryResourceProvider.java | 225 +++
 .../apache/ambari/view/hawq/QueryService.java   |  70 
 .../hawq/src/main/resources/WEB-INF/web.xml |  37 --
 .../src/main/resources/ui/app/adapters/query.js |  14 +-
 .../views/hawq/src/main/resources/ui/app/app.js |   2 +-
 .../resources/ui/app/components/query-table.js  |   6 +-
 .../src/main/resources/ui/app/models/query.js   |  32 +-
 .../hawq/src/main/resources/ui/app/resolver.js  |   2 +-
 .../hawq/src/main/resources/ui/app/router.js|   6 +-
 .../main/resources/ui/app/routes/application.js |   5 +-
 .../src/main/resources/ui/app/routes/main.js|  31 +-
 .../main/resources/ui/app/serializers/query.js  |  51 ++-
 .../src/main/resources/ui/app/styles/app.scss   |  10 +-
 .../resources/ui/app/templates/application.hbs  |   2 +-
 .../ui/app/templates/components/query-table.hbs |  12 +-
 .../main/resources/ui/app/templates/main.hbs|   2 +-
 .../src/main/resources/ui/app/utils/utils.js|  72 ++--
 .../views/hawq/src/main/resources/ui/bower.json |   5 +-
 .../src/main/resources/ui/config/environment.js |   4 +-
 .../ui/tests/acceptance/application-test.js |  23 +-
 .../ui/tests/helpers/module-for-acceptance.js   |   4 +-
 .../resources/ui/tests/helpers/test-helper.js   | 103 +++--
 .../integration/components/query-table-test.js  |  77 ++--
 .../src/main/resources/ui/tests/test-helper.js  |   6 +-
 .../ui/tests/unit/adapters/query-test.js|  13 +-
 .../ui/tests/unit/models/query-test.js  |  13 +-
 .../resources/ui/tests/unit/routes/main-test.js |  11 +-
 .../ui/tests/unit/serializers/query-test.js |  71 +++-
 .../resources/ui/tests/unit/utils/utils-test.js |  80 ++--
 .../src/main/resources/view.log4j.properties|  27 ++
 contrib/views/hawq/src/main/resources/view.xml  |  45 +++
 .../ambari/view/hawq/HAWQDataSourceTest.java| 170 +
 .../view/hawq/QueryResourceProviderTest.java| 200 ++
 contrib/views/pom.xml   |   1 +
 40 files changed, 1596 insertions(+), 648 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e36afa3b/contrib/views/hawq/README.md
--
diff --git a/contrib/views/hawq/README.md b/contrib/views/hawq/README.md
index b8b51ba..aeaa868 100644
--- a/contrib/views/hawq/README.md
+++ b/contrib/views/hawq/README.md
@@ -13,88 +13,52 @@
 [](WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
 [](See the License for the specific language governing permissions and)
 [](limitations under the License.)
-# HAWQ Monitoring View for Ambari
-This view provides a UI to monitor HAWQ queries.
 
-### Overview and Examples
-You may find instructive the [Ambari Views Overview], which demonstrates how 
Ambari uses third-party views and how to create your own view. [Here][view 
example] you may find a view example.
+# HAWQ View
 
-### Build All Views (must be done at least once)
-```sh
-cd $AMBARI_DIR/contrib/views
-mvn install -DskipTests
-```
+**HAWQ View** provides a **Query Monitor** for HAWQ which displays the current 
running queries.
 
-### Build HAWQ View
-```sh
-cd $AMBARI_DIR/contrib/views/hawq
-mvn install [-DskipTests]
-```
+The HAWQ View frontend is built based on EmberJS framework. The Java backend 
extends the framework provided by the ambari-views project.
 
-### Setting-Up The Enviornment
-In order to prepare a vagrant environment, firstly follow the instructions in 
the [Ambari Dev Quick Start Guide].
+The frontend polls the REST API periodically (5 seconds). The REST endpoint is 
responsible for querying the data from the *pg_stat_activity* table for every 
```GET``` request on ```/queries``` resource.
 
-### Deploy JAR file
-```sh
-vagrant ssh 
-sudo -i
-ln -s /vagrant/ambari/contrib/views/hawq/target/hawq-view-X.Y.Z.Q-SNAPSHOT.jar 

[2/2] ambari git commit: AMBARI-18779: Fix the backend for HAWQ View BETA (adenissov via mithmatt)

2016-11-07 Thread mithmatt
AMBARI-18779: Fix the backend for HAWQ View BETA (adenissov via mithmatt)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/921a6350
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/921a6350
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/921a6350

Branch: refs/heads/branch-2.5
Commit: 921a6350a38d77442ac42ebc4c650320648d779b
Parents: d0bd2a0
Author: Matt 
Authored: Mon Nov 7 13:29:31 2016 -0800
Committer: Matt 
Committed: Mon Nov 7 13:29:31 2016 -0800

--
 contrib/views/hawq/README.md|  94 ++---
 contrib/views/hawq/pom.xml  | 381 +++
 .../apache/ambari/view/hawq/HAWQDataSource.java |  94 +
 .../ambari/view/hawq/HAWQViewServlet.java   | 109 --
 .../ambari/view/hawq/JsonApiResource.java   |  98 +
 .../apache/ambari/view/hawq/QueryResource.java  |  36 ++
 .../ambari/view/hawq/QueryResourceProvider.java | 225 +++
 .../apache/ambari/view/hawq/QueryService.java   |  70 
 .../hawq/src/main/resources/WEB-INF/web.xml |  37 --
 .../src/main/resources/ui/app/adapters/query.js |  14 +-
 .../views/hawq/src/main/resources/ui/app/app.js |   2 +-
 .../resources/ui/app/components/query-table.js  |   6 +-
 .../src/main/resources/ui/app/models/query.js   |  32 +-
 .../hawq/src/main/resources/ui/app/resolver.js  |   2 +-
 .../hawq/src/main/resources/ui/app/router.js|   6 +-
 .../main/resources/ui/app/routes/application.js |   5 +-
 .../src/main/resources/ui/app/routes/main.js|  31 +-
 .../main/resources/ui/app/serializers/query.js  |  51 ++-
 .../src/main/resources/ui/app/styles/app.scss   |  10 +-
 .../resources/ui/app/templates/application.hbs  |   2 +-
 .../ui/app/templates/components/query-table.hbs |  12 +-
 .../main/resources/ui/app/templates/main.hbs|   2 +-
 .../src/main/resources/ui/app/utils/utils.js|  72 ++--
 .../views/hawq/src/main/resources/ui/bower.json |   5 +-
 .../src/main/resources/ui/config/environment.js |   4 +-
 .../hawq/src/main/resources/ui/package.json |   4 +-
 .../ui/tests/acceptance/application-test.js |  23 +-
 .../ui/tests/helpers/module-for-acceptance.js   |   4 +-
 .../resources/ui/tests/helpers/test-helper.js   | 103 +++--
 .../integration/components/query-table-test.js  |  77 ++--
 .../src/main/resources/ui/tests/test-helper.js  |   6 +-
 .../ui/tests/unit/adapters/query-test.js|  13 +-
 .../ui/tests/unit/models/query-test.js  |  13 +-
 .../resources/ui/tests/unit/routes/main-test.js |  11 +-
 .../ui/tests/unit/serializers/query-test.js |  71 +++-
 .../resources/ui/tests/unit/utils/utils-test.js |  80 ++--
 .../src/main/resources/view.log4j.properties|  27 ++
 contrib/views/hawq/src/main/resources/view.xml  |  45 +++
 .../ambari/view/hawq/HAWQDataSourceTest.java| 170 +
 .../view/hawq/QueryResourceProviderTest.java| 200 ++
 contrib/views/pom.xml   |   1 +
 41 files changed, 1598 insertions(+), 650 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/921a6350/contrib/views/hawq/README.md
--
diff --git a/contrib/views/hawq/README.md b/contrib/views/hawq/README.md
index b8b51ba..aeaa868 100644
--- a/contrib/views/hawq/README.md
+++ b/contrib/views/hawq/README.md
@@ -13,88 +13,52 @@
 [](WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
 [](See the License for the specific language governing permissions and)
 [](limitations under the License.)
-# HAWQ Monitoring View for Ambari
-This view provides a UI to monitor HAWQ queries.
 
-### Overview and Examples
-You may find instructive the [Ambari Views Overview], which demonstrates how 
Ambari uses third-party views and how to create your own view. [Here][view 
example] you may find a view example.
+# HAWQ View
 
-### Build All Views (must be done at least once)
-```sh
-cd $AMBARI_DIR/contrib/views
-mvn install -DskipTests
-```
+**HAWQ View** provides a **Query Monitor** for HAWQ which displays the current 
running queries.
 
-### Build HAWQ View
-```sh
-cd $AMBARI_DIR/contrib/views/hawq
-mvn install [-DskipTests]
-```
+The HAWQ View frontend is built based on EmberJS framework. The Java backend 
extends the framework provided by the ambari-views project.
 
-### Setting-Up The Enviornment
-In order to prepare a vagrant environment, firstly follow the instructions in 
the [Ambari Dev Quick Start Guide].
+The frontend polls the REST API periodically (5 seconds). The REST endpoint is 
responsible for querying the data from the *pg_stat_activity* table for every 
```GET``` request on ```/queries``` resource.
 
-### Deploy JAR file
-```sh
-vagrant ssh 
-sudo -i
-ln -s 

[2/2] ambari git commit: AMBARI-18779: Fix the backend for HAWQ View BETA (adenissov via mithmatt)

2016-11-07 Thread mithmatt
AMBARI-18779: Fix the backend for HAWQ View BETA (adenissov via mithmatt)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ac9fa10
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ac9fa10
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ac9fa10

Branch: refs/heads/trunk
Commit: 8ac9fa10cf09b4d49efef7b4a9d6a244e86e9244
Parents: 4066b7e
Author: Matt 
Authored: Mon Nov 7 13:27:41 2016 -0800
Committer: Matt 
Committed: Mon Nov 7 13:27:41 2016 -0800

--
 contrib/views/hawq/README.md|  94 ++---
 contrib/views/hawq/pom.xml  | 381 +++
 .../apache/ambari/view/hawq/HAWQDataSource.java |  94 +
 .../ambari/view/hawq/HAWQViewServlet.java   | 109 --
 .../ambari/view/hawq/JsonApiResource.java   |  98 +
 .../apache/ambari/view/hawq/QueryResource.java  |  36 ++
 .../ambari/view/hawq/QueryResourceProvider.java | 225 +++
 .../apache/ambari/view/hawq/QueryService.java   |  70 
 .../hawq/src/main/resources/WEB-INF/web.xml |  37 --
 .../src/main/resources/ui/app/adapters/query.js |  14 +-
 .../views/hawq/src/main/resources/ui/app/app.js |   2 +-
 .../resources/ui/app/components/query-table.js  |   6 +-
 .../src/main/resources/ui/app/models/query.js   |  32 +-
 .../hawq/src/main/resources/ui/app/resolver.js  |   2 +-
 .../hawq/src/main/resources/ui/app/router.js|   6 +-
 .../main/resources/ui/app/routes/application.js |   5 +-
 .../src/main/resources/ui/app/routes/main.js|  31 +-
 .../main/resources/ui/app/serializers/query.js  |  51 ++-
 .../src/main/resources/ui/app/styles/app.scss   |  10 +-
 .../resources/ui/app/templates/application.hbs  |   2 +-
 .../ui/app/templates/components/query-table.hbs |  12 +-
 .../main/resources/ui/app/templates/main.hbs|   2 +-
 .../src/main/resources/ui/app/utils/utils.js|  72 ++--
 .../views/hawq/src/main/resources/ui/bower.json |   5 +-
 .../src/main/resources/ui/config/environment.js |   4 +-
 .../hawq/src/main/resources/ui/package.json |   4 +-
 .../ui/tests/acceptance/application-test.js |  23 +-
 .../ui/tests/helpers/module-for-acceptance.js   |   4 +-
 .../resources/ui/tests/helpers/test-helper.js   | 103 +++--
 .../integration/components/query-table-test.js  |  77 ++--
 .../src/main/resources/ui/tests/test-helper.js  |   6 +-
 .../ui/tests/unit/adapters/query-test.js|  13 +-
 .../ui/tests/unit/models/query-test.js  |  13 +-
 .../resources/ui/tests/unit/routes/main-test.js |  11 +-
 .../ui/tests/unit/serializers/query-test.js |  71 +++-
 .../resources/ui/tests/unit/utils/utils-test.js |  80 ++--
 .../src/main/resources/view.log4j.properties|  27 ++
 contrib/views/hawq/src/main/resources/view.xml  |  45 +++
 .../ambari/view/hawq/HAWQDataSourceTest.java| 170 +
 .../view/hawq/QueryResourceProviderTest.java| 200 ++
 contrib/views/pom.xml   |   1 +
 41 files changed, 1598 insertions(+), 650 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ac9fa10/contrib/views/hawq/README.md
--
diff --git a/contrib/views/hawq/README.md b/contrib/views/hawq/README.md
index b8b51ba..aeaa868 100644
--- a/contrib/views/hawq/README.md
+++ b/contrib/views/hawq/README.md
@@ -13,88 +13,52 @@
 [](WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.)
 [](See the License for the specific language governing permissions and)
 [](limitations under the License.)
-# HAWQ Monitoring View for Ambari
-This view provides a UI to monitor HAWQ queries.
 
-### Overview and Examples
-You may find instructive the [Ambari Views Overview], which demonstrates how 
Ambari uses third-party views and how to create your own view. [Here][view 
example] you may find a view example.
+# HAWQ View
 
-### Build All Views (must be done at least once)
-```sh
-cd $AMBARI_DIR/contrib/views
-mvn install -DskipTests
-```
+**HAWQ View** provides a **Query Monitor** for HAWQ which displays the current 
running queries.
 
-### Build HAWQ View
-```sh
-cd $AMBARI_DIR/contrib/views/hawq
-mvn install [-DskipTests]
-```
+The HAWQ View frontend is built based on EmberJS framework. The Java backend 
extends the framework provided by the ambari-views project.
 
-### Setting-Up The Enviornment
-In order to prepare a vagrant environment, firstly follow the instructions in 
the [Ambari Dev Quick Start Guide].
+The frontend polls the REST API periodically (5 seconds). The REST endpoint is 
responsible for querying the data from the *pg_stat_activity* table for every 
```GET``` request on ```/queries``` resource.
 
-### Deploy JAR file
-```sh
-vagrant ssh 
-sudo -i
-ln -s