You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by GitBox <gi...@apache.org> on 2019/03/18 07:18:10 UTC

[GitHub] [hive] maheshk114 commented on a change in pull request #569: HIVE-21446 : Hive Server going OOM during hive external table replications

maheshk114 commented on a change in pull request #569: HIVE-21446 : Hive Server going OOM during hive external table replications
URL: https://github.com/apache/hive/pull/569#discussion_r266315969
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/parse/repl/CopyUtils.java
 ##########
 @@ -72,33 +72,40 @@ public CopyUtils(String distCpDoAsUser, HiveConf hiveConf) {
   public void copyAndVerify(FileSystem destinationFs, Path destRoot,
                     List<ReplChangeManager.FileInfo> srcFiles) throws IOException, LoginException, HiveFatalException {
     Map<FileSystem, Map< Path, List<ReplChangeManager.FileInfo>>> map = fsToFileMap(srcFiles, destRoot);
-    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 (!destinationFs.exists(destination)
-                && !FileUtils.mkdir(destinationFs, destination, hiveConf)) {
-          LOG.error("Failed to create destination directory: " + destination);
-          throw new IOException("Destination directory creation failed");
-        }
+    UserGroupInformation proxyUser = getProxyUser();
+    try {
+      for (Map.Entry<FileSystem, Map<Path, List<ReplChangeManager.FileInfo>>> entry : map.entrySet()) {
+        FileSystem sourceFs = entry.getKey();
 
 Review comment:
   The hive retry logic is for very limited local functionality ..for all other places ..in case of file system error ..dlm will retry 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services