@Override public IgfsHandshakeResponse apply() { igfs.clientLogDirectory(logDir); return new IgfsHandshakeResponse(igfs.name(), igfs.groupBlockSize(), igfs.globalSampling()); } });
/** {@inheritDoc} */ @Override protected Void run(VisorIgfsSamplingStateTaskArg arg) { try { ((IgfsEx)ignite.fileSystem(arg.getName())).globalSampling(arg.isEnabled()); return null; } catch (IllegalArgumentException iae) { throw new IgniteException("Failed to set sampling state for IGFS: " + arg.getName(), iae); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
igfs.globalSampling(true); igfs.globalSampling(null); igfs.globalSampling(false); igfs.globalSampling(null); igfs.globalSampling(true); igfs.globalSampling(false); igfs.globalSampling(true);
/** * Processes handshake request. * * @param req Handshake request. * @return Response message. * @throws IgniteCheckedException In case of handshake failure. */ private IgfsMessage processHandshakeRequest(IgfsHandshakeRequest req) throws IgniteCheckedException { if (req.igfsName() != null && !F.eq(igfs.name(), req.igfsName())) throw new IgniteCheckedException("Failed to perform handshake because existing IGFS name " + "differs from requested [requested=" + req.igfsName() + ", existing=" + igfs.name() + ']'); IgfsControlResponse res = new IgfsControlResponse(); igfs.clientLogDirectory(req.logDirectory()); IgfsHandshakeResponse handshake = new IgfsHandshakeResponse(igfs.name(), igfs.groupBlockSize(), igfs.globalSampling()); res.handshake(handshake); return res; }
igfs.globalSampling(sampling);
/** {@inheritDoc} */ @Override protected Void run(VisorIgfsSamplingStateTaskArg arg) { try { ((IgfsEx)ignite.fileSystem(arg.getName())).globalSampling(arg.isEnabled()); return null; } catch (IllegalArgumentException iae) { throw new IgniteException("Failed to set sampling state for IGFS: " + arg.getName(), iae); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** * Processes handshake request. * * @param req Handshake request. * @return Response message. * @throws IgniteCheckedException In case of handshake failure. */ private IgfsMessage processHandshakeRequest(IgfsHandshakeRequest req) throws IgniteCheckedException { if (req.igfsName() != null && !F.eq(igfs.name(), req.igfsName())) throw new IgniteCheckedException("Failed to perform handshake because existing IGFS name " + "differs from requested [requested=" + req.igfsName() + ", existing=" + igfs.name() + ']'); IgfsControlResponse res = new IgfsControlResponse(); igfs.clientLogDirectory(req.logDirectory()); IgfsHandshakeResponse handshake = new IgfsHandshakeResponse(igfs.name(), igfs.groupBlockSize(), igfs.globalSampling()); res.handshake(handshake); return res; }