[ 
https://issues.apache.org/jira/browse/HIVE-21446?focusedWorklogId=215223&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-215223
 ]

ASF GitHub Bot logged work on HIVE-21446:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 04:24
            Start Date: 19/Mar/19 04:24
    Worklog Time Spent: 10m 
      Work Description: sankarh commented on pull request #569: HIVE-21446 : 
Hive Server going OOM during hive external table replications
URL: https://github.com/apache/hive/pull/569#discussion_r266726914
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/CopyUtils.java
 ##########
 @@ -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 is
   // 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:
   In what scenario, fileInfoList can be empty?
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 215223)
    Time Spent: 1h 50m  (was: 1h 40m)

> Hive Server going OOM during hive external table replications
> -------------------------------------------------------------
>
>                 Key: HIVE-21446
>                 URL: https://issues.apache.org/jira/browse/HIVE-21446
>             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: 1h 50m
>  Remaining Estimate: 0h
>
> The file system objects opened using proxy users are not closed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to