Repository: hive Updated Branches: refs/heads/branch-3 af4c396e8 -> 2582ec6d4
HIVE-19054: Function replication shall use "hive.repl.replica.functions.root.dir" as root (Daniel Dai, reviewed by Thejas Nair) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/2582ec6d Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/2582ec6d Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/2582ec6d Branch: refs/heads/branch-3 Commit: 2582ec6d45abdc22af09bb15696112cd9b7d629c Parents: af4c396 Author: Daniel Dai <dai...@gmail.com> Authored: Sun Apr 29 11:32:39 2018 -0700 Committer: Daniel Dai <dai...@gmail.com> Committed: Sun Apr 29 11:32:39 2018 -0700 ---------------------------------------------------------------------- .../hive/ql/parse/repl/load/message/CreateFunctionHandler.java | 2 +- .../repl/load/message/TestPrimaryToReplicaResourceFunction.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/2582ec6d/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/CreateFunctionHandler.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/CreateFunctionHandler.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/CreateFunctionHandler.java index f7c9040..a3331b4 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/CreateFunctionHandler.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/message/CreateFunctionHandler.java @@ -190,7 +190,7 @@ public class CreateFunctionHandler extends AbstractMessageHandler { .addDescendant(String.valueOf(System.nanoTime())) .addDescendant(ReplChangeManager.getFileWithChksumFromURI(split[split.length - 1])[0]) .build(), - FileSystem.get(context.hiveConf) + new Path(functionsRootDir).getFileSystem(context.hiveConf) ); Task<?> copyTask = ReplCopyTask.getLoadCopyTask( http://git-wip-us.apache.org/repos/asf/hive/blob/2582ec6d/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/load/message/TestPrimaryToReplicaResourceFunction.java ---------------------------------------------------------------------- diff --git a/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/load/message/TestPrimaryToReplicaResourceFunction.java b/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/load/message/TestPrimaryToReplicaResourceFunction.java index 49620f9..7b6c3e7 100644 --- a/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/load/message/TestPrimaryToReplicaResourceFunction.java +++ b/ql/src/test/org/apache/hadoop/hive/ql/parse/repl/load/message/TestPrimaryToReplicaResourceFunction.java @@ -83,6 +83,7 @@ public class TestPrimaryToReplicaResourceFunction { public void createDestinationPath() throws IOException, SemanticException, URISyntaxException { mockStatic(FileSystem.class); when(FileSystem.get(any(Configuration.class))).thenReturn(mockFs); + when(FileSystem.get(any(URI.class), any(Configuration.class))).thenReturn(mockFs); when(mockFs.getScheme()).thenReturn("hdfs"); when(mockFs.getUri()).thenReturn(new URI("hdfs", "somehost:9000", null, null, null)); mockStatic(System.class);