hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Work logged] (HIVE-21446) Hive Server going OOM during hive external table replications
Date Tue, 19 Mar 2019 08:18:00 GMT


ASF GitHub Bot logged work on HIVE-21446:

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 08:17
            Start Date: 19/Mar/19 08:17
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on pull request #569: HIVE-21446 : Hive Server going
OOM during hive external table replications

 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/
 @@ -57,30 +57,37 @@
   private final long maxNumberOfFiles;
   private final boolean hiveInTest;
   private final String copyAsUser;
+  private FileSystem destinationFs;
-  public CopyUtils(String distCpDoAsUser, HiveConf hiveConf) {
+  public CopyUtils(String distCpDoAsUser, HiveConf hiveConf, FileSystem destinationFs) {
     this.hiveConf = hiveConf;
     maxNumberOfFiles = hiveConf.getLongVar(HiveConf.ConfVars.HIVE_EXEC_COPYFILE_MAXNUMFILES);
     maxCopyFileSize = hiveConf.getLongVar(HiveConf.ConfVars.HIVE_EXEC_COPYFILE_MAXSIZE);
     hiveInTest = hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST);
     this.copyAsUser = distCpDoAsUser;
+    this.destinationFs = destinationFs;
   // Used by replication, copy files from source to destination. It is possible source file
   // changed/removed during copy, so double check the checksum after copy,
   // if not match, copy again from cm
-  public void copyAndVerify(FileSystem destinationFs, Path destRoot,
+  public void copyAndVerify(Path destRoot,
                     List<ReplChangeManager.FileInfo> srcFiles) throws IOException,
LoginException, HiveFatalException {
     Map<FileSystem, Map< Path, List<ReplChangeManager.FileInfo>>> map =
fsToFileMap(srcFiles, destRoot);
     UserGroupInformation proxyUser = getProxyUser();
     try {
       for (Map.Entry<FileSystem, Map<Path, List<ReplChangeManager.FileInfo>>>
entry : map.entrySet()) {
-        FileSystem sourceFs = entry.getKey();
         Map<Path, List<ReplChangeManager.FileInfo>> destMap = entry.getValue();
         for (Map.Entry<Path, List<ReplChangeManager.FileInfo>> destMapEntry :
destMap.entrySet()) {
           Path destination = destMapEntry.getKey();
           List<ReplChangeManager.FileInfo> fileInfoList = destMapEntry.getValue();
-          boolean useRegularCopy = regularCopy(destinationFs, sourceFs, fileInfoList);
+          if (fileInfoList.isEmpty()) {
 Review comment:
   I think, handling this case is redundant if it doesn't exist today and it is dead code.
Also, assert is the best way to represent such assumptions. I think, this is just a copy utility
class which is expected to copy the list of source files to target directory. If at all any
filtering to be done, it should be done before we make this map. 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 215305)
    Time Spent: 2.5h  (was: 2h 20m)

> Hive Server going OOM during hive external table replications
> -------------------------------------------------------------
>                 Key: HIVE-21446
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: repl
>    Affects Versions: 4.0.0
>            Reporter: mahesh kumar behera
>            Assignee: mahesh kumar behera
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>         Attachments: HIVE-21446.01.patch, HIVE-21446.02.patch
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
> The file system objects opened using proxy users are not closed.

This message was sent by Atlassian JIRA

View raw message