From dev-return-49167-archive-asf-public=cust-asf.ponee.io@phoenix.apache.org Wed Feb 7 01:57:36 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 1DDC5180657 for ; Wed, 7 Feb 2018 01:57:36 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0DCD5160C46; Wed, 7 Feb 2018 00:57:36 +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 53F0C160C45 for ; Wed, 7 Feb 2018 01:57:35 +0100 (CET) Received: (qmail 74085 invoked by uid 500); 7 Feb 2018 00:57:34 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 74064 invoked by uid 99); 7 Feb 2018 00:57:33 -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; Wed, 07 Feb 2018 00:57:33 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9EBA5E04FA; Wed, 7 Feb 2018 00:57:32 +0000 (UTC) From: aertoria To: dev@phoenix.apache.org Reply-To: dev@phoenix.apache.org References: In-Reply-To: Subject: [GitHub] phoenix pull request #292: PHOENIX-4231: Support restriction of remote UDF l... Content-Type: text/plain Message-Id: <20180207005732.9EBA5E04FA@git1-us-west.apache.org> Date: Wed, 7 Feb 2018 00:57:32 +0000 (UTC) Github user aertoria commented on a diff in the pull request: https://github.com/apache/phoenix/pull/292#discussion_r166491289 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixStatement.java --- @@ -907,10 +909,15 @@ public MutationState execute() throws SQLException { try { FileSystem fs = dynamicJarsDirPath.getFileSystem(conf); List jarPaths = getJarPaths(); - for (LiteralParseNode jarPath : jarPaths) { - File f = new File((String) jarPath.getValue()); - fs.copyFromLocalFile(new Path(f.getAbsolutePath()), new Path( - dynamicJarsDir + f.getName())); + for (LiteralParseNode jarPathNode : jarPaths) { + String jarPathName = (String) jarPathNode.getValue(); + File f = new File(jarPathName); + Path dynamicJarsDirPathWithJar = new Path(dynamicJarsDir + f.getName()); + // Copy the jar (can be local or on HDFS) to the hbase.dynamic.jars.dir directory. + // Note that this does not support HDFS URIs without scheme and authority. + Path jarPath = new Path(jarPathName); + FileUtil.copy(jarPath.getFileSystem(conf), jarPath, fs, dynamicJarsDirPathWithJar, --- End diff -- @apurtell Since @ChinmaySKulkarni will be absent for a while, I will be wrap up this patch for the team. do you know how is hbase.dynamic.jars.dir used differently than hbase.local.jars.dir ---