Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F02112009D9 for ; Thu, 19 May 2016 20:11:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id EED02160A00; Thu, 19 May 2016 18:11:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 44B991609AE for ; Thu, 19 May 2016 20:11:05 +0200 (CEST) Received: (qmail 35719 invoked by uid 500); 19 May 2016 18:11:04 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 35710 invoked by uid 99); 19 May 2016 18:11:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 May 2016 18:11:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 37A85DFC71; Thu, 19 May 2016 18:11:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pallavkul@apache.org To: commits@ambari.apache.org Message-Id: <7488c87639c04b058638ef5d13806424@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Thu, 19 May 2016 18:11:06 -0000 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 Authored: Thu May 19 23:39:41 2016 +0530 Committer: Pallav Kulshreshtha 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 @@ ${hadoop.version} + com.squareup.okhttp + okhttp + 2.4.0 + + junit junit test 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