ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gna...@apache.org
Subject ambari git commit: AMBARI-20204. Huemigration View not working with Oracle Db(Single cluster). (Ishan Bhatt via gauravn7)
Date Wed, 01 Mar 2017 07:33:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk df60905a5 -> 5f5762c6b


AMBARI-20204. Huemigration View not working with Oracle Db(Single cluster). (Ishan Bhatt via
gauravn7)


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

Branch: refs/heads/trunk
Commit: 5f5762c6b57b125868e885c2ce59ca815b6ae44d
Parents: df60905
Author: Gaurav Nagar <grvngr@gmail.com>
Authored: Wed Mar 1 13:02:22 2017 +0530
Committer: Gaurav Nagar <grvngr@gmail.com>
Committed: Wed Mar 1 13:02:44 2017 +0530

----------------------------------------------------------------------
 .../historyqueryset/OracleQuerySetAmbariDB.java   |  7 ++++++-
 .../instancedetail/OracleQuerySetAmbariDB.java    |  4 ++--
 .../savedqueryset/OracleQuerySetAmbariDB.java     |  8 ++++----
 .../instancedetail/OracleQuerySetAmbariDB.java    |  2 +-
 .../pig/jobqueryset/OracleQuerySetAmbariDB.java   |  2 +-
 .../pig/jobqueryset/QuerySetAmbariDB.java         |  2 +-
 .../OracleQuerySetAmbariDB.java                   |  2 +-
 .../pig/savedscriptqueryset/QuerySetAmbariDB.java |  2 +-
 .../hive/historyqueryset/OracleQuerySetHueDB.java | 16 ++++++++--------
 .../hive/savedqueryset/OracleQuerySetHueDb.java   | 12 ++++++------
 .../pig/jobqueryset/OracleQuerySetHueDb.java      | 12 ++++++------
 .../savedscriptqueryset/OracleQuerySetHueDb.java  | 18 +++++++++---------
 12 files changed, 46 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java
index 7a197d3..eaf8c10 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/historyqueryset/OracleQuerySetAmbariDB.java
@@ -25,12 +25,17 @@ package org.apache.ambari.view.huetoambarimigration.datasource.queryset.ambariqu
 public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
 
   @Override
+  protected String getHiveVersionDetailSql(){
+    return "select distinct(view_name) as viewname from viewentity where view_instance_name
=?";
+  }
+
+  @Override
   protected String getSqlMaxDSidFromTableId(int id) {
     return "select MAX(cast(ds_id as integer)) as max from ds_jobimpl_" + id + "";
   }
   @Override
   protected String getTableIdSqlFromInstanceName() {
-    return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.hive.resources.jobs.viewJobs.JobImpl'
and view_instance_name=?";
+    return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.%hive%.resources.jobs.viewJobs.JobImpl'
and view_instance_name=?";
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java
index bc41bf7..31379dd 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/instancedetail/OracleQuerySetAmbariDB.java
@@ -22,10 +22,10 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
 
   @Override
   protected String getHiveInstanceSql(){
-    return "select distinct(view_instance_name) as instancename from viewentity where view_name='HIVE{1.0.0}'";
+    return "select distinct(view_instance_name) as instancename from viewentity where view_name
like '%HIVE%'";
   }
   @Override
   protected String getAllInstanceDetailSql(){
-    return "select distinct(view_instance_name) as instancename from viewentity where view_name='HIVE{1.0.0}'
or view_name='PIG{1.0.0}';";
+    return "select distinct(view_instance_name) as instancename from viewentity where view_name
like '%HIVE%' or view_name like '%PIG%'";
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/savedqueryset/OracleQuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/savedqueryset/OracleQuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/savedqueryset/OracleQuerySetAmbariDB.java
index 522deec..f77b227 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/savedqueryset/OracleQuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/hive/savedqueryset/OracleQuerySetAmbariDB.java
@@ -35,7 +35,7 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
   }
   @Override
   protected String getTableIdSqlFromInstanceNameHistoryQuery() {
-    return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.hive.resources.jobs.viewJobs.JobImpl'
and view_instance_name=?";
+    return "select id from viewentity where class_name LIKE 'org.apache.ambari.view.%hive%.resources.jobs.viewJobs.JobImpl'
and view_instance_name=?";
   }
 
   @Override
@@ -68,16 +68,16 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
 
   @Override
   protected String getSqlSequenceNoFromAmbariSequence() {
-    return "select sequence_value from ambari_sequences where sequence_name=?;";
+    return "select sequence_value from ambari_sequences where sequence_name=?";
   }
 
   @Override
   protected String getSqlUpdateSequenceNo() {
-    return "update ambari_sequences set sequence_value=? where sequence_name=?;";
+    return "update ambari_sequences set sequence_value=? where sequence_name=?";
   }
 
   @Override
   protected String getSqlUdfFileNameAndOwners(int id) {
-    return "select ds_name, ds_owner from ds_fileresourceitem_" + id + ";";
+    return "select ds_name, ds_owner from ds_fileresourceitem_" + id;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/instancedetail/OracleQuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/instancedetail/OracleQuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/instancedetail/OracleQuerySetAmbariDB.java
index e8b4265..96ebcbd 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/instancedetail/OracleQuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/instancedetail/OracleQuerySetAmbariDB.java
@@ -24,7 +24,7 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
 
   @Override
   protected String getPigInstanceSql(){
-    return  "select distinct(view_instance_name) as instancename from viewentity where view_name='PIG{1.0.0}'";
+    return  "select distinct(view_instance_name) as instancename from viewentity where view_name
like '%PIG%'";
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/OracleQuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/OracleQuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/OracleQuerySetAmbariDB.java
index dea8429..27aee05 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/OracleQuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/OracleQuerySetAmbariDB.java
@@ -32,7 +32,7 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
   }
   @Override
   protected String getSqlinsertToPigJob(int id) {
-    return "INSERT INTO ds_pigjob_" + id + " values (?,?,0,'','f','','',?,0,?,'',?,'','',?,?,'',?)";
+    return "INSERT INTO ds_pigjob_" + id + " values (?,?,0,'',0,'','',?,0,?,'',?,'','',?,?,'',?)";
   }
   @Override
   protected String getRevSql(int id, String maxcount) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/QuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/QuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/QuerySetAmbariDB.java
index 7dddd18..a446c01 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/QuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/jobqueryset/QuerySetAmbariDB.java
@@ -85,7 +85,7 @@ public abstract class QuerySetAmbariDB {
   }
 
   protected String getSqlinsertToPigJob(int id) {
-    return "INSERT INTO ds_pigjob_" + id + " values (?,?,0,'','f','','',?,0,?,'',?,'','',?,?,'',?);";
+    return "INSERT INTO ds_pigjob_" + id + " values (?,?,0,'',0,'','',?,0,?,'',?,'','',?,?,'',?);";
   }
 
   protected String getRevSql(int id, String maxcount) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/OracleQuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/OracleQuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/OracleQuerySetAmbariDB.java
index 101c819..33535f4 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/OracleQuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/OracleQuerySetAmbariDB.java
@@ -31,7 +31,7 @@ public class OracleQuerySetAmbariDB extends QuerySetAmbariDB {
   }
   @Override
   protected String getSqlinsertToPigScript(int id) {
-    return "INSERT INTO ds_pigscript_" + id + " values (?,'1970-01-17 20:28:55.586000 +00:00:00','f',?,?,'','',?)";
+    return "INSERT INTO ds_pigscript_" + id + " values (?,TO_TIMESTAMP('1970-01-17 20:28:55',
'YYYY-MM-DD HH24:MI:SS'),0,?,?,'','',?)";
   }
   @Override
   protected String getRevSql(int id, String maxcount) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/QuerySetAmbariDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/QuerySetAmbariDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/QuerySetAmbariDB.java
index d032264..636084f 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/QuerySetAmbariDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/ambariqueryset/pig/savedscriptqueryset/QuerySetAmbariDB.java
@@ -76,7 +76,7 @@ public abstract class QuerySetAmbariDB {
   }
 
   protected String getSqlinsertToPigScript(int id) {
-    return "INSERT INTO ds_pigscript_" + id + " values (?,'1970-01-17 20:28:55.586000 +00:00:00','f',?,?,'','',?);";
+    return "INSERT INTO ds_pigscript_" + id + " values (?,'1970-01-17 20:28:55.586000 +00:00:00',0,?,?,'','',?);";
   }
 
   protected String getRevSql(int id, String maxcount) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/historyqueryset/OracleQuerySetHueDB.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/historyqueryset/OracleQuerySetHueDB.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/historyqueryset/OracleQuerySetHueDB.java
index 32edde4..b504a68 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/historyqueryset/OracleQuerySetHueDB.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/historyqueryset/OracleQuerySetHueDB.java
@@ -26,36 +26,36 @@ public class OracleQuerySetHueDB extends QuerySetHueDB {
   }
   @Override
   protected String fetchHueQueriesNoStartdateNoEnddateSql() {
-    return "select query from beeswax_queryhistory where owner_id =?";
+    return "select owner_id, query from beeswax_queryhistory where owner_id =?";
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateSql() {
-    return "select query from beeswax_queryhistory where owner_id =? AND submission_date
<= date(?)";
+    return "select owner_id, query from beeswax_queryhistory where owner_id =? AND submission_date
<= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateSql() {
-    return "select query from beeswax_queryhistory where owner_id =? AND submission_date
>= date(?)";
+    return "select owner_id, query from beeswax_queryhistory where owner_id =? AND submission_date
>= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateSql() {
-    return "select query from beeswax_queryhistory where owner_id =? AND submission_date
>= date(?) AND submission_date <= date(?)";
+    return "select owner_id, query from beeswax_queryhistory where owner_id =? AND submission_date
>= to_date(?, 'YYYY-MM-DD') AND submission_date <= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesNoStartdateNoEnddateYesallUserSql() {
-    return "select query from beeswax_queryhistory";
+    return "select owner_id, query from beeswax_queryhistory";
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateYesallUserSql() {
-    return "select query from beeswax_queryhistory where submission_date <= date(?)";
+    return "select owner_id, query from beeswax_queryhistory where submission_date <=
to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateYesallUserSql() {
-    return "select query from beeswax_queryhistory where submission_date >= date(?)";
+    return "select owner_id, query from beeswax_queryhistory where submission_date >=
to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateYesallUserSql() {
-    return "select query from beeswax_queryhistory where submission_date >= date(?) AND
submission_date <= date(?)";
+    return "select owner_id, query from beeswax_queryhistory where submission_date >=
to_date(?, 'YYYY-MM-DD') AND submission_date <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/savedqueryset/OracleQuerySetHueDb.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/savedqueryset/OracleQuerySetHueDb.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/savedqueryset/OracleQuerySetHueDb.java
index f1e1ede..e8beef6 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/savedqueryset/OracleQuerySetHueDb.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/hive/savedqueryset/OracleQuerySetHueDb.java
@@ -31,16 +31,16 @@ public class OracleQuerySetHueDb extends QuerySetHueDb {
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateSql() {
-    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and
owner_id =? AND mtime <= date(?)";
+    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and
owner_id =? AND mtime <= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateSql() {
-    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and
owner_id =? AND mtime >= date(?)";
+    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and
owner_id =? AND mtime >= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateSql() {
-    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and
owner_id =? AND mtime >= date(?) AND mtime <= date(?)";
+    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'and
owner_id =? AND mtime >= to_date(?, 'YYYY-MM-DD') AND mtime <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
@@ -49,17 +49,17 @@ public class OracleQuerySetHueDb extends QuerySetHueDb {
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateYesallUserSql() {
-    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'
AND mtime <= date(?)";
+    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'
AND mtime <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateYesallUserSql() {
-    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'
AND mtime >= date(?)";
+    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'
AND mtime >= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateYesallUserSql() {
-    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'
AND mtime >= date(?) AND mtime <= date(?)";
+    return "select data,name,owner_id from beeswax_savedquery where name!='My saved query'
AND mtime >= to_date(?, 'YYYY-MM-DD') AND mtime <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/jobqueryset/OracleQuerySetHueDb.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/jobqueryset/OracleQuerySetHueDb.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/jobqueryset/OracleQuerySetHueDb.java
index 6066ac5..87b073c 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/jobqueryset/OracleQuerySetHueDb.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/jobqueryset/OracleQuerySetHueDb.java
@@ -30,17 +30,17 @@ public class OracleQuerySetHueDb extends QuerySetHueDb {
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateSql() {
-    return "select status,start_time,statusdir,script_title,user_id from pig_job where user_id
=?  AND start_time <= date(?)";
+    return "select status,start_time,statusdir,script_title,user_id from pig_job where user_id
=?  AND start_time <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateSql() {
-    return "select status,start_time,statusdir,script_title,user_id from pig_job where user_id
=? AND start_time >= date(?)";
+    return "select status,start_time,statusdir,script_title,user_id from pig_job where user_id
=? AND start_time >= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateSql() {
-    return "select status,start_time,statusdir,script_title,user_id from pig_job where user_id
=? AND start_time >= date(?) AND start_time <= date(?)";
+    return "select status,start_time,statusdir,script_title,user_id from pig_job where user_id
=? AND start_time >= to_date(?, 'YYYY-MM-DD') AND start_time <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
@@ -49,17 +49,17 @@ public class OracleQuerySetHueDb extends QuerySetHueDb {
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateYesallUserSql() {
-    return "select status,start_time,statusdir,script_title,user_id from pig_job where  start_time
<= date(?)";
+    return "select status,start_time,statusdir,script_title,user_id from pig_job where  start_time
<= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateYesallUserSql() {
-    return "select status,start_time,statusdir,script_title,user_id from pig_job where  start_time
>= date(?)";
+    return "select status,start_time,statusdir,script_title,user_id from pig_job where  start_time
>= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateYesallUserSql() {
-    return "select status,start_time,statusdir,script_title,user_id from pig_job where  start_time
>= date(?) AND start_time <= date(?)";
+    return "select status,start_time,statusdir,script_title,user_id from pig_job where  start_time
>= to_date(?, 'YYYY-MM-DD') AND start_time <= to_date(?, 'YYYY-MM-DD')";
 
   }
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/5f5762c6/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/OracleQuerySetHueDb.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/OracleQuerySetHueDb.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/OracleQuerySetHueDb.java
index 0604ae7..ed4b38b 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/OracleQuerySetHueDb.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/OracleQuerySetHueDb.java
@@ -26,39 +26,39 @@ public class OracleQuerySetHueDb extends QuerySetHueDb {
   }
   @Override
   protected String fetchHueQueriesNoStartdateNoEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1 AND user_id =?";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1 AND user_id =?";
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1 AND user_id =? AND  date_created <= date(?)";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1 AND user_id =? AND  date_created <= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1 AND user_id =? AND date_created >= date(?)";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1 AND user_id =? AND date_created >= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1 AND user_id =? AND date_created >= date(?) AND date_created <= date(?)";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1 AND user_id =? AND date_created >= to_date(?, 'YYYY-MM-DD') AND date_created
<= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesNoStartdateNoEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1 ";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1 ";
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1  AND  date_created <= date(?)";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1  AND  date_created <= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1  AND date_created >= date(?)";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1  AND date_created >= to_date(?, 'YYYY-MM-DD')";
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved=1  AND date_created >= date(?) AND date_created <= date(?)";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved=1  AND date_created >= to_date(?, 'YYYY-MM-DD') AND date_created <= to_date(?,
'YYYY-MM-DD')";
   }
   @Override
   protected String fetchUserNameSql() {
-    return "select username from auth_user where id = ?;";
+    return "select username from auth_user where id = ?";
   }
 
 }


Mime
View raw message