Search in sources :

Example 1 with VisorIgfs

use of org.apache.ignite.internal.visor.igfs.VisorIgfs in project ignite by apache.

the class VisorNodeDataCollectorJob method igfs.

/**
 * Collect IGFSs.
 *
 * @param res Job result.
 */
protected void igfs(VisorNodeDataCollectorJobResult res) {
    try {
        IgfsProcessorAdapter igfsProc = ignite.context().igfs();
        for (IgniteFileSystem igfs : igfsProc.igfss()) {
            long start0 = U.currentTimeMillis();
            FileSystemConfiguration igfsCfg = igfs.configuration();
            if (proxyCache(igfsCfg.getDataCacheConfiguration().getName()) || proxyCache(igfsCfg.getMetaCacheConfiguration().getName()))
                continue;
            try {
                Collection<IpcServerEndpoint> endPoints = igfsProc.endpoints(igfs.name());
                if (endPoints != null) {
                    for (IpcServerEndpoint ep : endPoints) if (ep.isManagement())
                        res.getIgfsEndpoints().add(new VisorIgfsEndpoint(igfs.name(), ignite.name(), ep.getHost(), ep.getPort()));
                }
                res.getIgfss().add(new VisorIgfs(igfs));
            } finally {
                if (debug)
                    log(ignite.log(), "Collected IGFS: " + igfs.name(), getClass(), start0);
            }
        }
    } catch (Exception e) {
        res.setIgfssEx(new VisorExceptionWrapper(e));
    }
}
Also used : IgfsProcessorAdapter(org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter) IpcServerEndpoint(org.apache.ignite.internal.util.ipc.IpcServerEndpoint) VisorIgfsEndpoint(org.apache.ignite.internal.visor.igfs.VisorIgfsEndpoint) VisorIgfs(org.apache.ignite.internal.visor.igfs.VisorIgfs) IgniteFileSystem(org.apache.ignite.IgniteFileSystem) VisorExceptionWrapper(org.apache.ignite.internal.visor.util.VisorExceptionWrapper) FileSystemConfiguration(org.apache.ignite.configuration.FileSystemConfiguration)

Aggregations

IgniteFileSystem (org.apache.ignite.IgniteFileSystem)1 FileSystemConfiguration (org.apache.ignite.configuration.FileSystemConfiguration)1 IgfsProcessorAdapter (org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter)1 IpcServerEndpoint (org.apache.ignite.internal.util.ipc.IpcServerEndpoint)1 VisorIgfs (org.apache.ignite.internal.visor.igfs.VisorIgfs)1 VisorIgfsEndpoint (org.apache.ignite.internal.visor.igfs.VisorIgfsEndpoint)1 VisorExceptionWrapper (org.apache.ignite.internal.visor.util.VisorExceptionWrapper)1