You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ni...@apache.org on 2020/10/23 17:22:47 UTC

[atlas] branch branch-2.0 updated (f3f5851 -> 3972da1)

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

nixon pushed a change to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git.


    from f3f5851  ATLAS-4000: refactored UTs and ITs to remove compile dependency from product code on atlas-testtools - #1
     new 4d050f0  ATLAS-4002 : Upgrade commons-beanutils to 1.9.4 due to CVE-2019-10086
     new 52d69b4  ATLAS-4003 : Exclude findbugs-annotations jar from packaging
     new 947f83c  ATLAS-4001 : Update poi jar version to 4.1.1
     new 94dfc7a  ATLAS-3996 : Upgrade ant to 1.10.9
     new 3972da1  ATLAS-3994 : import-hive.sh script fails when missing mandatory attribute value is null

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 addons/hbase-bridge-shim/pom.xml                             |  4 ++++
 addons/hbase-bridge/pom.xml                                  |  6 ++++++
 addons/hbase-testing-util/pom.xml                            | 12 ++++++++++++
 addons/hive-bridge/pom.xml                                   |  4 ++++
 .../org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java    |  8 ++++++--
 addons/sqoop-bridge/pom.xml                                  |  4 ++++
 pom.xml                                                      | 10 +++++-----
 repository/pom.xml                                           |  6 ++++++
 .../src/main/java/org/apache/atlas/util/FileUtils.java       |  8 ++++++--
 9 files changed, 53 insertions(+), 9 deletions(-)


[atlas] 01/05: ATLAS-4002 : Upgrade commons-beanutils to 1.9.4 due to CVE-2019-10086

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 4d050f0a205eb9b0394aceaae0e040cb5462aa2d
Author: chaitali borole <ch...@cloudera.com>
AuthorDate: Thu Oct 22 15:49:53 2020 +0530

    ATLAS-4002 : Upgrade commons-beanutils to 1.9.4 due to CVE-2019-10086
    
    (cherry picked from commit f3faad547380ac786427d84c95244de502781360)
---
 pom.xml                                                       | 2 +-
 repository/src/main/java/org/apache/atlas/util/FileUtils.java | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1b1f4a9..b9f777d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -719,7 +719,7 @@
         <!-- Apache commons -->
 
         <!--Apache poi and Open csv-->
-        <opencsv.version>4.6</opencsv.version>
+        <opencsv.version>5.0</opencsv.version>
         <poi.version>3.17</poi.version>
         <poi-ooxml.version>3.17</poi-ooxml.version>
 
diff --git a/repository/src/main/java/org/apache/atlas/util/FileUtils.java b/repository/src/main/java/org/apache/atlas/util/FileUtils.java
index 66ade26..e8061d7 100644
--- a/repository/src/main/java/org/apache/atlas/util/FileUtils.java
+++ b/repository/src/main/java/org/apache/atlas/util/FileUtils.java
@@ -18,6 +18,7 @@
 package org.apache.atlas.util;
 
 import com.opencsv.CSVReader;
+import com.opencsv.exceptions.CsvValidationException;
 import org.apache.atlas.AtlasErrorCode;
 import org.apache.atlas.exception.AtlasBaseException;
 import org.apache.commons.collections.CollectionUtils;
@@ -70,7 +71,7 @@ public class FileUtils {
         return ret;
     }
 
-    public static List<String[]> readCSV(InputStream inputStream) throws IOException {
+    public static List<String[]> readCSV(InputStream inputStream) throws IOException, AtlasBaseException {
         List<String[]> ret = new ArrayList<>();
 
         try (CSVReader csvReader = new CSVReader(new InputStreamReader(inputStream))) {
@@ -87,6 +88,8 @@ public class FileUtils {
                     ret.add(data);
                 }
             }
+        } catch (CsvValidationException e) {
+            throw new AtlasBaseException(AtlasErrorCode.NO_DATA_FOUND, e);
         }
 
         return ret;


[atlas] 03/05: ATLAS-4001 : Update poi jar version to 4.1.1

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 947f83c623e3ce49c2f983002ed20101469a6e81
Author: chaitali borole <ch...@cloudera.com>
AuthorDate: Wed Oct 21 18:04:03 2020 +0530

    ATLAS-4001 : Update poi jar version to 4.1.1
    
    (cherry picked from commit e45cd453a4abf9d0bf254ee127e62f0235039a69)
---
 pom.xml                                                       | 4 ++--
 repository/src/main/java/org/apache/atlas/util/FileUtils.java | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/pom.xml b/pom.xml
index b9f777d..210d7e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -720,8 +720,8 @@
 
         <!--Apache poi and Open csv-->
         <opencsv.version>5.0</opencsv.version>
-        <poi.version>3.17</poi.version>
-        <poi-ooxml.version>3.17</poi-ooxml.version>
+        <poi.version>4.1.1</poi.version>
+        <poi-ooxml.version>4.1.1</poi-ooxml.version>
 
         <javax-inject.version>1</javax-inject.version>
         <jettison.version>1.3.7</jettison.version>
diff --git a/repository/src/main/java/org/apache/atlas/util/FileUtils.java b/repository/src/main/java/org/apache/atlas/util/FileUtils.java
index e8061d7..71ac9e3 100644
--- a/repository/src/main/java/org/apache/atlas/util/FileUtils.java
+++ b/repository/src/main/java/org/apache/atlas/util/FileUtils.java
@@ -26,6 +26,7 @@ import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.CellType;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
@@ -127,7 +128,7 @@ public class FileUtils {
         for (int c = row.getFirstCellNum(); c < row.getLastCellNum(); c++) {
             Cell cell = row.getCell(c);
 
-            if (cell != null && cell.getCellType() != Cell.CELL_TYPE_BLANK) {
+            if (cell != null && cell.getCellType() != CellType.BLANK) {
                 return false;
             }
         }


[atlas] 02/05: ATLAS-4003 : Exclude findbugs-annotations jar from packaging

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 52d69b4dde5e53bb1db5774eaf91dbd5f75e7c41
Author: chaitali borole <ch...@cloudera.com>
AuthorDate: Thu Oct 22 18:17:51 2020 +0530

    ATLAS-4003 : Exclude findbugs-annotations jar from packaging
    
    (cherry picked from commit 8f9ef44660230030a69bfc7c488edf8f11cfe933)
---
 addons/hbase-bridge-shim/pom.xml  |  4 ++++
 addons/hbase-bridge/pom.xml       |  6 ++++++
 addons/hbase-testing-util/pom.xml | 12 ++++++++++++
 addons/hive-bridge/pom.xml        |  4 ++++
 addons/sqoop-bridge/pom.xml       |  4 ++++
 repository/pom.xml                |  6 ++++++
 6 files changed, 36 insertions(+)

diff --git a/addons/hbase-bridge-shim/pom.xml b/addons/hbase-bridge-shim/pom.xml
index b113d59..b7fb4da 100644
--- a/addons/hbase-bridge-shim/pom.xml
+++ b/addons/hbase-bridge-shim/pom.xml
@@ -47,6 +47,10 @@
                     <artifactId>servlet-api</artifactId>
                 </exclusion>
                 <exclusion>
+                    <groupId>com.github.stephenc.findbugs</groupId>
+                    <artifactId>findbugs-annotations</artifactId>
+                </exclusion>
+                <exclusion>
                     <groupId>javax.ws.rs</groupId>
                     <artifactId>*</artifactId>
                 </exclusion>
diff --git a/addons/hbase-bridge/pom.xml b/addons/hbase-bridge/pom.xml
index c64722d..829762c 100644
--- a/addons/hbase-bridge/pom.xml
+++ b/addons/hbase-bridge/pom.xml
@@ -176,6 +176,12 @@
             <groupId>org.apache.hbase</groupId>
             <artifactId>hbase-common</artifactId>
             <version>${hbase.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.github.stephenc.findbugs</groupId>
+                    <artifactId>findbugs-annotations</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.hbase</groupId>
diff --git a/addons/hbase-testing-util/pom.xml b/addons/hbase-testing-util/pom.xml
index 4625e6d..0c17523 100644
--- a/addons/hbase-testing-util/pom.xml
+++ b/addons/hbase-testing-util/pom.xml
@@ -133,6 +133,12 @@
             <version>${hbase.version}</version>
             <type>jar</type>
             <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.github.stephenc.findbugs</groupId>
+                    <artifactId>findbugs-annotations</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
@@ -155,6 +161,12 @@
             <version>${hbase.version}</version>
             <type>jar</type>
             <scope>compile</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.github.stephenc.findbugs</groupId>
+                    <artifactId>findbugs-annotations</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
diff --git a/addons/hive-bridge/pom.xml b/addons/hive-bridge/pom.xml
index 7f50eea..8b58c30 100755
--- a/addons/hive-bridge/pom.xml
+++ b/addons/hive-bridge/pom.xml
@@ -56,6 +56,10 @@
                     <groupId>org.eclipse.jetty</groupId>
                     <artifactId>*</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>com.github.stephenc.findbugs</groupId>
+                    <artifactId>findbugs-annotations</artifactId>
+                </exclusion>
             </exclusions>
 
         </dependency>
diff --git a/addons/sqoop-bridge/pom.xml b/addons/sqoop-bridge/pom.xml
index 5d0a5ee..f73c47f 100644
--- a/addons/sqoop-bridge/pom.xml
+++ b/addons/sqoop-bridge/pom.xml
@@ -52,6 +52,10 @@
                     <groupId>org.mortbay.jetty</groupId>
                     <artifactId>*</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>com.github.stephenc.findbugs</groupId>
+                    <artifactId>findbugs-annotations</artifactId>
+                </exclusion>
             </exclusions>
 
         </dependency>
diff --git a/repository/pom.xml b/repository/pom.xml
index a0b2b1d..924c15c 100755
--- a/repository/pom.xml
+++ b/repository/pom.xml
@@ -140,6 +140,12 @@
         <dependency>
             <groupId>org.apache.hbase</groupId>
             <artifactId>hbase-client</artifactId>
+            <exclusions>
+            <exclusion>
+                <groupId>com.github.stephenc.findbugs</groupId>
+                <artifactId>findbugs-annotations</artifactId>
+            </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>


[atlas] 04/05: ATLAS-3996 : Upgrade ant to 1.10.9

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 94dfc7a7d1a0f894d924dc02438cf01d22c1a504
Author: chaitali borole <ch...@cloudera.com>
AuthorDate: Mon Oct 19 13:32:10 2020 +0530

    ATLAS-3996 : Upgrade ant to 1.10.9
    
    (cherry picked from commit 7925946adeeddeb878e2bdf3c0894b312a50f639)
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 210d7e3..82944d1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -619,7 +619,7 @@
                 <graphdb.backend.impl>org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase</graphdb.backend.impl>
                 <graph.index.backend>solr</graph.index.backend>
                 <tests.solr.embedded>true</tests.solr.embedded>
-                <distro.exclude.packages>WEB-INF/lib/je-*.jar,WEB-INF/lib/solr-test-framework-*.jar, WEB-INF/lib/jts-*.jar,WEB-INF/lib/logback-*.jar,WEB-INF/lib/dom4j-*.jar</distro.exclude.packages>
+                <distro.exclude.packages>WEB-INF/lib/je-*.jar,WEB-INF/lib/solr-test-framework-*.jar, WEB-INF/lib/jts-*.jar,WEB-INF/lib/logback-*.jar,WEB-INF/lib/dom4j-*.jar,WEB-INF/lib/ant-*.jar</distro.exclude.packages>
             </properties>
         </profile>
 
@@ -639,7 +639,7 @@
                 <graphdb.backend.impl>org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase</graphdb.backend.impl>
                 <graph.index.backend>solr</graph.index.backend>
                 <tests.solr.embedded>true</tests.solr.embedded>
-                <distro.exclude.packages>WEB-INF/lib/je-*.jar,WEB-INF/lib/solr-test-framework-*.jar, WEB-INF/lib/jts-*.jar,WEB-INF/lib/logback-*.jar,WEB-INF/lib/dom4j-*.jar</distro.exclude.packages>
+                <distro.exclude.packages>WEB-INF/lib/je-*.jar,WEB-INF/lib/solr-test-framework-*.jar, WEB-INF/lib/jts-*.jar,WEB-INF/lib/logback-*.jar,WEB-INF/lib/dom4j-*.jar,WEB-INF/lib/ant-*.jar</distro.exclude.packages>
             </properties>
         </profile>
 


[atlas] 05/05: ATLAS-3994 : import-hive.sh script fails when missing mandatory attribute value is null

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nixon pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git

commit 3972da13d6df1b5975ae53ceddfe8d153db454fa
Author: chaitali borole <ch...@cloudera.com>
AuthorDate: Mon Oct 19 18:08:14 2020 +0530

    ATLAS-3994 : import-hive.sh script fails when missing mandatory attribute value is null
    
    (cherry picked from commit 82cdd700b2133e74ca8bce9aa55d93e76c8ec6fc)
---
 .../java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java    | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
index c0e2c1f..1bdfa4f 100755
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
@@ -91,6 +91,7 @@ public class HiveMetaStoreBridge {
 
     public static final String CONF_PREFIX                     = "atlas.hook.hive.";
     public static final String CLUSTER_NAME_KEY                = "atlas.cluster.name";
+    public static final String HIVE_USERNAME                   = "atlas.hook.hive.default.username";
     public static final String HIVE_METADATA_NAMESPACE         = "atlas.metadata.namespace";
     public static final String HDFS_PATH_CONVERT_TO_LOWER_CASE = CONF_PREFIX + "hdfs_path.convert_to_lowercase";
     public static final String HOOK_AWS_S3_ATLAS_MODEL_VERSION = CONF_PREFIX + "aws_s3.atlas.model.version";
@@ -117,7 +118,6 @@ public class HiveMetaStoreBridge {
 
     private String awsS3AtlasModelVersion = null;
 
-
     public static void main(String[] args) {
         int exitCode = EXIT_CODE_FAILED;
         AtlasClientV2 atlasClientV2 = null;
@@ -398,7 +398,11 @@ public class HiveMetaStoreBridge {
                     processInst.setAttribute(ATTRIBUTE_CLUSTER_NAME, metadataNamespace);
                     processInst.setRelationshipAttribute(ATTRIBUTE_INPUTS, Collections.singletonList(AtlasTypeUtil.getAtlasRelatedObjectId(pathInst, RELATIONSHIP_DATASET_PROCESS_INPUTS)));
                     processInst.setRelationshipAttribute(ATTRIBUTE_OUTPUTS, Collections.singletonList(AtlasTypeUtil.getAtlasRelatedObjectId(tableInst, RELATIONSHIP_PROCESS_DATASET_OUTPUTS)));
-                    processInst.setAttribute(ATTRIBUTE_USER_NAME, table.getOwner());
+                    String userName = table.getOwner();
+                    if (StringUtils.isEmpty(userName)) {
+                        userName = ApplicationProperties.get().getString(HIVE_USERNAME, "hive");
+                    }
+                    processInst.setAttribute(ATTRIBUTE_USER_NAME, userName);
                     processInst.setAttribute(ATTRIBUTE_START_TIME, now);
                     processInst.setAttribute(ATTRIBUTE_END_TIME, now);
                     processInst.setAttribute(ATTRIBUTE_OPERATION_TYPE, "CREATETABLE");