Actions
Feature #5603
closedProgress monitoring on directory copy/move
Start date:
12/02/2013
Due date:
% Done:
0%
Estimated time:
Description
Metric for progress monitoring is not available when copying directories.
(file.copy.progress applies to single file copy/move).
It would be good to have.
Updated by Schwarz Lionel over 11 years ago
- Status changed from New to Feedback
Hi Akos,
After a quick glance at the code, it seems it is already implemented. Can you send me your code that does dir copy and do not get file.copy.progress monitoring?
Lionel
Updated by Schwarz Lionel about 11 years ago
- Status changed from Feedback to Assigned
import org.ogf.saga.context.*; import org.ogf.saga.monitoring.*; import org.ogf.saga.namespace.*; import org.ogf.saga.session.*; import org.ogf.saga.task.*; import org.ogf.saga.url.*; import fr.in2p3.jsaga.impl.file.copy.AbstractCopyTask; public class CopyProgress { public static void main(String[] args) throws Exception { try { URL url = URLFactory.createURL("sftp://host/tmp/test1/"); // from dir URL target = URLFactory.createURL("sftp://host/tmp/test2/"); // to dir Session session = SessionFactory.createSession(false); Context ctx = ContextFactory.createContext("SSH"); ctx.setAttribute(Context.USERID, "xxxxx"); ctx.setAttribute(Context.USERPASS, "***"); ctx.setVectorAttribute("DataServiceAttributes", new String[]{"sftp.KnownHosts="}); session.addContext(ctx); NSEntry file = NSFactory.createNSEntry(session, url, Flags.NONE.getValue()); Task task = file.copy(TaskMode.TASK, target, Flags.OVERWRITE.getValue()); System.out.println("Available metrics:"); for (String metric: task.listMetrics()) System.out.println("- " + metric); // only task.state Metric metric = task.getMetric(AbstractCopyTask.FILE_COPY_PROGRESS); // fails } catch (Exception e) { e.printStackTrace(); } } }
Updated by Schwarz Lionel about 11 years ago
- Status changed from Assigned to Closed
Fixed and available in the next snapshot
Actions