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-16706. ADLS as default FS is not supported for any views (Gaurav Nagar via pallavkul)
Date Thu, 19 May 2016 18:11:04 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 17b9d3531 -> 270c23fb1


AMBARI-16706. ADLS as default FS is not supported for any views (Gaurav Nagar via pallavkul)


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

Branch: refs/heads/branch-2.4
Commit: 270c23fb12f69587f05d2d0a50709b0a31824c35
Parents: 17b9d35
Author: Pallav Kulshreshtha <pallav.kul@gmail.com>
Authored: Thu May 19 23:39:41 2016 +0530
Committer: Pallav Kulshreshtha <pallav.kul@gmail.com>
Committed: Thu May 19 23:40:39 2016 +0530

----------------------------------------------------------------------
 contrib/views/utils/pom.xml                            |  5 +++++
 .../ambari/view/utils/ambari/ValidatorUtils.java       |  2 +-
 .../ambari/view/utils/hdfs/ConfigurationBuilder.java   | 13 +++++++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/270c23fb/contrib/views/utils/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/utils/pom.xml b/contrib/views/utils/pom.xml
index c15afad..b3ae02b 100644
--- a/contrib/views/utils/pom.xml
+++ b/contrib/views/utils/pom.xml
@@ -57,6 +57,11 @@
       <version>${hadoop.version}</version>
     </dependency>
     <dependency>
+      <groupId>com.squareup.okhttp</groupId>
+      <artifactId>okhttp</artifactId>
+      <version>2.4.0</version>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/ambari/blob/270c23fb/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/ValidatorUtils.java
----------------------------------------------------------------------
diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/ValidatorUtils.java
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/ValidatorUtils.java
index c936355..f5f8bd9 100644
--- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/ValidatorUtils.java
+++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/ambari/ValidatorUtils.java
@@ -29,7 +29,7 @@ public class ValidatorUtils {
    * @return is url valid
    */
   public static boolean validateHdfsURL(String webhdfsUrl) {
-    String[] schemes = {"webhdfs", "hdfs", "s3","wasb","swebhdfs"};
+    String[] schemes = {"webhdfs", "hdfs", "s3", "wasb", "swebhdfs", "adl"};
     return validateURL(webhdfsUrl, schemes);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/270c23fb/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
----------------------------------------------------------------------
diff --git a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
index a371889..9edf9d7 100644
--- a/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
+++ b/contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/ConfigurationBuilder.java
@@ -281,6 +281,7 @@ public class ConfigurationBuilder {
     conf.set("fs.swebhdfs.impl", SWebHdfsFileSystem.class.getName());
     
     configureWASB();
+    configureADL();
 
     return conf;
   }
@@ -303,6 +304,18 @@ public class ConfigurationBuilder {
   }
 
   /**
+   *  Fill adl properties if adl:// scheme configured
+   */
+  public void configureADL() {
+    if (defaultFsUri.getScheme().equals("adl")) {
+      conf.set("fs.adl.impl", "com.microsoft.azure.datalake.store.AdlFileSystem");
+      copyPropertyIfExists(CORE_SITE,"dfs.webhdfs.oauth2.access.token.provider");
+      copyPropertyIfExists(CORE_SITE,"fs.azure.datalake.token.provider.service.urls");
+      copyPropertyIfExists(CORE_SITE,"fs.azure.datalake.token.provider.script");
+    }
+  }
+
+  /**
    * Builds the authentication configuration
    * @return map of HDFS auth params for view
    * @throws HdfsApiException


Mime
View raw message