ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [22/32] ambari git commit: AMBARI-20409. Hue Migration View Giving error while migrating Pig Jobs in Postgres DB (Ishan Bhatt via pallavkul)
Date Thu, 16 Mar 2017 20:01:58 GMT
AMBARI-20409. Hue Migration View Giving error while migrating Pig Jobs in Postgres DB (Ishan
Bhatt via pallavkul)


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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 1c616b2975b6a442e15ada772cc274342c229948
Parents: b7d5e01
Author: pallavkul <pallav.kul@gmail.com>
Authored: Thu Mar 16 17:10:53 2017 +0530
Committer: pallavkul <pallav.kul@gmail.com>
Committed: Thu Mar 16 17:10:53 2017 +0530

----------------------------------------------------------------------
 .../pig/jobqueryset/QuerySetAmbariDB.java       |  2 +-
 .../savedscriptqueryset/QuerySetAmbariDB.java   |  2 +-
 .../PostgressQuerySetHueDb.java                 | 20 ++++++++++++--------
 3 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1c616b29/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 a446c01..aa7c4dc 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,'',0,'','',?,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/1c616b29/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 636084f..da7abcc 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',0,?,?,'','',?);";
+    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/1c616b29/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/PostgressQuerySetHueDb.java
----------------------------------------------------------------------
diff --git a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/PostgressQuerySetHueDb.java
b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/PostgressQuerySetHueDb.java
index 3c73c03..a258539 100644
--- a/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/PostgressQuerySetHueDb.java
+++ b/contrib/views/hueambarimigration/src/main/java/org/apache/ambari/view/huetoambarimigration/datasource/queryset/huequeryset/pig/savedscriptqueryset/PostgressQuerySetHueDb.java
@@ -27,41 +27,45 @@ public class PostgressQuerySetHueDb extends QuerySetHueDb {
   }
   @Override
   protected String fetchHueQueriesNoStartdateNoEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true' AND user_id =?;";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true' AND user_id =?;";
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true' AND user_id =? AND  date_created <= date(?);";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true' AND user_id =? AND  date_created <= date(?);";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true' AND user_id =? AND date_created >= date(?);";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true' AND user_id =? AND date_created >= date(?);";
 
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true' 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='true' AND user_id =? AND date_created >= date(?) AND date_created <= date(?);";
 
   }
   @Override
   protected String fetchHueQueriesNoStartdateNoEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true' ;";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true' ;";
   }
   @Override
   protected String fetchHueQueriesNoStartdateYesEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true'  AND  date_created <= date(?);";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true'  AND  date_created <= date(?);";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateNoEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true'  AND date_created >= date(?);";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true'  AND date_created >= date(?);";
 
   }
   @Override
   protected String fetchHueQueriesYesStartdateYesEnddateYesallUserSql() {
-    return "select pig_script,title,date_created,saved,arguments from pig_pigscript where
saved='true'  AND date_created >= date(?) AND date_created <= date(?);";
+    return "select user_id, pig_script,title,date_created,saved,arguments from pig_pigscript
where saved='true'  AND date_created >= date(?) AND date_created <= date(?);";
 
   }
+  @Override
+  protected String fetchUserNameSql() {
+    return "select username from auth_user where id = ?;";
+  }
 }


Mime
View raw message