ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pallav...@apache.org
Subject ambari git commit: AMBARI-17513 : corrected regex check to fix : Upload Table - picks different datatype for same file, for different hive view version. (Nitiraj Rathore via pallavkul)
Date Fri, 01 Jul 2016 10:09:27 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk ff296f9d0 -> b6ae19b25


AMBARI-17513 : corrected regex check to fix : Upload Table - picks different datatype for
same file, for different hive view version. (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/b6ae19b2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b6ae19b2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b6ae19b2

Branch: refs/heads/trunk
Commit: b6ae19b259e370918202378421c9bf4c37e7be32
Parents: ff296f9
Author: Pallav Kulshreshtha <pallav.kul@gmail.com>
Authored: Fri Jul 1 15:38:36 2016 +0530
Committer: Pallav Kulshreshtha <pallav.kul@gmail.com>
Committed: Fri Jul 1 15:38:36 2016 +0530

----------------------------------------------------------------------
 .../view/hive2/resources/uploads/parsers/ParseUtils.java       | 2 +-
 .../ambari/view/hive2/resources/upload/ParseUtilsTest.java     | 2 ++
 .../ambari/view/hive/resources/uploads/parsers/ParseUtils.java | 2 +-
 .../main/resources/ui/hive-web/app/controllers/upload-table.js | 6 ++++--
 .../ambari/view/hive/resources/upload/ParseUtilsTest.java      | 2 ++
 5 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b6ae19b2/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/ParseUtils.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/ParseUtils.java
b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/ParseUtils.java
index 1c8fb70..cafe148 100644
--- a/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/ParseUtils.java
+++ b/contrib/views/hive-next/src/main/java/org/apache/ambari/view/hive2/resources/uploads/parsers/ParseUtils.java
@@ -38,7 +38,7 @@ public class ParseUtils {
   private static final String HIVE_DATE_FORMAT = "yyyy-MM-dd";
 
   // no strict checking required as it is done by Date parsing
-  private static final String HIVE_DATE_FORMAT_REGEX = "^[0-9]{4}-[0-9]?[1-9]-[0-9]?[0-9]$";
+  private static final String HIVE_DATE_FORMAT_REGEX = "^[0-9]{4}-[0-9]?[0-9]-[0-9]?[0-9]$";
 
 
   public static boolean isInteger(Object object) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6ae19b2/contrib/views/hive-next/src/test/java/org/apache/ambari/view/hive2/resources/upload/ParseUtilsTest.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive-next/src/test/java/org/apache/ambari/view/hive2/resources/upload/ParseUtilsTest.java
b/contrib/views/hive-next/src/test/java/org/apache/ambari/view/hive2/resources/upload/ParseUtilsTest.java
index e540879..39f5e98 100644
--- a/contrib/views/hive-next/src/test/java/org/apache/ambari/view/hive2/resources/upload/ParseUtilsTest.java
+++ b/contrib/views/hive-next/src/test/java/org/apache/ambari/view/hive2/resources/upload/ParseUtilsTest.java
@@ -29,6 +29,7 @@ public class ParseUtilsTest {
     Assert.assertTrue(ParseUtils.isDate("0001-1-3"));
     Assert.assertTrue(ParseUtils.isDate("1996-1-03"));
     Assert.assertTrue(ParseUtils.isDate("1996-01-3"));
+    Assert.assertTrue(ParseUtils.isDate("1996-10-3"));
     Assert.assertFalse(ParseUtils.isDate("1970-01-01 01:01:01"));
     Assert.assertFalse(ParseUtils.isDate("1970-01-01 23:59:59.999999"));
     Assert.assertFalse(ParseUtils.isDate("1970/01/01"));
@@ -48,6 +49,7 @@ public class ParseUtilsTest {
     Assert.assertTrue(ParseUtils.isTimeStamp("1999-12-31 23:59:59.999999"));
     Assert.assertTrue(ParseUtils.isTimeStamp("1999-12-31 23:59:59.99999999"));
     Assert.assertTrue(ParseUtils.isTimeStamp("1999-12-31 23:59:59.999999999"));
+    Assert.assertTrue(ParseUtils.isTimeStamp("1999-10-31 23:59:59.999999999"));
     Assert.assertFalse(ParseUtils.isTimeStamp("1999-12-31 23:59:59.9999999999"));
     Assert.assertFalse(ParseUtils.isTimeStamp("1999/12/31 23:59:59.9999999999"));
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6ae19b2/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
index e4e2853..10b042a 100644
--- a/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
+++ b/contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/uploads/parsers/ParseUtils.java
@@ -38,7 +38,7 @@ public class ParseUtils {
   private static final String HIVE_DATE_FORMAT = "yyyy-MM-dd";
 
   // no strict checking required as it is done by Date parsing
-  private static final String HIVE_DATE_FORMAT_REGEX = "^[0-9]{4}-[0-9]?[1-9]-[0-9]?[0-9]$";
+  private static final String HIVE_DATE_FORMAT_REGEX = "^[0-9]{4}-[0-9]?[0-9]-[0-9]?[0-9]$";
 
 
   public static boolean isInteger(Object object) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6ae19b2/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
index 51d2624..061a445 100644
--- a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
+++ b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/upload-table.js
@@ -281,8 +281,10 @@ export default Ember.Controller.extend({
           console.log("rejecting waitForJobStatus with : " + status);
           reject(new Error(job.statusMessage));
         } else {
-          console.log("retrying waitForJobStatus : ", jobId);
-          self.waitForJobStatus(jobId, resolve, reject);
+          Ember.run.later(function(){
+            console.log("retrying waitForJobStatus : ", jobId);
+            self.waitForJobStatus(jobId, resolve, reject);
+          },1000);
         }
       }, function (error) {
         console.log("rejecting waitForJobStatus with : " + error);

http://git-wip-us.apache.org/repos/asf/ambari/blob/b6ae19b2/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/ParseUtilsTest.java
----------------------------------------------------------------------
diff --git a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/ParseUtilsTest.java
b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/ParseUtilsTest.java
index b75ed4f..d1ce211 100644
--- a/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/ParseUtilsTest.java
+++ b/contrib/views/hive/src/test/java/org/apache/ambari/view/hive/resources/upload/ParseUtilsTest.java
@@ -29,6 +29,7 @@ public class ParseUtilsTest {
     Assert.assertTrue(ParseUtils.isDate("0001-1-3"));
     Assert.assertTrue(ParseUtils.isDate("1996-1-03"));
     Assert.assertTrue(ParseUtils.isDate("1996-01-3"));
+    Assert.assertTrue(ParseUtils.isDate("1996-10-3"));
     Assert.assertFalse(ParseUtils.isDate("1970-01-01 01:01:01"));
     Assert.assertFalse(ParseUtils.isDate("1970-01-01 23:59:59.999999"));
     Assert.assertFalse(ParseUtils.isDate("1970/01/01"));
@@ -48,6 +49,7 @@ public class ParseUtilsTest {
     Assert.assertTrue(ParseUtils.isTimeStamp("1999-12-31 23:59:59.999999"));
     Assert.assertTrue(ParseUtils.isTimeStamp("1999-12-31 23:59:59.99999999"));
     Assert.assertTrue(ParseUtils.isTimeStamp("1999-12-31 23:59:59.999999999"));
+    Assert.assertTrue(ParseUtils.isTimeStamp("1999-10-31 23:59:59.999999999"));
     Assert.assertFalse(ParseUtils.isTimeStamp("1999-12-31 23:59:59.9999999999"));
     Assert.assertFalse(ParseUtils.isTimeStamp("1999/12/31 23:59:59.9999999999"));
   }


Mime
View raw message