ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [4/8] ignite git commit: GG-11732 Merged with master.
Date Thu, 06 Apr 2017 08:01:24 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTaskArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTaskArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTaskArg.java
new file mode 100644
index 0000000..3953b5f
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTaskArg.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.igfs;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Argument for task returns changing of sampling state result.
+ */
+public class VisorIgfsSamplingStateTaskArg extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** IGFS name. */
+    private String name;
+
+    /** {@code True} to turn on sampling, {@code false} to turn it off, {@code null} to clear sampling state. */
+    private boolean enabled;
+
+    /**
+     * Default constructor.
+     */
+    public VisorIgfsSamplingStateTaskArg() {
+        // No-op.
+    }
+
+    /**
+     * @param name IGFS name.
+     * @param enabled {@code True} to turn on sampling, {@code false} to turn it off, {@code null} to clear sampling state.
+     */
+    public VisorIgfsSamplingStateTaskArg(String name, boolean enabled) {
+        this.name = name;
+        this.enabled = enabled;
+    }
+
+    /**
+     * @return IGFS name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @return {@code True} to turn on sampling, {@code false} to turn it off, {@code null} to clear sampling state.
+     */
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, name);
+        out.writeBoolean(enabled);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        name = U.readString(in);
+        enabled = in.readBoolean();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorIgfsSamplingStateTaskArg.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogFile.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogFile.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogFile.java
index 211a171..2f4a139 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogFile.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogFile.java
@@ -18,24 +18,35 @@
 package org.apache.ignite.internal.visor.log;
 
 import java.io.File;
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Visor log file.
  */
-public class VisorLogFile implements Serializable {
+public class VisorLogFile extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** File path. */
-    private final String path;
+    private String path;
 
     /** File size. */
-    private final long size;
+    private long size;
 
     /** File last modified timestamp. */
-    private final long lastModified;
+    private long lastModified;
+
+    /**
+     * Default constructor.
+     */
+    public VisorLogFile() {
+        // No-op.
+    }
 
     /**
      * Create log file for given file.
@@ -62,26 +73,40 @@ public class VisorLogFile implements Serializable {
     /**
      * @return File path.
      */
-    public String path() {
+    public String getPath() {
         return path;
     }
 
     /**
      * @return File size.
      */
-    public long size() {
+    public long getSize() {
         return size;
     }
 
     /**
      * @return File last modified timestamp.
      */
-    public long lastModified() {
+    public long getLastModified() {
         return lastModified;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, path);
+        out.writeLong(size);
+        out.writeLong(lastModified);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        path = U.readString(in);
+        size = in.readLong();
+        lastModified = in.readLong();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorLogFile.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchArg.java
new file mode 100644
index 0000000..e1b1193
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchArg.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.log;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Arguments for {@link VisorLogSearchTask}.
+ */
+@SuppressWarnings("PublicInnerClass")
+public class VisorLogSearchArg extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Searched string. */
+    private String searchStr;
+
+    /** Folder. */
+    private String folder;
+
+    /** File name search pattern. */
+    private String filePtrn;
+
+    /** Max number of results. */
+    private int limit;
+
+    /**
+     * Default constructor.
+     */
+    public VisorLogSearchArg() {
+        // No-op.
+    }
+
+    /**
+     * @param searchStr Searched string.
+     * @param folder Folder.
+     * @param filePtrn File name search pattern.
+     * @param limit Max number of results.
+     */
+    public VisorLogSearchArg(String searchStr, String folder, String filePtrn, int limit) {
+        this.searchStr = searchStr;
+        this.folder = folder;
+        this.filePtrn = filePtrn;
+        this.limit = limit;
+    }
+
+    /**
+     * @return Searched string.
+     */
+    public String getSearchString() {
+        return searchStr;
+    }
+
+    /**
+     * @return Folder.
+     */
+    public String getFolder() {
+        return folder;
+    }
+
+    /**
+     * @return File name search pattern.
+     */
+    public String getFilePattern() {
+        return filePtrn;
+    }
+
+    /**
+     * @return Max number of results.
+     */
+    public int getLimit() {
+        return limit;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, searchStr);
+        U.writeString(out, folder);
+        U.writeString(out, filePtrn);
+        out.writeInt(limit);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        searchStr = U.readString(in);
+        folder = U.readString(in);
+        filePtrn = U.readString(in);
+        limit = in.readInt();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorLogSearchArg.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java
index 35ace13..bb1a8fe 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchResult.java
@@ -17,42 +17,54 @@
 
 package org.apache.ignite.internal.visor.log;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.Arrays;
+import java.util.List;
 import java.util.UUID;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Result for log search operation.
  * Contains found line and several lines before and after, plus other info.
  */
-public class VisorLogSearchResult implements Serializable, LessNamingBean {
+public class VisorLogSearchResult extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** Node ID. */
-    private final UUID nid;
+    private UUID nid;
 
     /** File path relative to the search folder. */
-    private final String filePath;
+    private String filePath;
 
     /** File size. */
-    private final long fileSize;
+    private long fileSize;
 
     /** Timestamp of last modification of the file. */
-    private final long lastModified;
+    private long lastModified;
 
     /** Lines of text including found line and several lines before and after. */
-    private final String[] lines;
+    private List<String> lines;
 
     /** Line number in the file, 1 based. */
-    private final int lineNum;
+    private int lineNum;
 
     /** Lines count in the file. */
-    private final int lineCnt;
+    private int lineCnt;
 
     /** File content encoding. */
-    private final String encoding;
+    private String encoding;
+
+    /**
+     * Default constructor.
+     */
+    public VisorLogSearchResult() {
+        // No-op.
+    }
 
     /**
      * Create log search result with given parameters.
@@ -80,7 +92,7 @@ public class VisorLogSearchResult implements Serializable, LessNamingBean {
         this.filePath = filePath;
         this.fileSize = fileSize;
         this.lastModified = lastModified;
-        this.lines = lines;
+        this.lines = Arrays.asList(lines);
         this.lineNum = lineNum;
         this.lineCnt = lineCnt;
         this.encoding = encoding;
@@ -89,64 +101,88 @@ public class VisorLogSearchResult implements Serializable, LessNamingBean {
     /**
      * @return Node ID.
      */
-    public UUID nid() {
+    public UUID getNid() {
         return nid;
     }
 
     /**
      * @return File path relative to the search folder.
      */
-    public String filePath() {
+    public String getFilePath() {
         return filePath;
     }
 
     /**
      * @return File size.
      */
-    public long fileSize() {
+    public long getFileSize() {
         return fileSize;
     }
 
     /**
      * @return Timestamp of last modification of the file.
      */
-    public long lastModified() {
+    public long getLastModified() {
         return lastModified;
     }
 
     /**
      * @return Lines of text including found line and several lines before and after.
      */
-    public String[] lines() {
+    public List<String> getLines() {
         return lines;
     }
 
     /**
      * @return Line number in the file, 1 based.
      */
-    public int lineNumber() {
+    public int getLineNumber() {
         return lineNum;
     }
 
     /**
      * @return Lines count in the file.
      */
-    public int lineCount() {
+    public int getLineCount() {
         return lineCnt;
     }
 
     /**
      * @return File content encoding.
      */
-    public String encoding() {
+    public String getEncoding() {
         return encoding;
     }
 
     /**
      * @return Found line.
      */
-    public String line() {
-        return lines[lines.length / 2];
+    public String getLine() {
+        return lines.get(lines.size() / 2);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeUuid(out, nid);
+        U.writeString(out, filePath);
+        out.writeLong(fileSize);
+        out.writeLong(lastModified);
+        U.writeCollection(out, lines);
+        out.writeInt(lineNum);
+        out.writeInt(lineCnt);
+        U.writeString(out, encoding);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        nid = U.readUuid(in);
+        filePath = U.readString(in);
+        fileSize = in.readLong();
+        lastModified = in.readLong();
+        lines = U.readList(in);
+        lineNum = in.readInt();
+        lineCnt = in.readInt();
+        encoding = U.readString(in);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
index b6552b2..b8a7184 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTask.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.visor.log;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
-import java.io.Serializable;
 import java.net.URL;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
@@ -28,6 +27,7 @@ import java.util.Collection;
 import java.util.Deque;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.Map;
 import java.util.UUID;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.compute.ComputeJobResult;
@@ -38,7 +38,6 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.internal.visor.VisorJob;
 import org.apache.ignite.internal.visor.VisorMultiNodeTask;
-import org.apache.ignite.lang.IgniteBiTuple;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.decode;
@@ -49,8 +48,8 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.textFile;
  * Search text matching in logs
  */
 @GridInternal
-public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.VisorLogSearchArg,
-    IgniteBiTuple<Iterable<IgniteBiTuple<Exception, UUID>>, Iterable<VisorLogSearchResult>>,
+public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchArg,
+    VisorLogSearchTaskResult,
     Collection<VisorLogSearchResult>> {
     /** */
     private static final long serialVersionUID = 0L;
@@ -67,15 +66,14 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override protected IgniteBiTuple<Iterable<IgniteBiTuple<Exception, UUID>>,
-        Iterable<VisorLogSearchResult>> reduce0(List<ComputeJobResult> results) {
+    @Nullable @Override protected VisorLogSearchTaskResult reduce0(List<ComputeJobResult> results) {
         Collection<VisorLogSearchResult> searchRes = new ArrayList<>();
-        Collection<IgniteBiTuple<Exception, UUID>> exRes = new ArrayList<>();
+        Map<Exception, UUID> exRes = U.newHashMap(0);
 
         // Separate successfully executed results and exceptions.
         for (ComputeJobResult result : results) {
             if (result.getException() != null)
-                exRes.add(new IgniteBiTuple<Exception, UUID>(result.getException(), result.getNode().id()));
+                exRes.put(result.getException(), result.getNode().id());
             else if (result.getData() != null) {
                 Collection<VisorLogSearchResult> data = result.getData();
 
@@ -83,47 +81,7 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
             }
         }
 
-        return new IgniteBiTuple<Iterable<IgniteBiTuple<Exception, UUID>>, Iterable<VisorLogSearchResult>>
-            (exRes.isEmpty() ? null : exRes, searchRes.isEmpty() ? null : searchRes);
-    }
-
-    /**
-     * Arguments for {@link VisorLogSearchTask}.
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class VisorLogSearchArg implements Serializable {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /** Searched string. */
-        private final String searchStr;
-
-        /** Folder. */
-        private final String folder;
-
-        /** File name search pattern. */
-        private final String filePtrn;
-
-        /** Max number of results. */
-        private final int limit;
-
-        /**
-         * @param searchStr Searched string.
-         * @param folder Folder.
-         * @param filePtrn File name search pattern.
-         * @param limit Max number of results.
-         */
-        public VisorLogSearchArg(String searchStr, String folder, String filePtrn, int limit) {
-            this.searchStr = searchStr;
-            this.folder = folder;
-            this.filePtrn = filePtrn;
-            this.limit = limit;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorLogSearchArg.class, this);
-        }
+        return new VisorLogSearchTaskResult(exRes.isEmpty() ? null : exRes, searchRes.isEmpty() ? null : searchRes);
     }
 
     /**
@@ -216,15 +174,15 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
 
         /** {@inheritDoc} */
         @Override protected Collection<VisorLogSearchResult> run(VisorLogSearchArg arg) {
-            URL url = U.resolveIgniteUrl(arg.folder);
+            URL url = U.resolveIgniteUrl(arg.getFolder());
 
             if (url == null)
-                throw new IgniteException(new FileNotFoundException("Log folder not found: " + arg.folder));
+                throw new IgniteException(new FileNotFoundException("Log folder not found: " + arg.getFolder()));
 
             UUID uuid = ignite.localNode().id();
             String nid = uuid.toString().toLowerCase();
 
-            String filePtrn = arg.filePtrn.replace("@nid8", nid.substring(0, 8)).replace("@nid", nid);
+            String filePtrn = arg.getFilePattern().replace("@nid8", nid.substring(0, 8)).replace("@nid", nid);
 
             try {
                 File fld = new File(url.toURI());
@@ -232,22 +190,22 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
 
                 List<VisorLogFile> matchingFiles = matchedFiles(fld, filePtrn);
 
-                Collection<VisorLogSearchResult> results = new ArrayList<>(arg.limit);
+                Collection<VisorLogSearchResult> results = new ArrayList<>(arg.getLimit());
 
                 int resCnt = 0;
 
                 for (VisorLogFile logFile : matchingFiles) {
                     try {
-                        File f = new File(logFile.path());
+                        File f = new File(logFile.getPath());
 
                         if (textFile(f, false)) {
                             Charset charset = decode(f);
 
-                            if (resCnt == arg.limit)
+                            if (resCnt == arg.getLimit())
                                 break;
 
                             List<GridTuple3<String[], Integer, Integer>> searched =
-                                searchInFile(f, charset, arg.searchStr, arg.limit - resCnt);
+                                searchInFile(f, charset, arg.getSearchString(), arg.getLimit() - resCnt);
 
                             resCnt += searched.size();
 
@@ -276,4 +234,4 @@ public class VisorLogSearchTask extends VisorMultiNodeTask<VisorLogSearchTask.Vi
             return S.toString(VisorLogSearchJob.class, this);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTaskResult.java
new file mode 100644
index 0000000..65f0f62
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/log/VisorLogSearchTaskResult.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.log;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.Collection;
+import java.util.Map;
+import java.util.UUID;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Result for log search operation.
+ * Contains found line and several lines before and after, plus other info.
+ */
+public class VisorLogSearchTaskResult extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** List of exceptions by node ID. */
+    private Map<Exception, UUID> exceptions;
+
+    /** List of log search results. */
+    private Collection<VisorLogSearchResult> results;
+
+    /**
+     * Default constructor.
+     */
+    public VisorLogSearchTaskResult() {
+        // No-op.
+    }
+
+    /**
+     * Create log search result with given parameters.
+     *
+     * @param exceptions List of exceptions by node ID.
+     * @param results List of log search results.
+     */
+    public VisorLogSearchTaskResult(Map<Exception, UUID> exceptions, Collection<VisorLogSearchResult> results) {
+        this.exceptions = exceptions;
+        this.results = results;
+    }
+
+    /**
+     * @return List of exceptions by node ID.
+     */
+    public Map<Exception, UUID> getExceptions() {
+        return exceptions;
+    }
+
+    /**
+     * @return List of log search results.
+     */
+    public Collection<VisorLogSearchResult> getResults() {
+        return results;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeMap(out, exceptions);
+        U.writeCollection(out, results);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        exceptions = U.readMap(in);
+        results = U.readCollection(in);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorLogSearchTaskResult.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java
index a6d8c4c..c233b67 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorAtomicConfiguration.java
@@ -17,16 +17,19 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.AtomicConfiguration;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Data transfer object for configuration of atomic data structures.
  */
-public class VisorAtomicConfiguration implements Serializable, LessNamingBean {
+public class VisorAtomicConfiguration extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -40,43 +43,59 @@ public class VisorAtomicConfiguration implements Serializable, LessNamingBean {
     private int backups;
 
     /**
+     * Default constructor.
+     */
+    public VisorAtomicConfiguration() {
+        // No-op.
+    }
+
+    /**
      * Create data transfer object for atomic configuration.
      *
      * @param src Atomic configuration.
-     * @return Data transfer object.
      */
-    public static VisorAtomicConfiguration from(AtomicConfiguration src) {
-        VisorAtomicConfiguration cfg = new VisorAtomicConfiguration();
-
-        cfg.seqReserveSize = src.getAtomicSequenceReserveSize();
-        cfg.cacheMode = src.getCacheMode();
-        cfg.backups = src.getBackups();
-
-        return cfg;
+    public VisorAtomicConfiguration(AtomicConfiguration src) {
+        seqReserveSize = src.getAtomicSequenceReserveSize();
+        cacheMode = src.getCacheMode();
+        backups = src.getBackups();
     }
 
     /**
      * @return Atomic sequence reservation size.
      */
-    public int atomicSequenceReserveSize() {
+    public int getAtomicSequenceReserveSize() {
         return seqReserveSize;
     }
 
     /**
      * @return Cache mode.
      */
-    public CacheMode cacheMode() {
+    public CacheMode getCacheMode() {
         return cacheMode;
     }
 
     /**
      * @return Number of backup nodes.
      */
-    public int backups() {
+    public int getBackups() {
         return backups;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeInt(seqReserveSize);
+        U.writeEnum(out, cacheMode);
+        out.writeInt(backups);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        seqReserveSize = in.readInt();
+        cacheMode = CacheMode.fromOrdinal(in.readByte());
+        backups = in.readInt();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorAtomicConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
index 0dae4da..3fde833 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorBasicConfiguration.java
@@ -17,12 +17,16 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.UUID;
+import org.apache.ignite.configuration.DeploymentMode;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 import org.jetbrains.annotations.Nullable;
 
 import static java.lang.System.getProperty;
@@ -38,17 +42,16 @@ import static org.apache.ignite.IgniteSystemProperties.IGNITE_SUCCESS_FILE;
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_UPDATE_NOTIFIER;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.boolValue;
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactClass;
-import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactObject;
 
 /**
  * Data transfer object for node basic configuration properties.
  */
-public class VisorBasicConfiguration implements Serializable, LessNamingBean {
+public class VisorBasicConfiguration extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
-    /** Ignite instance name. */
-    private String igniteInstanceName;
+    /** Grid name. */
+    private String gridName;
 
     /** IGNITE_HOME determined at startup. */
     private String ggHome;
@@ -63,7 +66,7 @@ public class VisorBasicConfiguration implements Serializable, LessNamingBean {
     private String marsh;
 
     /** Deployment Mode. */
-    private Object deployMode;
+    private DeploymentMode deployMode;
 
     /** Client mode flag. */
     private Boolean clientMode;
@@ -111,186 +114,240 @@ public class VisorBasicConfiguration implements Serializable, LessNamingBean {
     private boolean updateNtf;
 
     /**
+     * Default constructor.
+     */
+    public VisorBasicConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * Create data transfer object for node basic configuration properties.
+     *
      * @param ignite Grid.
      * @param c Grid configuration.
-     * @return Data transfer object for node basic configuration properties.
      */
-    public static VisorBasicConfiguration from(IgniteEx ignite, IgniteConfiguration c) {
-        VisorBasicConfiguration cfg = new VisorBasicConfiguration();
-
-        cfg.igniteInstanceName = c.getIgniteInstanceName();
-        cfg.ggHome = getProperty(IGNITE_HOME, c.getIgniteHome());
-        cfg.locHost = getProperty(IGNITE_LOCAL_HOST, c.getLocalHost());
-        cfg.nodeId = ignite.localNode().id();
-        cfg.marsh = compactClass(c.getMarshaller());
-        cfg.deployMode = compactObject(c.getDeploymentMode());
-        cfg.clientMode = c.isClientMode();
-        cfg.daemon = boolValue(IGNITE_DAEMON, c.isDaemon());
-        cfg.jmxRemote = ignite.isJmxRemoteEnabled();
-        cfg.restart = ignite.isRestartEnabled();
-        cfg.netTimeout = c.getNetworkTimeout();
-        cfg.log = compactClass(c.getGridLogger());
-        cfg.discoStartupDelay = c.getDiscoveryStartupDelay();
-        cfg.mBeanSrv = compactClass(c.getMBeanServer());
-        cfg.noAscii = boolValue(IGNITE_NO_ASCII, false);
-        cfg.noDiscoOrder = boolValue(IGNITE_NO_DISCO_ORDER, false);
-        cfg.noShutdownHook = boolValue(IGNITE_NO_SHUTDOWN_HOOK, false);
-        cfg.progName = getProperty(IGNITE_PROG_NAME);
-        cfg.quiet = boolValue(IGNITE_QUIET, true);
-        cfg.successFile = getProperty(IGNITE_SUCCESS_FILE);
-        cfg.updateNtf = boolValue(IGNITE_UPDATE_NOTIFIER, true);
-
-        return cfg;
+    public VisorBasicConfiguration(IgniteEx ignite, IgniteConfiguration c) {
+        gridName = c.getGridName();
+        ggHome = getProperty(IGNITE_HOME, c.getIgniteHome());
+        locHost = getProperty(IGNITE_LOCAL_HOST, c.getLocalHost());
+        nodeId = ignite.localNode().id();
+        marsh = compactClass(c.getMarshaller());
+        deployMode = c.getDeploymentMode();
+        clientMode = c.isClientMode();
+        daemon = boolValue(IGNITE_DAEMON, c.isDaemon());
+        jmxRemote = ignite.isJmxRemoteEnabled();
+        restart = ignite.isRestartEnabled();
+        netTimeout = c.getNetworkTimeout();
+        log = compactClass(c.getGridLogger());
+        discoStartupDelay = c.getDiscoveryStartupDelay();
+        mBeanSrv = compactClass(c.getMBeanServer());
+        noAscii = boolValue(IGNITE_NO_ASCII, false);
+        noDiscoOrder = boolValue(IGNITE_NO_DISCO_ORDER, false);
+        noShutdownHook = boolValue(IGNITE_NO_SHUTDOWN_HOOK, false);
+        progName = getProperty(IGNITE_PROG_NAME);
+        quiet = boolValue(IGNITE_QUIET, true);
+        successFile = getProperty(IGNITE_SUCCESS_FILE);
+        updateNtf = boolValue(IGNITE_UPDATE_NOTIFIER, true);
     }
 
     /**
-     * @return Ignite instance name.
+     * @return Grid name.
      */
-    @Nullable public String igniteInstanceName() {
-        return igniteInstanceName;
+    @Nullable public String getGridName() {
+        return gridName;
     }
 
     /**
      * @return IGNITE_HOME determined at startup.
      */
-    @Nullable public String ggHome() {
+    @Nullable public String getGgHome() {
         return ggHome;
     }
 
     /**
      * @return Local host value used.
      */
-    @Nullable public String localHost() {
+    @Nullable public String getLocalHost() {
         return locHost;
     }
 
     /**
      * @return Node id.
      */
-    public UUID nodeId() {
+    public UUID getNodeId() {
         return nodeId;
     }
 
     /**
      * @return Marshaller used.
      */
-    public String marshaller() {
+    public String getMarshaller() {
         return marsh;
     }
 
     /**
      * @return Deployment Mode.
      */
-    public Object deploymentMode() {
+    public Object getDeploymentMode() {
         return deployMode;
     }
 
     /**
      * @return Client mode flag.
      */
-    public Boolean clientMode() {
+    public Boolean isClientMode() {
         return clientMode;
     }
 
     /**
      * @return Whether this node daemon or not.
      */
-    public boolean daemon() {
+    public boolean isDaemon() {
         return daemon;
     }
 
     /**
      * @return Whether remote JMX is enabled.
      */
-    public boolean jmxRemote() {
+    public boolean isJmxRemote() {
         return jmxRemote;
     }
 
     /**
      * @return Is node restart enabled.
      */
-    public boolean restart() {
+    public boolean isRestart() {
         return restart;
     }
 
     /**
      * @return Network timeout.
      */
-    public long networkTimeout() {
+    public long getNetworkTimeout() {
         return netTimeout;
     }
 
     /**
      * @return Logger used on node.
      */
-    public String logger() {
+    public String getLogger() {
         return log;
     }
 
     /**
      * @return Discovery startup delay.
      */
-    public long discoStartupDelay() {
+    public long getDiscoStartupDelay() {
         return discoStartupDelay;
     }
 
     /**
      * @return MBean server name
      */
-    @Nullable public String mBeanServer() {
+    @Nullable public String getMBeanServer() {
         return mBeanSrv;
     }
 
     /**
      * @return Whether ASCII logo is disabled.
      */
-    public boolean noAscii() {
+    public boolean isNoAscii() {
         return noAscii;
     }
 
     /**
      * @return Whether no discovery order is allowed.
      */
-    public boolean noDiscoOrder() {
+    public boolean isNoDiscoOrder() {
         return noDiscoOrder;
     }
 
     /**
      * @return Whether shutdown hook is disabled.
      */
-    public boolean noShutdownHook() {
+    public boolean isNoShutdownHook() {
         return noShutdownHook;
     }
 
     /**
      * @return Name of command line program.
      */
-    public String programName() {
+    public String getProgramName() {
         return progName;
     }
 
     /**
      * @return Whether node is in quiet mode.
      */
-    public boolean quiet() {
+    public boolean isQuiet() {
         return quiet;
     }
 
     /**
      * @return Success file name.
      */
-    public String successFile() {
+    public String getSuccessFile() {
         return successFile;
     }
 
     /**
      * @return Whether update checker is enabled.
      */
-    public boolean updateNotifier() {
+    public boolean isUpdateNotifier() {
         return updateNtf;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, gridName);
+        U.writeString(out, ggHome);
+        U.writeString(out, locHost);
+        U.writeUuid(out, nodeId);
+        U.writeString(out, marsh);
+        U.writeEnum(out, deployMode);
+        out.writeObject(clientMode);
+        out.writeBoolean(daemon);
+        out.writeBoolean(jmxRemote);
+        out.writeBoolean(restart);
+        out.writeLong(netTimeout);
+        U.writeString(out, log);
+        out.writeLong(discoStartupDelay);
+        U.writeString(out, mBeanSrv);
+        out.writeBoolean(noAscii);
+        out.writeBoolean(noDiscoOrder);
+        out.writeBoolean(noShutdownHook);
+        U.writeString(out, progName);
+        out.writeBoolean(quiet);
+        U.writeString(out, successFile);
+        out.writeBoolean(updateNtf);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        gridName = U.readString(in);
+        ggHome = U.readString(in);
+        locHost = U.readString(in);
+        nodeId = U.readUuid(in);
+        marsh = U.readString(in);
+        deployMode = DeploymentMode.fromOrdinal(in.readByte());
+        clientMode = (Boolean)in.readObject();
+        daemon = in.readBoolean();
+        jmxRemote = in.readBoolean();
+        restart = in.readBoolean();
+        netTimeout = in.readLong();
+        log = U.readString(in);
+        discoStartupDelay = in.readLong();
+        mBeanSrv = U.readString(in);
+        noAscii = in.readBoolean();
+        noDiscoOrder = in.readBoolean();
+        noShutdownHook = in.readBoolean();
+        progName = U.readString(in);
+        quiet = in.readBoolean();
+        successFile = U.readString(in);
+        updateNtf = in.readBoolean();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorBasicConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
index df083f5..69a950b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorExecutorServiceConfiguration.java
@@ -17,16 +17,18 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.configuration.ConnectorConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Data transfer object for node executors configuration properties.
  */
-public class VisorExecutorServiceConfiguration implements Serializable, LessNamingBean {
+public class VisorExecutorServiceConfiguration extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -45,73 +47,110 @@ public class VisorExecutorServiceConfiguration implements Serializable, LessNami
     /** Peer-to-peer pool size. */
     private int p2pPoolSz;
 
+    /** Rebalance thread pool size. */
+    private int rebalanceThreadPoolSize;
+
     /** REST requests pool size. */
     private int restPoolSz;
 
     /**
-     * @param c Grid configuration.
-     * @return Data transfer object for node executors configuration properties.
+     * Default constructor.
      */
-    public static VisorExecutorServiceConfiguration from(IgniteConfiguration c) {
-        VisorExecutorServiceConfiguration cfg = new VisorExecutorServiceConfiguration();
+    public VisorExecutorServiceConfiguration() {
+        // No-op.
+    }
 
-        cfg.pubPoolSize = c.getPublicThreadPoolSize();
-        cfg.sysPoolSz = c.getSystemThreadPoolSize();
-        cfg.mgmtPoolSize = c.getManagementThreadPoolSize();
-        cfg.p2pPoolSz = c.getPeerClassLoadingThreadPoolSize();
-        cfg.igfsPoolSize = c.getIgfsThreadPoolSize();
+    /**
+     * Create data transfer object for node executors configuration properties.
+     *
+     * @param c Grid configuration.
+     */
+    public VisorExecutorServiceConfiguration(IgniteConfiguration c) {
+        pubPoolSize = c.getPublicThreadPoolSize();
+        sysPoolSz = c.getSystemThreadPoolSize();
+        mgmtPoolSize = c.getManagementThreadPoolSize();
+        p2pPoolSz = c.getPeerClassLoadingThreadPoolSize();
+        igfsPoolSize = c.getIgfsThreadPoolSize();
+        rebalanceThreadPoolSize = c.getRebalanceThreadPoolSize();
 
         ConnectorConfiguration cc = c.getConnectorConfiguration();
 
         if (cc != null)
-            cfg.restPoolSz = cc.getThreadPoolSize();
-
-        return cfg;
+            restPoolSz = cc.getThreadPoolSize();
     }
 
     /**
      * @return Public pool size.
      */
-    public int publicThreadPoolSize() {
+    public int getPublicThreadPoolSize() {
         return pubPoolSize;
     }
 
     /**
      * @return System pool size.
      */
-    public int systemThreadPoolSize() {
+    public int getSystemThreadPoolSize() {
         return sysPoolSz;
     }
 
     /**
      * @return Management pool size.
      */
-    public int managementThreadPoolSize() {
+    public int getManagementThreadPoolSize() {
         return mgmtPoolSize;
     }
 
     /**
      * @return IGFS pool size.
      */
-    public int igfsThreadPoolSize() {
+    public int getIgfsThreadPoolSize() {
         return igfsPoolSize;
     }
 
     /**
      * @return Peer-to-peer pool size.
      */
-    public int peerClassLoadingThreadPoolSize() {
+    public int getPeerClassLoadingThreadPoolSize() {
         return p2pPoolSz;
     }
 
     /**
+     * @return Rebalance thread pool size.
+     */
+    public int getRebalanceThreadPoolSize() {
+        return rebalanceThreadPoolSize;
+    }
+
+    /**
      * @return REST requests pool size.
      */
-    public int restThreadPoolSize() {
+    public int getRestThreadPoolSize() {
         return restPoolSz;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeInt(pubPoolSize);
+        out.writeInt(sysPoolSz);
+        out.writeInt(mgmtPoolSize);
+        out.writeInt(igfsPoolSize);
+        out.writeInt(p2pPoolSz);
+        out.writeInt(rebalanceThreadPoolSize);
+        out.writeInt(restPoolSz);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        pubPoolSize = in.readInt();
+        sysPoolSz = in.readInt();
+        mgmtPoolSize = in.readInt();
+        igfsPoolSize = in.readInt();
+        p2pPoolSz = in.readInt();
+        rebalanceThreadPoolSize = in.readInt();
+        restPoolSz = in.readInt();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorExecutorServiceConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
index 913c450..b61fc3f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorGridConfiguration.java
@@ -17,22 +17,26 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Properties;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactArray;
 
 /**
  * Data transfer object for node configuration data.
  */
-public class VisorGridConfiguration implements Serializable, LessNamingBean {
+public class VisorGridConfiguration extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -70,7 +74,7 @@ public class VisorGridConfiguration implements Serializable, LessNamingBean {
     private Map<String, ?> userAttrs;
 
     /** Igfss. */
-    private Iterable<VisorIgfsConfiguration> igfss;
+    private Collection<VisorIgfsConfiguration> igfss;
 
     /** Environment. */
     private Map<String, String> env;
@@ -85,147 +89,193 @@ public class VisorGridConfiguration implements Serializable, LessNamingBean {
     private VisorTransactionConfiguration txCfg;
 
     /**
+     * Default constructor.
+     */
+    public VisorGridConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * Create data transfer object with node configuration data.
+     *
      * @param ignite Grid.
-     * @return Fill data transfer object with node configuration data.
      */
-    public VisorGridConfiguration from(IgniteEx ignite) {
+    public VisorGridConfiguration(IgniteEx ignite) {
         assert ignite != null;
 
         IgniteConfiguration c = ignite.configuration();
 
-        basic = VisorBasicConfiguration.from(ignite, c);
-        metrics = VisorMetricsConfiguration.from(c);
-        spis = VisorSpisConfiguration.from(c);
-        p2p = VisorPeerToPeerConfiguration.from(c);
-        lifecycle = VisorLifecycleConfiguration.from(c);
-        execSvc = VisorExecutorServiceConfiguration.from(c);
-        seg = VisorSegmentationConfiguration.from(c);
+        basic = new VisorBasicConfiguration(ignite, c);
+        metrics = new VisorMetricsConfiguration(c);
+        spis = new VisorSpisConfiguration(c);
+        p2p = new VisorPeerToPeerConfiguration(c);
+        lifecycle = new VisorLifecycleConfiguration(c);
+        execSvc = new VisorExecutorServiceConfiguration(c);
+        seg = new VisorSegmentationConfiguration(c);
         inclProps = compactArray(c.getIncludeProperties());
         inclEvtTypes = c.getIncludeEventTypes();
-        rest = VisorRestConfiguration.from(c);
+        rest = new VisorRestConfiguration(c);
         userAttrs = c.getUserAttributes();
         igfss = VisorIgfsConfiguration.list(c.getFileSystemConfiguration());
         env = new HashMap<>(System.getenv());
         sysProps = IgniteSystemProperties.snapshot();
-        atomic = VisorAtomicConfiguration.from(c.getAtomicConfiguration());
-        txCfg = VisorTransactionConfiguration.from(c.getTransactionConfiguration());
-
-        return this;
+        atomic = new VisorAtomicConfiguration(c.getAtomicConfiguration());
+        txCfg = new VisorTransactionConfiguration(c.getTransactionConfiguration());
     }
 
     /**
      * @return Basic.
      */
-    public VisorBasicConfiguration basic() {
+    public VisorBasicConfiguration getBasic() {
         return basic;
     }
 
     /**
      * @return Metrics.
      */
-    public VisorMetricsConfiguration metrics() {
+    public VisorMetricsConfiguration getMetrics() {
         return metrics;
     }
 
     /**
      * @return SPIs.
      */
-    public VisorSpisConfiguration spis() {
+    public VisorSpisConfiguration getSpis() {
         return spis;
     }
 
     /**
      * @return P2P.
      */
-    public VisorPeerToPeerConfiguration p2p() {
+    public VisorPeerToPeerConfiguration getP2p() {
         return p2p;
     }
 
     /**
      * @return Lifecycle.
      */
-    public VisorLifecycleConfiguration lifecycle() {
+    public VisorLifecycleConfiguration getLifecycle() {
         return lifecycle;
     }
 
     /**
      * @return Executors service configuration.
      */
-    public VisorExecutorServiceConfiguration executeService() {
+    public VisorExecutorServiceConfiguration getExecutorService() {
         return execSvc;
     }
 
     /**
      * @return Segmentation.
      */
-    public VisorSegmentationConfiguration segmentation() {
+    public VisorSegmentationConfiguration getSegmentation() {
         return seg;
     }
 
     /**
      * @return Include properties.
      */
-    public String includeProperties() {
+    public String getIncludeProperties() {
         return inclProps;
     }
 
     /**
      * @return Include events types.
      */
-    public int[] includeEventTypes() {
+    public int[] getIncludeEventTypes() {
         return inclEvtTypes;
     }
 
     /**
      * @return Rest.
      */
-    public VisorRestConfiguration rest() {
+    public VisorRestConfiguration getRest() {
         return rest;
     }
 
     /**
      * @return User attributes.
      */
-    public Map<String, ?> userAttributes() {
+    public Map<String, ?> getUserAttributes() {
         return userAttrs;
     }
 
     /**
      * @return Igfss.
      */
-    public Iterable<VisorIgfsConfiguration> igfss() {
+    public Collection<VisorIgfsConfiguration> getIgfss() {
         return igfss;
     }
 
     /**
      * @return Environment.
      */
-    public Map<String, String> env() {
+    public Map<String, String> getEnv() {
         return env;
     }
 
     /**
      * @return System properties.
      */
-    public Properties systemProperties() {
+    public Properties getSystemProperties() {
         return sysProps;
     }
 
     /**
      * @return Configuration of atomic data structures.
      */
-    public VisorAtomicConfiguration atomic() {
+    public VisorAtomicConfiguration getAtomic() {
         return atomic;
     }
 
     /**
      * @return Transactions configuration.
      */
-    public VisorTransactionConfiguration transaction() {
+    public VisorTransactionConfiguration getTransaction() {
         return txCfg;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeObject(basic);
+        out.writeObject(metrics);
+        out.writeObject(spis);
+        out.writeObject(p2p);
+        out.writeObject(lifecycle);
+        out.writeObject(execSvc);
+        out.writeObject(seg);
+        U.writeString(out, inclProps);
+        out.writeObject(inclEvtTypes);
+        out.writeObject(rest);
+        U.writeMap(out, userAttrs);
+        U.writeCollection(out, igfss);
+        U.writeMap(out, env);
+        out.writeObject(sysProps);
+        out.writeObject(atomic);
+        out.writeObject(txCfg);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        basic = (VisorBasicConfiguration)in.readObject();
+        metrics = (VisorMetricsConfiguration)in.readObject();
+        spis = (VisorSpisConfiguration)in.readObject();
+        p2p = (VisorPeerToPeerConfiguration)in.readObject();
+        lifecycle = (VisorLifecycleConfiguration)in.readObject();
+        execSvc = (VisorExecutorServiceConfiguration)in.readObject();
+        seg = (VisorSegmentationConfiguration)in.readObject();
+        inclProps = U.readString(in);
+        inclEvtTypes = (int[])in.readObject();
+        rest = (VisorRestConfiguration)in.readObject();
+        userAttrs = U.readMap(in);
+        igfss = U.readCollection(in);
+        env = U.readMap(in);
+        sysProps = (Properties)in.readObject();
+        atomic = (VisorAtomicConfiguration)in.readObject();
+        txCfg = (VisorTransactionConfiguration)in.readObject();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorGridConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
index 7f8e3b0..1d4b388 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
@@ -17,7 +17,9 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -25,8 +27,9 @@ import java.util.Map;
 import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.igfs.IgfsIpcEndpointConfiguration;
 import org.apache.ignite.igfs.IgfsMode;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactClass;
@@ -34,7 +37,7 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactClass;
 /**
  * Data transfer object for IGFS configuration properties.
  */
-public class VisorIgfsConfiguration implements Serializable, LessNamingBean {
+public class VisorIgfsConfiguration extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -62,15 +65,6 @@ public class VisorIgfsConfiguration implements Serializable, LessNamingBean {
     /** Number of batches that can be concurrently sent to remote node. */
     private int perNodeParallelBatchCnt;
 
-    /** @deprecated Needed only for backward compatibility. */
-    private String secondaryHadoopFileSysUri;
-
-    /** @deprecated Needed only for backward compatibility. */
-    private String secondaryHadoopFileSysCfgPath;
-
-    /** @deprecated Needed only for backward compatibility. */
-    private String secondaryHadoopFileSysUserName;
-
     /** IGFS instance mode. */
     private IgfsMode dfltMode;
 
@@ -123,44 +117,47 @@ public class VisorIgfsConfiguration implements Serializable, LessNamingBean {
     private long trashPurgeTimeout;
 
     /**
+     * Default constructor.
+     */
+    public VisorIgfsConfiguration() {
+        // No-op.
+    }
+
+    /**
+     * Create data transfer object for IGFS configuration properties.
      * @param igfs IGFS configuration.
-     * @return Data transfer object for IGFS configuration properties.
      */
-    public static VisorIgfsConfiguration from(FileSystemConfiguration igfs) {
-        VisorIgfsConfiguration cfg = new VisorIgfsConfiguration();
-
-        cfg.name = igfs.getName();
-        cfg.metaCacheName = igfs.getMetaCacheConfiguration().getName();
-        cfg.dataCacheName = igfs.getDataCacheConfiguration().getName();
-        cfg.blockSize = igfs.getBlockSize();
-        cfg.prefetchBlocks = igfs.getPrefetchBlocks();
-        cfg.streamBufSize = igfs.getStreamBufferSize();
-        cfg.perNodeBatchSize = igfs.getPerNodeBatchSize();
-        cfg.perNodeParallelBatchCnt = igfs.getPerNodeParallelBatchCount();
-
-        cfg.dfltMode = igfs.getDefaultMode();
-        cfg.pathModes = igfs.getPathModes();
-        cfg.dualModePutExecutorSrvc = compactClass(igfs.getDualModePutExecutorService());
-        cfg.dualModePutExecutorSrvcShutdown = igfs.getDualModePutExecutorServiceShutdown();
-        cfg.dualModeMaxPendingPutsSize = igfs.getDualModeMaxPendingPutsSize();
-        cfg.maxTaskRangeLen = igfs.getMaximumTaskRangeLength();
-        cfg.fragmentizerConcurrentFiles = igfs.getFragmentizerConcurrentFiles();
-        cfg.fragmentizerLocWritesRatio = igfs.getFragmentizerLocalWritesRatio();
-        cfg.fragmentizerEnabled = igfs.isFragmentizerEnabled();
-        cfg.fragmentizerThrottlingBlockLen = igfs.getFragmentizerThrottlingBlockLength();
-        cfg.fragmentizerThrottlingDelay = igfs.getFragmentizerThrottlingDelay();
+    public VisorIgfsConfiguration(FileSystemConfiguration igfs) {
+        name = igfs.getName();
+        metaCacheName = igfs.getMetaCacheConfiguration().getName();
+        dataCacheName = igfs.getDataCacheConfiguration().getName();
+        blockSize = igfs.getBlockSize();
+        prefetchBlocks = igfs.getPrefetchBlocks();
+        streamBufSize = igfs.getStreamBufferSize();
+        perNodeBatchSize = igfs.getPerNodeBatchSize();
+        perNodeParallelBatchCnt = igfs.getPerNodeParallelBatchCount();
+
+        dfltMode = igfs.getDefaultMode();
+        pathModes = igfs.getPathModes();
+        dualModePutExecutorSrvc = compactClass(igfs.getDualModePutExecutorService());
+        dualModePutExecutorSrvcShutdown = igfs.getDualModePutExecutorServiceShutdown();
+        dualModeMaxPendingPutsSize = igfs.getDualModeMaxPendingPutsSize();
+        maxTaskRangeLen = igfs.getMaximumTaskRangeLength();
+        fragmentizerConcurrentFiles = igfs.getFragmentizerConcurrentFiles();
+        fragmentizerLocWritesRatio = igfs.getFragmentizerLocalWritesRatio();
+        fragmentizerEnabled = igfs.isFragmentizerEnabled();
+        fragmentizerThrottlingBlockLen = igfs.getFragmentizerThrottlingBlockLength();
+        fragmentizerThrottlingDelay = igfs.getFragmentizerThrottlingDelay();
 
         IgfsIpcEndpointConfiguration endpointCfg = igfs.getIpcEndpointConfiguration();
 
-        cfg.ipcEndpointCfg = endpointCfg != null ? endpointCfg.toString() : null;
+        ipcEndpointCfg = endpointCfg != null ? endpointCfg.toString() : null;
 
-        cfg.ipcEndpointEnabled = igfs.isIpcEndpointEnabled();
-        cfg.maxSpace = igfs.getMaxSpaceSize();
-        cfg.mgmtPort = igfs.getManagementPort();
-        cfg.seqReadsBeforePrefetch = igfs.getSequentialReadsBeforePrefetch();
-        cfg.trashPurgeTimeout = igfs.getTrashPurgeTimeout();
-
-        return cfg;
+        ipcEndpointEnabled = igfs.isIpcEndpointEnabled();
+        maxSpace = igfs.getMaxSpaceSize();
+        mgmtPort = igfs.getManagementPort();
+        seqReadsBeforePrefetch = igfs.getSequentialReadsBeforePrefetch();
+        trashPurgeTimeout = igfs.getTrashPurgeTimeout();
     }
 
     /**
@@ -169,14 +166,14 @@ public class VisorIgfsConfiguration implements Serializable, LessNamingBean {
      * @param igfss Igfs configurations.
      * @return igfs configurations properties.
      */
-    public static Iterable<VisorIgfsConfiguration> list(FileSystemConfiguration[] igfss) {
+    public static Collection<VisorIgfsConfiguration> list(FileSystemConfiguration[] igfss) {
         if (igfss == null)
             return Collections.emptyList();
 
         final Collection<VisorIgfsConfiguration> cfgs = new ArrayList<>(igfss.length);
 
         for (FileSystemConfiguration igfs : igfss)
-            cfgs.add(from(igfs));
+            cfgs.add(new VisorIgfsConfiguration(igfs));
 
         return cfgs;
     }
@@ -184,200 +181,237 @@ public class VisorIgfsConfiguration implements Serializable, LessNamingBean {
     /**
      * @return IGFS instance name.
      */
-    @Nullable public String name() {
+    @Nullable public String getName() {
         return name;
     }
 
     /**
      * @return Cache name to store IGFS meta information.
      */
-    @Nullable public String metaCacheName() {
+    @Nullable public String getMetaCacheName() {
         return metaCacheName;
     }
 
     /**
      * @return Cache name to store IGFS data.
      */
-    @Nullable public String dataCacheName() {
+    @Nullable public String getDataCacheName() {
         return dataCacheName;
     }
 
     /**
      * @return File's data block size.
      */
-    public int blockSize() {
+    public int getBlockSize() {
         return blockSize;
     }
 
     /**
      * @return Number of pre-fetched blocks if specific file's chunk is requested.
      */
-    public int prefetchBlocks() {
+    public int getPrefetchBlocks() {
         return prefetchBlocks;
     }
 
     /**
      * @return Read/write buffer size for IGFS stream operations in bytes.
      */
-    public int streamBufferSize() {
+    public int getStreamBufferSize() {
         return streamBufSize;
     }
 
     /**
      * @return Number of file blocks buffered on local node before sending batch to remote node.
      */
-    public int perNodeBatchSize() {
+    public int getPerNodeBatchSize() {
         return perNodeBatchSize;
     }
 
     /**
      * @return Number of batches that can be concurrently sent to remote node.
      */
-    public int perNodeParallelBatchCount() {
+    public int getPerNodeParallelBatchCount() {
         return perNodeParallelBatchCnt;
     }
 
     /**
-     * @deprecated Needed only for backward compatibility.
-     */
-    @Nullable public String secondaryHadoopFileSystemUri() {
-        return secondaryHadoopFileSysUri;
-    }
-
-    /**
-     * @deprecated Needed only for backward compatibility.
-     */
-    @Nullable public String secondaryHadoopFileSystemUserName() {
-        return secondaryHadoopFileSysUserName;
-    }
-
-    /**
-     * @deprecated Needed only for backward compatibility.
-     */
-    @Nullable public String secondaryHadoopFileSystemConfigPath() {
-        return secondaryHadoopFileSysCfgPath;
-    }
-
-    /**
      * @return IGFS instance mode.
      */
-    public IgfsMode defaultMode() {
+    public IgfsMode getDefaultMode() {
         return dfltMode;
     }
 
     /**
      * @return Map of paths to IGFS modes.
      */
-    @Nullable public Map<String, IgfsMode> pathModes() {
+    @Nullable public Map<String, IgfsMode> getPathModes() {
         return pathModes;
     }
 
     /**
      * @return Dual mode PUT operations executor service.
      */
-    public String dualModePutExecutorService() {
+    public String getDualModePutExecutorService() {
         return dualModePutExecutorSrvc;
     }
 
     /**
      * @return Dual mode PUT operations executor service shutdown flag.
      */
-    public boolean dualModePutExecutorServiceShutdown() {
+    public boolean getDualModePutExecutorServiceShutdown() {
         return dualModePutExecutorSrvcShutdown;
     }
 
     /**
      * @return Maximum amount of data in pending puts.
      */
-    public long dualModeMaxPendingPutsSize() {
+    public long getDualModeMaxPendingPutsSize() {
         return dualModeMaxPendingPutsSize;
     }
 
     /**
      * @return Maximum range length.
      */
-    public long maxTaskRangeLength() {
+    public long getMaxTaskRangeLength() {
         return maxTaskRangeLen;
     }
 
     /**
      * @return Fragmentizer concurrent files.
      */
-    public int fragmentizerConcurrentFiles() {
+    public int getFragmentizerConcurrentFiles() {
         return fragmentizerConcurrentFiles;
     }
 
     /**
      * @return Fragmentizer local writes ratio.
      */
-    public float fragmentizerLocalWritesRatio() {
+    public float getFragmentizerLocalWritesRatio() {
         return fragmentizerLocWritesRatio;
     }
 
     /**
      * @return Fragmentizer enabled flag.
      */
-    public boolean fragmentizerEnabled() {
+    public boolean isFragmentizerEnabled() {
         return fragmentizerEnabled;
     }
 
     /**
      * @return Fragmentizer throttling block length.
      */
-    public long fragmentizerThrottlingBlockLength() {
+    public long getFragmentizerThrottlingBlockLength() {
         return fragmentizerThrottlingBlockLen;
     }
 
     /**
      * @return Fragmentizer throttling delay.
      */
-    public long fragmentizerThrottlingDelay() {
+    public long getFragmentizerThrottlingDelay() {
         return fragmentizerThrottlingDelay;
     }
 
     /**
      * @return IPC endpoint config to publish IGFS over.
      */
-    @Nullable public String ipcEndpointConfiguration() {
+    @Nullable public String getIpcEndpointConfiguration() {
         return ipcEndpointCfg;
     }
 
     /**
      * @return IPC endpoint enabled flag.
      */
-    public boolean ipcEndpointEnabled() {
+    public boolean isIpcEndpointEnabled() {
         return ipcEndpointEnabled;
     }
 
     /**
      * @return Maximum space.
      */
-    public long maxSpace() {
+    public long getMaxSpace() {
         return maxSpace;
     }
 
     /**
      * @return Management port.
      */
-    public int managementPort() {
+    public int getManagementPort() {
         return mgmtPort;
     }
 
     /**
      * @return Amount of sequential block reads before prefetch is triggered.
      */
-    public int sequenceReadsBeforePrefetch() {
+    public int getSequenceReadsBeforePrefetch() {
         return seqReadsBeforePrefetch;
     }
 
     /**
      * @return Trash purge await timeout.
      */
-    public long trashPurgeTimeout() {
+    public long getTrashPurgeTimeout() {
         return trashPurgeTimeout;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, name);
+        U.writeString(out, metaCacheName);
+        U.writeString(out, dataCacheName);
+        out.writeInt(blockSize);
+        out.writeInt(prefetchBlocks);
+        out.writeInt(streamBufSize);
+        out.writeInt(perNodeBatchSize);
+        out.writeInt(perNodeParallelBatchCnt);
+        U.writeEnum(out, dfltMode);
+        U.writeMap(out, pathModes);
+        U.writeString(out, dualModePutExecutorSrvc);
+        out.writeBoolean(dualModePutExecutorSrvcShutdown);
+        out.writeLong(dualModeMaxPendingPutsSize);
+        out.writeLong(maxTaskRangeLen);
+        out.writeInt(fragmentizerConcurrentFiles);
+        out.writeFloat(fragmentizerLocWritesRatio);
+        out.writeBoolean(fragmentizerEnabled);
+        out.writeLong(fragmentizerThrottlingBlockLen);
+        out.writeLong(fragmentizerThrottlingDelay);
+        U.writeString(out, ipcEndpointCfg);
+        out.writeBoolean(ipcEndpointEnabled);
+        out.writeLong(maxSpace);
+        out.writeInt(mgmtPort);
+        out.writeInt(seqReadsBeforePrefetch);
+        out.writeLong(trashPurgeTimeout);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        name = U.readString(in);
+        metaCacheName = U.readString(in);
+        dataCacheName = U.readString(in);
+        blockSize = in.readInt();
+        prefetchBlocks = in.readInt();
+        streamBufSize = in.readInt();
+        perNodeBatchSize = in.readInt();
+        perNodeParallelBatchCnt = in.readInt();
+        dfltMode = IgfsMode.fromOrdinal(in.readByte());
+        pathModes = U.readMap(in);
+        dualModePutExecutorSrvc = U.readString(in);
+        dualModePutExecutorSrvcShutdown = in.readBoolean();
+        dualModeMaxPendingPutsSize = in.readLong();
+        maxTaskRangeLen = in.readLong();
+        fragmentizerConcurrentFiles = in.readInt();
+        fragmentizerLocWritesRatio = in.readFloat();
+        fragmentizerEnabled = in.readBoolean();
+        fragmentizerThrottlingBlockLen = in.readLong();
+        fragmentizerThrottlingDelay = in.readLong();
+        ipcEndpointCfg = U.readString(in);
+        ipcEndpointEnabled = in.readBoolean();
+        maxSpace = in.readLong();
+        mgmtPort = in.readInt();
+        seqReadsBeforePrefetch = in.readInt();
+        trashPurgeTimeout = in.readLong();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorIgfsConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorLifecycleConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorLifecycleConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorLifecycleConfiguration.java
index 838a6cc..7eb4ad3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorLifecycleConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorLifecycleConfiguration.java
@@ -17,10 +17,13 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactArray;
@@ -28,7 +31,7 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.compactArray;
 /**
  * Data transfer object for node lifecycle configuration properties.
  */
-public class VisorLifecycleConfiguration implements Serializable, LessNamingBean {
+public class VisorLifecycleConfiguration extends VisorDataTransferObject{
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -36,25 +39,39 @@ public class VisorLifecycleConfiguration implements Serializable, LessNamingBean
     private String beans;
 
     /**
-     * @param c Grid configuration.
-     * @return Data transfer object for node lifecycle configuration properties.
+     * Default constructor.
      */
-    public static VisorLifecycleConfiguration from(IgniteConfiguration c) {
-        VisorLifecycleConfiguration cfg = new VisorLifecycleConfiguration();
-
-        cfg.beans = compactArray(c.getLifecycleBeans());
+    public VisorLifecycleConfiguration() {
+        // No-op.
+    }
 
-        return cfg;
+    /**
+     * Create data transfer object for node lifecycle configuration properties.
+     *
+     * @param c Grid configuration.
+     */
+    public VisorLifecycleConfiguration(IgniteConfiguration c) {
+        beans = compactArray(c.getLifecycleBeans());
     }
 
     /**
      * @return Lifecycle beans.
      */
-    @Nullable public String beans() {
+    @Nullable public String getBeans() {
         return beans;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, beans);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        beans = U.readString(in);
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorLifecycleConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java
index 4e812b7..18575aa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorMetricsConfiguration.java
@@ -17,15 +17,17 @@
 
 package org.apache.ignite.internal.visor.node;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Data transfer object for node metrics configuration properties.
  */
-public class VisorMetricsConfiguration implements Serializable, LessNamingBean {
+public class VisorMetricsConfiguration extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -39,41 +41,59 @@ public class VisorMetricsConfiguration implements Serializable, LessNamingBean {
     private long logFreq;
 
     /**
-     * @param c Grid configuration.
-     * @return Data transfer object for node metrics configuration properties.
+     * Default constructor.
      */
-    public static VisorMetricsConfiguration from(IgniteConfiguration c) {
-        VisorMetricsConfiguration cfg = new VisorMetricsConfiguration();
-
-        cfg.expTime = c.getMetricsExpireTime();
-        cfg.histSize = c.getMetricsHistorySize();
-        cfg.logFreq = c.getMetricsLogFrequency();
+    public VisorMetricsConfiguration() {
+        // No-op.
+    }
 
-        return cfg;
+    /**
+     * Create transfer object for node metrics configuration properties.
+     *
+     * @param c Grid configuration.
+     */
+    public VisorMetricsConfiguration(IgniteConfiguration c) {
+        expTime = c.getMetricsExpireTime();
+        histSize = c.getMetricsHistorySize();
+        logFreq = c.getMetricsLogFrequency();
     }
 
     /**
      * @return Metrics expired time.
      */
-    public long expireTime() {
+    public long getExpireTime() {
         return expTime;
     }
 
     /**
      * @return Number of node metrics stored in memory.
      */
-    public int historySize() {
+    public int getHistorySize() {
         return histSize;
     }
 
     /**
      * @return Frequency of metrics log printout.
      */
-    public long loggerFrequency() {
+    public long getLoggerFrequency() {
         return logFreq;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeLong(expTime);
+        out.writeInt(histSize);
+        out.writeLong(logFreq);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        expTime = in.readLong();
+        histSize = in.readInt();
+        logFreq = in.readLong();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorMetricsConfiguration.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
index 109b1d8..35b7ad3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeConfigurationCollectorJob.java
@@ -37,11 +37,11 @@ public class VisorNodeConfigurationCollectorJob extends VisorJob<Void, VisorGrid
 
     /** {@inheritDoc} */
     @Override protected VisorGridConfiguration run(Void arg) {
-        return new VisorGridConfiguration().from(ignite);
+        return new VisorGridConfiguration(ignite);
     }
 
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorNodeConfigurationCollectorJob.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
index 0617e70..125e219 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorNodeDataCollectorJob.java
@@ -24,6 +24,8 @@ import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
+import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
+import org.apache.ignite.internal.processors.cache.GridCacheProcessor;
 import org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter;
 import org.apache.ignite.internal.util.ipc.IpcServerEndpoint;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -33,6 +35,7 @@ import org.apache.ignite.internal.visor.cache.VisorCache;
 import org.apache.ignite.internal.visor.compute.VisorComputeMonitoringHolder;
 import org.apache.ignite.internal.visor.igfs.VisorIgfs;
 import org.apache.ignite.internal.visor.igfs.VisorIgfsEndpoint;
+import org.apache.ignite.lang.IgniteProductVersion;
 
 import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isIgfsCache;
 import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isSystemCache;
@@ -70,7 +73,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
      */
     protected void events0(VisorNodeDataCollectorJobResult res, String evtOrderKey, String evtThrottleCntrKey,
         final boolean all) {
-        res.events().addAll(collectEvents(ignite, evtOrderKey, evtThrottleCntrKey, all, EVT_MAPPER));
+        res.getEvents().addAll(collectEvents(ignite, evtOrderKey, evtThrottleCntrKey, all, EVT_MAPPER));
     }
 
     /**
@@ -83,12 +86,12 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
         try {
             // Visor events explicitly enabled in configuration.
             if (checkExplicitTaskMonitoring(ignite))
-                res.taskMonitoringEnabled(true);
+                res.setTaskMonitoringEnabled(true);
             else {
                 // Get current task monitoring state.
-                res.taskMonitoringEnabled(arg.taskMonitoringEnabled());
+                res.setTaskMonitoringEnabled(arg.isTaskMonitoringEnabled());
 
-                if (arg.taskMonitoringEnabled()) {
+                if (arg.isTaskMonitoringEnabled()) {
                     ConcurrentMap<String, VisorComputeMonitoringHolder> storage = ignite.cluster().nodeLocalMap();
 
                     VisorComputeMonitoringHolder holder = storage.get(COMPUTE_MONITORING_HOLDER_KEY);
@@ -102,21 +105,33 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
                     }
 
                     // Enable task monitoring for new node in grid.
-                    holder.startCollect(ignite, arg.eventsOrderKey());
+                    holder.startCollect(ignite, arg.getEventsOrderKey());
 
                     // Update current state after change (it may not changed in some cases).
-                    res.taskMonitoringEnabled(ignite.allEventsUserRecordable(VISOR_TASK_EVTS));
+                    res.setTaskMonitoringEnabled(ignite.allEventsUserRecordable(VISOR_TASK_EVTS));
                 }
             }
 
-            events0(res, arg.eventsOrderKey(), arg.eventsThrottleCounterKey(), arg.taskMonitoringEnabled());
+            events0(res, arg.getEventsOrderKey(), arg.getEventsThrottleCounterKey(), arg.isTaskMonitoringEnabled());
         }
         catch (Exception eventsEx) {
-            res.eventsEx(eventsEx);
+            res.setEventsEx(eventsEx);
         }
     }
 
     /**
+     * @param ver Version to check.
+     * @return {@code true} if found at least one compatible node with specified version.
+     */
+    protected boolean compatibleWith(IgniteProductVersion ver) {
+        for (ClusterNode node : ignite.cluster().nodes())
+            if (node.version().compareToIgnoreTimestamp(ver) <= 0)
+                return true;
+
+        return false;
+    }
+
+    /**
      * @param cacheName Cache name to check.
      * @return {@code true} if cache on local node is not a data cache or near cache disabled.
      */
@@ -138,19 +153,22 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
         try {
             IgniteConfiguration cfg = ignite.configuration();
 
-            for (String cacheName : ignite.context().cache().cacheNames()) {
+            GridCacheProcessor cacheProc = ignite.context().cache();
+
+            for (String cacheName : cacheProc.cacheNames()) {
                 if (proxyCache(cacheName))
                     continue;
 
-                if (arg.systemCaches() ||
-                    !(isSystemCache(cacheName) || isIgfsCache(cfg, cacheName))) {
+                if (arg.getSystemCaches() || !(isSystemCache(cacheName) || isIgfsCache(cfg, cacheName))) {
                     long start0 = U.currentTimeMillis();
 
                     try {
-                        VisorCache cache = new VisorCache().from(ignite, cacheName, arg.sample());
+                        GridCacheAdapter ca = cacheProc.internalCache(cacheName);
+
+                        if (ca == null || !ca.context().started())
+                            continue;
 
-                        if (cache != null)
-                            res.caches().add(cache);
+                        res.getCaches().add(new VisorCache(ignite, ca, arg.getSample()));
                     }
                     catch(IllegalStateException | IllegalArgumentException e) {
                         if (debug && ignite.log() != null)
@@ -164,7 +182,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
             }
         }
         catch (Exception cachesEx) {
-            res.cachesEx(cachesEx);
+            res.setCachesEx(cachesEx);
         }
     }
 
@@ -182,8 +200,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
 
                 FileSystemConfiguration igfsCfg = igfs.configuration();
 
-                if (proxyCache(igfsCfg.getDataCacheConfiguration().getName())
-                    || proxyCache(igfsCfg.getMetaCacheConfiguration().getName()))
+                if (proxyCache(igfsCfg.getDataCacheConfiguration().getName()) || proxyCache(igfsCfg.getMetaCacheConfiguration().getName()))
                     continue;
 
                 try {
@@ -192,11 +209,11 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
                     if (endPoints != null) {
                         for (IpcServerEndpoint ep : endPoints)
                             if (ep.isManagement())
-                                res.igfsEndpoints().add(new VisorIgfsEndpoint(igfs.name(), ignite.name(),
+                                res.getIgfsEndpoints().add(new VisorIgfsEndpoint(igfs.name(), ignite.name(),
                                     ep.getHost(), ep.getPort()));
                     }
 
-                    res.igfss().add(VisorIgfs.from(igfs));
+                    res.getIgfss().add(new VisorIgfs(igfs));
                 }
                 finally {
                     if (debug)
@@ -205,7 +222,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
             }
         }
         catch (Exception igfssEx) {
-            res.igfssEx(igfssEx);
+            res.setIgfssEx(igfssEx);
         }
     }
 
@@ -223,9 +240,9 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
      */
     protected VisorNodeDataCollectorJobResult run(VisorNodeDataCollectorJobResult res,
         VisorNodeDataCollectorTaskArg arg) {
-        res.igniteInstanceName(ignite.name());
+        res.setGridName(ignite.name());
 
-        res.topologyVersion(ignite.cluster().topologyVersion());
+        res.setTopologyVersion(ignite.cluster().topologyVersion());
 
         long start0 = U.currentTimeMillis();
 
@@ -244,7 +261,7 @@ public class VisorNodeDataCollectorJob extends VisorJob<VisorNodeDataCollectorTa
         if (debug)
             log(ignite.log(), "Collected igfs", getClass(), start0);
 
-        res.errorCount(ignite.context().exceptionRegistry().errorCount());
+        res.setErrorCount(ignite.context().exceptionRegistry().errorCount());
 
         return res;
     }


Mime
View raw message