You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/12/18 22:11:02 UTC

[GitHub] milleruntime commented on a change in pull request #837: fixes #800 avoid importing files for completed bulk transactions

milleruntime commented on a change in pull request #837: fixes #800 avoid importing files for completed bulk transactions
URL: https://github.com/apache/accumulo/pull/837#discussion_r242723766
 
 

 ##########
 File path: server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
 ##########
 @@ -460,42 +461,54 @@ private static long jitter(long ms) {
     }
 
     @Override
-    public List<TKeyExtent> bulkImport(TInfo tinfo, TCredentials credentials, long tid,
-        Map<TKeyExtent,Map<String,MapFileInfo>> files, boolean setTime)
+    public List<TKeyExtent> bulkImport(TInfo tinfo, TCredentials credentials, final long tid,
+        final Map<TKeyExtent,Map<String,MapFileInfo>> files, final boolean setTime)
         throws ThriftSecurityException {
 
       if (!security.canPerformSystemActions(credentials))
         throw new ThriftSecurityException(credentials.getPrincipal(),
             SecurityErrorCode.PERMISSION_DENIED);
 
-      List<TKeyExtent> failures = new ArrayList<>();
+      try {
+        return watcher.run(Constants.BULK_ARBITRATOR_TYPE, tid, new Callable<List<TKeyExtent>>() {
 
-      for (Entry<TKeyExtent,Map<String,MapFileInfo>> entry : files.entrySet()) {
-        TKeyExtent tke = entry.getKey();
-        Map<String,MapFileInfo> fileMap = entry.getValue();
-        Map<FileRef,MapFileInfo> fileRefMap = new HashMap<>();
-        for (Entry<String,MapFileInfo> mapping : fileMap.entrySet()) {
-          Path path = new Path(mapping.getKey());
-          FileSystem ns = fs.getVolumeByPath(path).getFileSystem();
-          path = ns.makeQualified(path);
-          fileRefMap.put(new FileRef(path.toString(), path), mapping.getValue());
-        }
+          @Override
+          public List<TKeyExtent> call() throws Exception {
 
 Review comment:
   Was moving the Arbitrator thread here the fix?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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