You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ni...@apache.org on 2018/05/17 08:32:43 UTC

[ambari] branch branch-2.6 updated: AMBARI-23604 : Hive View : handled table buckets specification in upload table (nitirajrathore) (#1297)

This is an automated email from the ASF dual-hosted git repository.

nitiraj pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new 0b1f8c1  AMBARI-23604 : Hive View : handled table buckets specification in upload table (nitirajrathore) (#1297)
0b1f8c1 is described below

commit 0b1f8c18f14c196bf0304a4a273361be2aa051d4
Author: nitirajrathore <ni...@gmail.com>
AuthorDate: Thu May 17 14:02:41 2018 +0530

    AMBARI-23604 : Hive View : handled table buckets specification in upload table (nitirajrathore) (#1297)
---
 .../internal/query/generators/InsertFromQueryGenerator.java       | 4 +++-
 .../org/apache/ambari/view/hive20/resources/jobs/JobService.java  | 2 +-
 .../ui/app/routes/databases/database/tables/upload-table.js       | 1 +
 contrib/views/pig/pom.xml                                         | 8 ++++++++
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/InsertFromQueryGenerator.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/InsertFromQueryGenerator.java
index e761425..2d2930a 100644
--- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/InsertFromQueryGenerator.java
+++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/internal/query/generators/InsertFromQueryGenerator.java
@@ -47,7 +47,9 @@ public class InsertFromQueryGenerator implements QueryGenerator{
   public Optional<String> getQuery() throws ServiceException {
     StringBuilder insertQuery = new StringBuilder();
     //Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict
-    insertQuery.append("set hive.exec.dynamic.partition.mode=nonstrict;").append("\n");
+    insertQuery.append("SET hive.exec.dynamic.partition.mode=nonstrict;").append("\n");
+    insertQuery.append("SET hive.support.concurrency=true;").append("\n");
+    insertQuery.append("SET hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;").append("\n");
 
     insertQuery.append(" FROM ").append("`").append(insertFromQueryInput.getFromDatabase()).append("`.`")
         .append(insertFromQueryInput.getFromTable()).append("` tempTable");
diff --git a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/jobs/JobService.java b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/jobs/JobService.java
index d99938f..94e330c 100644
--- a/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/jobs/JobService.java
+++ b/contrib/views/hive20/src/main/java/org/apache/ambari/view/hive20/resources/jobs/JobService.java
@@ -141,7 +141,7 @@ public class JobService extends BaseService {
           Throwable th = error.get().getError();
           if(th instanceof SQLException){
             SQLException sqlException = (SQLException) th;
-            if(sqlException.getSQLState().equals("AUTHFAIL") && ConnectionFactory.isLdapEnabled(context))
+            if(sqlException.getSQLState() != null && sqlException.getSQLState().equals("AUTHFAIL") && ConnectionFactory.isLdapEnabled(context))
               throw new ServiceFormattedException("Hive Authentication failed", sqlException, 401);
           }
           throw new Exception(th);
diff --git a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js
index 54acc22..1baafa1 100644
--- a/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js
+++ b/contrib/views/hive20/src/main/resources/ui/app/routes/databases/database/tables/upload-table.js
@@ -307,6 +307,7 @@ export default NewTable.extend(UILoggerMixin, {
         column.set("precision");
       }
       column.set("isPartitioned", false); // remove all partitioning information from temp table.
+      column.set("isClustered", false); // remove all clustering information from temp table.
       return column;
     });
 
diff --git a/contrib/views/pig/pom.xml b/contrib/views/pig/pom.xml
index 4698f23..0725cbe 100644
--- a/contrib/views/pig/pom.xml
+++ b/contrib/views/pig/pom.xml
@@ -155,6 +155,14 @@
   <build>
     <plugins>
       <plugin>
+        <!--disabled parallel execution of tests for pig-->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <forkCount>0</forkCount>
+        </configuration>
+      </plugin>
+      <plugin>
         <!-- Cleanup ui files -->
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-clean-plugin</artifactId>

-- 
To stop receiving notification emails like this one, please contact
nitiraj@apache.org.