/** Collect GGFS. */ private void ggfs(VisorDataCollectorJobResult res) { try { GridGgfsProcessorAdapter ggfsProc = ((GridKernal)g).context().ggfs(); for (GridGgfs ggfs : ggfsProc.ggfss()) { long start0 = U.currentTimeMillis(); try { Collection<GridIpcServerEndpoint> endPoints = ggfsProc.endpoints(ggfs.name()); if (endPoints != null) { for (GridIpcServerEndpoint ep : endPoints) if (ep.isManagement()) res.ggfsEndpoints.add(new VisorGgfsEndpoint(ggfs.name(), g.name(), ep.getHost(), ep.getPort())); } res.ggfss.add(VisorGgfs.from(ggfs)); } finally { if (debug) log(g.log(), "Collected GGFS: " + ggfs.name(), getClass(), start0); } } } catch(Throwable ggfssEx) { res.ggfssEx = ggfssEx; } }
/** * @param ggfs Source GGFS. * @return Data transfer object for given GGFS. * @throws GridException */ public static VisorGgfs from(GridGgfs ggfs) throws GridException { assert ggfs != null; return new VisorGgfs( ggfs.name(), ggfs.configuration().getDefaultMode(), VisorGgfsMetrics.from(ggfs.metrics()), ggfs.configuration().getSecondaryFileSystem() != null ); }
GridComputeJob jobImpl = ggfsProc.createJob(job, ggfs.name(), file.path(), loc.start(), loc.length(), args.recordResolver());