You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sa...@apache.org on 2019/08/15 14:02:27 UTC
[hive] branch master updated: HIVE-22110: Initialize
ReplChangeManager before starting actual dump (Ashutosh Bapat,
reviewed by Sankar Hariappan)
This is an automated email from the ASF dual-hosted git repository.
sankarh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 28f2340 HIVE-22110: Initialize ReplChangeManager before starting actual dump (Ashutosh Bapat, reviewed by Sankar Hariappan)
28f2340 is described below
commit 28f23408777a3ffd3a730aabf9c187fe596b22cb
Author: Ashutosh Bapat <ab...@cloudera.com>
AuthorDate: Thu Aug 15 19:31:43 2019 +0530
HIVE-22110: Initialize ReplChangeManager before starting actual dump (Ashutosh Bapat, reviewed by Sankar Hariappan)
Signed-off-by: Sankar Hariappan <sa...@apache.org>
---
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java | 3 +++
.../apache/hadoop/hive/ql/parse/repl/dump/io/FunctionSerializer.java | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
index 4cd60cc..1c1bd9a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java
@@ -25,6 +25,7 @@ import org.apache.hadoop.hive.common.ValidTxnList;
import org.apache.hadoop.hive.common.ValidWriteIdList;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.ReplChangeManager;
import org.apache.hadoop.hive.metastore.TableType;
import org.apache.hadoop.hive.metastore.api.Database;
import org.apache.hadoop.hive.metastore.api.Function;
@@ -121,6 +122,8 @@ public class ReplDumpTask extends Task<ReplDumpWork> implements Serializable {
Hive hiveDb = getHive();
Path dumpRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLDIR), getNextDumpDir());
DumpMetaData dmd = new DumpMetaData(dumpRoot, conf);
+ // Initialize ReplChangeManager instance since we will require it to encode file URI.
+ ReplChangeManager.getInstance(conf);
Path cmRoot = new Path(conf.getVar(HiveConf.ConfVars.REPLCMDIR));
Long lastReplId;
if (work.isBootStrapDump()) {
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FunctionSerializer.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FunctionSerializer.java
index 576eb06..420c9bf 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FunctionSerializer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/repl/dump/io/FunctionSerializer.java
@@ -57,8 +57,6 @@ public class FunctionSerializer implements JsonWriter.Serializer {
if ("hdfs".equals(inputPath.toUri().getScheme())) {
FileSystem fileSystem = inputPath.getFileSystem(hiveConf);
Path qualifiedUri = PathBuilder.fullyQualifiedHDFSUri(inputPath, fileSystem);
- // Initialize ReplChangeManager instance since we will require it to encode file URI.
- ReplChangeManager.getInstance(hiveConf);
String checkSum = ReplChangeManager.checksumFor(qualifiedUri, fileSystem);
String newFileUri = ReplChangeManager.encodeFileUri(qualifiedUri.toString(), checkSum, null);
resourceUris.add(new ResourceUri(uri.getResourceType(), newFileUri));