ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [36/76] [abbrv] incubator-ignite git commit: # IGNITE-226: WIP.
Date Fri, 13 Feb 2015 18:03:42 GMT
# IGNITE-226: WIP.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/9b49a585
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/9b49a585
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/9b49a585

Branch: refs/heads/ignite-hadoop-tests
Commit: 9b49a5856f6a7e0b1a4a17ba5eb2f6c0b4dfc2e4
Parents: 660587e
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Feb 13 14:42:05 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Fri Feb 13 14:42:05 2015 +0300

----------------------------------------------------------------------
 .../processors/closure/GridClosurePolicy.java   |   4 +-
 .../closure/GridClosureProcessor.java           |  12 +-
 .../processors/igfs/IgfsIpcHandler.java         |   2 +-
 .../ignite/internal/visor/ggfs/VisorIgfs.java   | 113 -----
 .../internal/visor/ggfs/VisorIgfsEndpoint.java  | 106 ----
 .../visor/ggfs/VisorIgfsFormatTask.java         |  70 ---
 .../internal/visor/ggfs/VisorIgfsMetrics.java   | 350 -------------
 .../internal/visor/ggfs/VisorIgfsProfiler.java  |  88 ----
 .../visor/ggfs/VisorIgfsProfilerClearTask.java  | 114 -----
 .../visor/ggfs/VisorIgfsProfilerEntry.java      | 238 ---------
 .../visor/ggfs/VisorIgfsProfilerTask.java       | 507 -------------------
 .../VisorIgfsProfilerUniformityCounters.java    | 197 -------
 .../visor/ggfs/VisorIgfsResetMetricsTask.java   |  73 ---
 .../visor/ggfs/VisorIgfsSamplingStateTask.java  |  77 ---
 .../ignite/internal/visor/igfs/VisorIgfs.java   | 113 +++++
 .../internal/visor/igfs/VisorIgfsEndpoint.java  | 106 ++++
 .../visor/igfs/VisorIgfsFormatTask.java         |  70 +++
 .../internal/visor/igfs/VisorIgfsMetrics.java   | 350 +++++++++++++
 .../internal/visor/igfs/VisorIgfsProfiler.java  |  88 ++++
 .../visor/igfs/VisorIgfsProfilerClearTask.java  | 114 +++++
 .../visor/igfs/VisorIgfsProfilerEntry.java      | 238 +++++++++
 .../visor/igfs/VisorIgfsProfilerTask.java       | 507 +++++++++++++++++++
 .../VisorIgfsProfilerUniformityCounters.java    | 197 +++++++
 .../visor/igfs/VisorIgfsResetMetricsTask.java   |  73 +++
 .../visor/igfs/VisorIgfsSamplingStateTask.java  |  77 +++
 .../visor/node/VisorNodeDataCollectorJob.java   |   2 +-
 .../node/VisorNodeDataCollectorJobResult.java   |   2 +-
 .../node/VisorNodeDataCollectorTaskResult.java  |   2 +-
 28 files changed, 1944 insertions(+), 1946 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosurePolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosurePolicy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosurePolicy.java
index 9c34e9d..69b2ac9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosurePolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosurePolicy.java
@@ -33,8 +33,8 @@ public enum GridClosurePolicy {
     /** System execution pool. */
     SYSTEM_POOL,
 
-    /** GGFS pool. */
-    GGFS_POOL;
+    /** IGFS pool. */
+    IGFS_POOL;
 
     /** Enum values. */
     private static final GridClosurePolicy[] VALS = values();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
index 23b3aa8..b1d8471 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/closure/GridClosureProcessor.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.internal.processors.closure;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
-import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.compute.*;
 import org.apache.ignite.internal.*;
@@ -55,7 +53,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
     private final Executor pubPool;
 
     /** */
-    private final Executor ggfsPool;
+    private final Executor igfsPool;
 
     /** Lock to control execution after stop. */
     private final GridSpinReadWriteLock busyLock = new GridSpinReadWriteLock();
@@ -71,7 +69,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
 
         sysPool = ctx.getSystemExecutorService();
         pubPool = ctx.getExecutorService();
-        ggfsPool = ctx.getGgfsExecutorService();
+        igfsPool = ctx.getGgfsExecutorService();
     }
 
     /** {@inheritDoc} */
@@ -689,8 +687,8 @@ public class GridClosureProcessor extends GridProcessorAdapter {
             case SYSTEM_POOL:
                 return sysPool;
 
-            case GGFS_POOL:
-                return ggfsPool;
+            case IGFS_POOL:
+                return igfsPool;
 
             default:
                 throw new IllegalArgumentException("Invalid closure execution policy: " + plc);
@@ -711,7 +709,7 @@ public class GridClosureProcessor extends GridProcessorAdapter {
             case SYSTEM_POOL:
                 return "system";
 
-            case GGFS_POOL:
+            case IGFS_POOL:
                 return "igfs";
 
             default:

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsIpcHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsIpcHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsIpcHandler.java
index 59c31b1..a00b70f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsIpcHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsIpcHandler.java
@@ -130,7 +130,7 @@ class IgfsIpcHandler implements IgfsServerHandler {
                             // No need to pass data input for non-write-block commands.
                             return execute(ses, cmd, msg, null);
                         }
-                    }, GridClosurePolicy.GGFS_POOL);
+                    }, GridClosurePolicy.IGFS_POOL);
                 }
             }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfs.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfs.java
deleted file mode 100644
index 9bdfd09..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfs.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.*;
-import org.apache.ignite.igfs.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.io.*;
-
-/**
- * Data transfer object for {@link org.apache.ignite.IgniteFs}.
- */
-public class VisorIgfs implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** GGFS instance name. */
-    private final String name;
-
-    /** GGFS instance working mode. */
-    private final IgfsMode mode;
-
-    /** GGFS metrics. */
-    private final VisorIgfsMetrics metrics;
-
-    /** Whether GGFS has configured secondary file system. */
-    private final boolean secondaryFsConfigured;
-
-    /**
-     * Create data transfer object.
-     *
-     * @param name GGFS name.
-     * @param mode GGFS mode.
-     * @param metrics GGFS metrics.
-     * @param secondaryFsConfigured Whether GGFS has configured secondary file system.
-     */
-    public VisorIgfs(
-        String name,
-        IgfsMode mode,
-        VisorIgfsMetrics metrics,
-        boolean secondaryFsConfigured
-    ) {
-        this.name = name;
-        this.mode = mode;
-        this.metrics = metrics;
-        this.secondaryFsConfigured = secondaryFsConfigured;
-    }
-
-    /**
-     * @param ggfs Source GGFS.
-     * @return Data transfer object for given GGFS.
-     * @throws IgniteCheckedException
-     */
-    public static VisorIgfs from(IgniteFs ggfs) throws IgniteCheckedException {
-        assert ggfs != null;
-
-        return new VisorIgfs(
-            ggfs.name(),
-            ggfs.configuration().getDefaultMode(),
-            VisorIgfsMetrics.from(ggfs.metrics()),
-            ggfs.configuration().getSecondaryFileSystem() != null
-        );
-    }
-
-    /**
-     * @return GGFS instance name.
-     */
-    public String name() {
-        return name;
-    }
-
-    /**
-     * @return GGFS instance working mode.
-     */
-    public IgfsMode mode() {
-        return mode;
-    }
-
-    /**
-     * @return GGFS metrics.
-     */
-    public VisorIgfsMetrics metrics() {
-        return metrics;
-    }
-
-    /**
-     * @return Whether GGFS has configured secondary file system.
-     */
-    public boolean secondaryFileSystemConfigured() {
-        return secondaryFsConfigured;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(VisorIgfs.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsEndpoint.java
deleted file mode 100644
index 2745703..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsEndpoint.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.jetbrains.annotations.*;
-
-import java.io.*;
-
-/**
- * GGFS endpoint descriptor.
- */
-public class VisorIgfsEndpoint implements Serializable{
-    /** */
-    private static final long  serialVersionUID = 0L;
-
-    /** GGFS name. */
-    private final String ggfsName;
-
-    /** Grid name. */
-    private final String gridName;
-
-    /** Host address / name. */
-    private final String hostName;
-
-    /** Port number. */
-    private final int port;
-
-    /**
-     * Create GGFS endpoint descriptor with given parameters.
-     * @param ggfsName GGFS name.
-     * @param gridName Grid name.
-     * @param hostName Host address / name.
-     * @param port Port number.
-     */
-    public VisorIgfsEndpoint(@Nullable String ggfsName, String gridName, @Nullable String hostName, int port) {
-        this.ggfsName = ggfsName;
-        this.gridName = gridName;
-        this.hostName = hostName;
-        this.port = port;
-    }
-
-    /**
-     * @return GGFS name.
-     */
-    @Nullable public String ggfsName() {
-        return ggfsName;
-    }
-
-    /**
-     * @return Grid name.
-     */
-    public String gridName() {
-        return gridName;
-    }
-
-    /**
-     * @return Host address / name.
-     */
-    @Nullable public String hostName() {
-        return hostName;
-    }
-
-    /**
-     * @return Port number.
-     */
-    public int port() {
-        return port;
-    }
-
-    /**
-     * @return URI Authority
-     */
-    public String authority() {
-        String addr = hostName + ":" + port;
-
-        if (ggfsName == null && gridName == null)
-            return addr;
-        else if (ggfsName == null)
-            return gridName + "@" + addr;
-        else if (gridName == null)
-            return ggfsName + "@" + addr;
-        else
-            return ggfsName + ":" + gridName + "@" + addr;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(VisorIgfsEndpoint.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsFormatTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsFormatTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsFormatTask.java
deleted file mode 100644
index a20f986..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsFormatTask.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.task.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.visor.*;
-
-/**
- * Format GGFS instance.
- */
-@GridInternal
-public class VisorIgfsFormatTask extends VisorOneNodeTask<String, Void> {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** {@inheritDoc} */
-    @Override protected VisorIgfsFormatJob job(String arg) {
-        return new VisorIgfsFormatJob(arg, debug);
-    }
-
-    /**
-     * Job that format GGFS.
-     */
-    private static class VisorIgfsFormatJob extends VisorJob<String, Void> {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /**
-         * @param arg GGFS name to format.
-         * @param debug Debug flag.
-         */
-        private VisorIgfsFormatJob(String arg, boolean debug) {
-            super(arg, debug);
-        }
-
-        /** {@inheritDoc} */
-        @Override protected Void run(String ggfsName) {
-            try {
-                ignite.fileSystem(ggfsName).format();
-            }
-            catch (IllegalArgumentException iae) {
-                throw new IgniteException("Failed to format IgniteFs: " + ggfsName, iae);
-            }
-
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorIgfsFormatJob.class, this);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsMetrics.java
deleted file mode 100644
index 320f4fa..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsMetrics.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.igfs.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.io.*;
-
-/**
- * Data transfer object for {@link org.apache.ignite.igfs.IgfsMetrics}.
- */
-public class VisorIgfsMetrics implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Maximum amount of data that can be stored on local node. */
-    private long totalSpaceSz;
-
-    /** Local used space in bytes on local node. */
-    private long usedSpaceSz;
-
-    /** Number of directories created in file system. */
-    private int foldersCnt;
-
-    /** Number of files stored in file system. */
-    private int filesCnt;
-
-    /** Number of files that are currently opened for reading on local node. */
-    private int filesOpenedForRd;
-
-    /** Number of files that are currently opened for writing on local node. */
-    private int filesOpenedForWrt;
-
-    /** Total blocks read, local and remote. */
-    private long blocksRd;
-
-    /** Total remote blocks read. */
-    private long blocksRdRmt;
-
-    /** Total blocks write, local and remote. */
-    private long blocksWrt;
-
-    /** Total remote blocks write. */
-    private long blocksWrtRmt;
-
-    /** Total bytes read. */
-    private long bytesRd;
-
-    /** Total bytes read time. */
-    private long bytesRdTm;
-
-    /** Total bytes write. */
-    private long bytesWrt;
-
-    /** Total bytes write time. */
-    private long bytesWrtTm;
-
-    /**
-     * @param m GGFS metrics.
-     * @return Data transfer object for given GGFS metrics.
-     */
-    public static VisorIgfsMetrics from(IgfsMetrics m) {
-        assert m != null;
-
-        VisorIgfsMetrics metrics = new VisorIgfsMetrics();
-
-        metrics.totalSpaceSize(m.maxSpaceSize());
-        metrics.usedSpaceSize(m.localSpaceSize());
-        metrics.foldersCount(m.directoriesCount());
-        metrics.filesCount(m.filesCount());
-        metrics.filesOpenedForRead(m.filesOpenedForRead());
-        metrics.filesOpenedForWrite(m.filesOpenedForWrite());
-        metrics.blocksRead(m.blocksReadTotal());
-        metrics.blocksReadRemote(m.blocksReadRemote());
-        metrics.blocksWritten(m.blocksWrittenTotal());
-        metrics.blocksWrittenRemote(m.blocksWrittenRemote());
-        metrics.bytesRead(m.bytesRead());
-        metrics.bytesReadTime(m.bytesReadTime());
-        metrics.bytesWritten(m.bytesWritten());
-        metrics.bytesWriteTime(m.bytesWriteTime());
-
-        return metrics;
-    }
-
-    /**
-     * Add given metrics.
-     *
-     * @param m Metrics to add.
-     * @return Self for method chaining.
-     */
-    public VisorIgfsMetrics add(VisorIgfsMetrics m) {
-        assert m != null;
-
-        totalSpaceSz += m.totalSpaceSz;
-        usedSpaceSz += m.usedSpaceSz;
-        foldersCnt += m.foldersCnt;
-        filesCnt += m.filesCnt;
-        filesOpenedForRd += m.filesOpenedForRd;
-        filesOpenedForWrt += m.filesOpenedForWrt;
-        blocksRd += m.blocksRd;
-        blocksRdRmt += m.blocksRdRmt;
-        blocksWrt += m.blocksWrt;
-        blocksWrtRmt += m.blocksWrtRmt;
-        bytesRd += m.bytesRd;
-        bytesRdTm += m.bytesRdTm;
-        bytesWrt += m.bytesWrt;
-        bytesWrtTm += m.bytesWrtTm;
-
-        return this;
-    }
-
-    /**
-     * Aggregate metrics.
-     *
-     * @param n Nodes count.
-     * @return Self for method chaining.
-     */
-    public VisorIgfsMetrics aggregate(int n) {
-        if (n > 0) {
-            foldersCnt /= n;
-            filesCnt /= n;
-        }
-
-        return this;
-    }
-
-    /**
-     * @return Maximum amount of data that can be stored on local node.
-     */
-    public long totalSpaceSize() {
-        return totalSpaceSz;
-    }
-
-    /**
-     * @param totalSpaceSz New maximum amount of data that can be stored on local node.
-     */
-    public void totalSpaceSize(long totalSpaceSz) {
-        this.totalSpaceSz = totalSpaceSz;
-    }
-
-    /**
-     * @return Local used space in bytes on local node.
-     */
-    public long usedSpaceSize() {
-        return usedSpaceSz;
-    }
-
-    /**
-     * @param usedSpaceSz New local used space in bytes on local node.
-     */
-    public void usedSpaceSize(long usedSpaceSz) {
-        this.usedSpaceSz = usedSpaceSz;
-    }
-
-    /**
-     * @return Local free space in bytes on local node.
-     */
-    public long freeSpaceSize() {
-        return totalSpaceSz - usedSpaceSz;
-    }
-
-    /**
-     * @return Number of directories created in file system.
-     */
-    public int foldersCount() {
-        return foldersCnt;
-    }
-
-    /**
-     * @param foldersCnt New number of directories created in file system.
-     */
-    public void foldersCount(int foldersCnt) {
-        this.foldersCnt = foldersCnt;
-    }
-
-    /**
-     * @return Number of files stored in file system.
-     */
-    public int filesCount() {
-        return filesCnt;
-    }
-
-    /**
-     * @param filesCnt New number of files stored in file system.
-     */
-    public void filesCount(int filesCnt) {
-        this.filesCnt = filesCnt;
-    }
-
-    /**
-     * @return Number of files that are currently opened for reading on local node.
-     */
-    public int filesOpenedForRead() {
-        return filesOpenedForRd;
-    }
-
-    /**
-     * @param filesOpenedForRd New number of files that are currently opened for reading on local node.
-     */
-    public void filesOpenedForRead(int filesOpenedForRd) {
-        this.filesOpenedForRd = filesOpenedForRd;
-    }
-
-    /**
-     * @return Number of files that are currently opened for writing on local node.
-     */
-    public int filesOpenedForWrite() {
-        return filesOpenedForWrt;
-    }
-
-    /**
-     * @param filesOpenedForWrt New number of files that are currently opened for writing on local node.
-     */
-    public void filesOpenedForWrite(int filesOpenedForWrt) {
-        this.filesOpenedForWrt = filesOpenedForWrt;
-    }
-
-    /**
-     * @return Total blocks read, local and remote.
-     */
-    public long blocksRead() {
-        return blocksRd;
-    }
-
-    /**
-     * @param blocksRd New total blocks read, local and remote.
-     */
-    public void blocksRead(long blocksRd) {
-        this.blocksRd = blocksRd;
-    }
-
-    /**
-     * @return Total remote blocks read.
-     */
-    public long blocksReadRemote() {
-        return blocksRdRmt;
-    }
-
-    /**
-     * @param blocksRdRmt New total remote blocks read.
-     */
-    public void blocksReadRemote(long blocksRdRmt) {
-        this.blocksRdRmt = blocksRdRmt;
-    }
-
-    /**
-     * @return Total blocks write, local and remote.
-     */
-    public long blocksWritten() {
-        return blocksWrt;
-    }
-
-    /**
-     * @param blocksWrt New total blocks write, local and remote.
-     */
-    public void blocksWritten(long blocksWrt) {
-        this.blocksWrt = blocksWrt;
-    }
-
-    /**
-     * @return Total remote blocks write.
-     */
-    public long blocksWrittenRemote() {
-        return blocksWrtRmt;
-    }
-
-    /**
-     * @param blocksWrtRmt New total remote blocks write.
-     */
-    public void blocksWrittenRemote(long blocksWrtRmt) {
-        this.blocksWrtRmt = blocksWrtRmt;
-    }
-
-    /**
-     * @return Total bytes read.
-     */
-    public long bytesRead() {
-        return bytesRd;
-    }
-
-    /**
-     * @param bytesRd New total bytes read.
-     */
-    public void bytesRead(long bytesRd) {
-        this.bytesRd = bytesRd;
-    }
-
-    /**
-     * @return Total bytes read time.
-     */
-    public long bytesReadTime() {
-        return bytesRdTm;
-    }
-
-    /**
-     * @param bytesRdTm New total bytes read time.
-     */
-    public void bytesReadTime(long bytesRdTm) {
-        this.bytesRdTm = bytesRdTm;
-    }
-
-    /**
-     * @return Total bytes write.
-     */
-    public long bytesWritten() {
-        return bytesWrt;
-    }
-
-    /**
-     * @param bytesWrt New total bytes write.
-     */
-    public void bytesWritten(long bytesWrt) {
-        this.bytesWrt = bytesWrt;
-    }
-
-    /**
-     * @return Total bytes write time.
-     */
-    public long bytesWriteTime() {
-        return bytesWrtTm;
-    }
-
-    /**
-     * @param bytesWrtTm New total bytes write time.
-     */
-    public void bytesWriteTime(long bytesWrtTm) {
-        this.bytesWrtTm = bytesWrtTm;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(VisorIgfsMetrics.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfiler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfiler.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfiler.java
deleted file mode 100644
index bb3d140..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfiler.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.igfs.*;
-import org.apache.ignite.internal.util.typedef.*;
-
-import java.util.*;
-
-/**
- * Various global constants for GGFS profiler.
- */
-public class VisorIgfsProfiler {
-    /** Default file block size to calculate uniformity. */
-    public static final int UNIFORMITY_DFLT_BLOCK_SIZE = 4096;
-
-    /** Default number of blocks to split file for uniformity calculations. */
-    public static final int UNIFORMITY_BLOCKS = 100;
-
-    /**
-     * Aggregate GGFS profiler entries.
-     *
-     * @param entries Entries to sum.
-     * @return Single aggregated entry.
-     */
-    public static VisorIgfsProfilerEntry aggregateGgfsProfilerEntries(List<VisorIgfsProfilerEntry> entries) {
-        assert !F.isEmpty(entries);
-
-        if (entries.size() == 1)
-            return entries.get(0); // No need to aggregate.
-        else {
-            String path = entries.get(0).path();
-
-            Collections.sort(entries, VisorIgfsProfilerEntry.ENTRY_TIMESTAMP_COMPARATOR);
-
-            long timestamp = 0;
-            long size = 0;
-            long bytesRead = 0;
-            long readTime = 0;
-            long userReadTime = 0;
-            long bytesWritten = 0;
-            long writeTime = 0;
-            long userWriteTime = 0;
-            IgfsMode mode = null;
-            VisorIgfsProfilerUniformityCounters counters = new VisorIgfsProfilerUniformityCounters();
-
-            for (VisorIgfsProfilerEntry entry : entries) {
-                // Take last timestamp.
-                timestamp = entry.timestamp();
-
-                // Take last size.
-                size = entry.size();
-
-                // Take last mode.
-                mode = entry.mode();
-
-                // Aggregate metrics.
-                bytesRead += entry.bytesRead();
-                readTime += entry.readTime();
-                userReadTime += entry.userReadTime();
-                bytesWritten += entry.bytesWritten();
-                writeTime += entry.writeTime();
-                userWriteTime += entry.userWriteTime();
-
-                counters.aggregate(entry.counters());
-            }
-
-            return new VisorIgfsProfilerEntry(path, timestamp, mode, size, bytesRead, readTime, userReadTime,
-                bytesWritten, writeTime, userWriteTime, counters);
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerClearTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerClearTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerClearTask.java
deleted file mode 100644
index 3c0928d..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerClearTask.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.task.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.visor.*;
-import org.apache.ignite.lang.*;
-
-import java.io.*;
-import java.nio.file.*;
-
-import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
-
-/**
- * Remove all GGFS profiler logs.
- */
-@GridInternal
-public class VisorIgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteBiTuple<Integer, Integer>> {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Job to clear profiler logs.
-     */
-    private static class VisorIgfsProfilerClearJob extends VisorJob<String, IgniteBiTuple<Integer, Integer>> {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /**
-         * Create job with given argument.
-         *
-         * @param arg Job argument.
-         * @param debug Debug flag.
-         */
-        private VisorIgfsProfilerClearJob(String arg, boolean debug) {
-            super(arg, debug);
-        }
-
-        /** {@inheritDoc} */
-        @Override protected IgniteBiTuple<Integer, Integer> run(String arg) {
-            int deleted = 0;
-            int notDeleted = 0;
-
-            try {
-                IgniteFs ggfs = ignite.fileSystem(arg);
-
-                Path logsDir = resolveIgfsProfilerLogsDir(ggfs);
-
-                if (logsDir != null) {
-                    PathMatcher matcher = FileSystems.getDefault().getPathMatcher(
-                        "glob:igfs-log-" + arg + "-*.csv");
-
-                    try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(logsDir)) {
-                        for (Path p : dirStream) {
-                            if (matcher.matches(p.getFileName())) {
-                                try {
-                                    Files.delete(p); // Try to delete file.
-
-                                    if (Files.exists(p)) // Checks if it still exists.
-                                        notDeleted++;
-                                    else
-                                        deleted++;
-                                }
-                                catch (NoSuchFileException ignored) {
-                                    // Files was already deleted, skip.
-                                }
-                                catch (IOException io) {
-                                    notDeleted++;
-
-                                    ignite.log().warning("Profiler log file was not deleted: " + p, io);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-            catch (IOException | IllegalArgumentException e) {
-                throw new IgniteException("Failed to clear profiler logs for GGFS: " + arg, e);
-            }
-            catch (IgniteCheckedException e) {
-                throw U.convertException(e);
-            }
-
-            return new IgniteBiTuple<>(deleted, notDeleted);
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorIgfsProfilerClearJob.class, this);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected VisorIgfsProfilerClearJob job(String arg) {
-        return new VisorIgfsProfilerClearJob(arg, debug);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerEntry.java
deleted file mode 100644
index cde7f01..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerEntry.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.igfs.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Visor GGFS profiler information about one file.
- */
-public class VisorIgfsProfilerEntry implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Timestamp comparator. */
-    public static final Comparator<VisorIgfsProfilerEntry> ENTRY_TIMESTAMP_COMPARATOR =
-        new Comparator<VisorIgfsProfilerEntry>() {
-            @Override public int compare(VisorIgfsProfilerEntry a, VisorIgfsProfilerEntry b) {
-                return Long.compare(a.timestamp, b.timestamp);
-        }
-    };
-
-    /** Path to file. */
-    private final String path;
-
-    /** Timestamp of last file operation. */
-    private final long timestamp;
-
-    /** GGFS mode. */
-    private final IgfsMode mode;
-
-    /** File size. */
-    private final long size;
-
-    /** How many bytes were read. */
-    private final long bytesRead;
-
-    /** How long read take. */
-    private final long readTime;
-
-    /** User read time. */
-    private final long userReadTime;
-
-    /** How many bytes were written. */
-    private final long bytesWritten;
-
-    /** How long write take. */
-    private final long writeTime;
-
-    /** User write read time. */
-    private final long userWriteTime;
-
-    /** Calculated uniformity. */
-    private double uniformity = -1;
-
-    /** Counters for uniformity calculation.  */
-    private final VisorIgfsProfilerUniformityCounters counters;
-
-    /** Read speed in bytes per second or {@code -1} if speed not available. */
-    private final long readSpeed;
-
-    /** Write speed in bytes per second or {@code -1} if speed not available. */
-    private final long writeSpeed;
-
-    /** Create data transfer object with given parameters. */
-    public VisorIgfsProfilerEntry(
-        String path,
-        long timestamp,
-        IgfsMode mode,
-        long size,
-        long bytesRead,
-        long readTime,
-        long userReadTime,
-        long bytesWritten,
-        long writeTime,
-        long userWriteTime,
-        VisorIgfsProfilerUniformityCounters counters
-    ) {
-        assert counters != null;
-
-        this.path = path;
-        this.timestamp = timestamp;
-        this.mode = mode;
-        this.size = size;
-        this.bytesRead = bytesRead;
-        this.readTime = readTime;
-        this.userReadTime = userReadTime;
-        this.bytesWritten = bytesWritten;
-        this.writeTime = writeTime;
-        this.userWriteTime = userWriteTime;
-        this.counters = counters;
-
-        readSpeed = speed(bytesRead, readTime);
-        writeSpeed = speed(bytesWritten, writeTime);
-    }
-
-    /**
-     * Calculate speed of bytes processing.
-     *
-     * @param bytes How many bytes were processed.
-     * @param time How long processing take (in nanoseconds).
-     * @return Speed of processing in bytes per second or {@code -1} if speed not available.
-     */
-    private static long speed(long bytes, long time) {
-        if (time > 0) {
-            double bytesScaled = bytes * 100000d;
-            double timeScaled = time / 10000d;
-
-            return (long)(bytesScaled / timeScaled);
-        }
-        else
-            return -1L;
-    }
-
-    /**
-     * @return Path to file.
-     */
-    public String path() {
-        return path;
-    }
-
-    /**
-     * @return Timestamp of last file operation.
-     */
-    public long timestamp() {
-        return timestamp;
-    }
-
-    /**
-     * @return GGFS mode.
-     */
-    public IgfsMode mode() {
-        return mode;
-    }
-
-    /**
-     * @return File size.
-     */
-    public long size() {
-        return size;
-    }
-
-    /**
-     * @return How many bytes were read.
-     */
-    public long bytesRead() {
-        return bytesRead;
-    }
-
-    /**
-     * @return How long read take.
-     */
-    public long readTime() {
-        return readTime;
-    }
-
-    /**
-     * @return User read time.
-     */
-    public long userReadTime() {
-        return userReadTime;
-    }
-
-    /**
-     * @return How many bytes were written.
-     */
-    public long bytesWritten() {
-        return bytesWritten;
-    }
-
-    /**
-     * @return How long write take.
-     */
-    public long writeTime() {
-        return writeTime;
-    }
-
-    /**
-     * @return User write read time.
-     */
-    public long userWriteTime() {
-        return userWriteTime;
-    }
-
-    /**
-     * @return Calculated uniformity.
-     */
-    public double uniformity() {
-        if (uniformity < 0)
-            uniformity = counters.calc();
-
-        return uniformity;
-    }
-
-    /**
-     * @return Counters for uniformity calculation.
-     */
-    public VisorIgfsProfilerUniformityCounters counters() {
-        return counters;
-    }
-
-    /**
-     * @return Read speed in bytes per second or {@code -1} if speed not available.
-     */
-    public long readSpeed() {
-        return readSpeed;
-    }
-
-    /**
-     * @return Write speed in bytes per second or {@code -1} if speed not available.
-     */
-    public long writeSpeed() {
-        return writeSpeed;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(VisorIgfsProfilerEntry.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerTask.java
deleted file mode 100644
index a6db72d..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerTask.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.*;
-import org.apache.ignite.igfs.*;
-import org.apache.ignite.internal.processors.task.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.visor.*;
-
-import java.io.*;
-import java.nio.charset.*;
-import java.nio.file.*;
-import java.util.*;
-
-import static org.apache.ignite.internal.igfs.common.IgfsLogger.*;
-import static org.apache.ignite.internal.visor.util.VisorTaskUtils.*;
-
-/**
- * Task that parse hadoop profiler logs.
- */
-@GridInternal
-public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<VisorIgfsProfilerEntry>> {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Holder class for parsed data.
-     */
-    private static class VisorIgfsProfilerParsedLine {
-        /** Timestamp. */
-        private final long ts;
-
-        /** Log entry type. */
-        private final int entryType;
-
-        /** File path. */
-        private final String path;
-
-        /** File GGFS mode. */
-        private final IgfsMode mode;
-
-        /** Stream ID. */
-        private final long streamId;
-
-        /** Data length. */
-        private final long dataLen;
-
-        /** Overwrite flag. Available only for OPEN_OUT event. */
-        private final boolean overwrite;
-
-        /** Position of data being randomly read or seek. Available only for RANDOM_READ or SEEK events. */
-        private final long pos;
-
-        /** User time. Available only for CLOSE_IN/CLOSE_OUT events. */
-        private final long userTime;
-
-        /** System time (either read or write). Available only for CLOSE_IN/CLOSE_OUT events. */
-        private final long sysTime;
-
-        /** Total amount of read or written bytes. Available only for CLOSE_IN/CLOSE_OUT events.*/
-        private final long totalBytes;
-
-        /**
-         * Create holder for log line.
-         */
-        private VisorIgfsProfilerParsedLine(
-            long ts,
-            int entryType,
-            String path,
-            IgfsMode mode,
-            long streamId,
-            long dataLen,
-            boolean overwrite,
-            long pos,
-            long userTime,
-            long sysTime,
-            long totalBytes
-        ) {
-            this.ts = ts;
-            this.entryType = entryType;
-            this.path = path;
-            this.mode = mode;
-            this.streamId = streamId;
-            this.dataLen = dataLen;
-            this.overwrite = overwrite;
-            this.pos = pos;
-            this.userTime = userTime;
-            this.sysTime = sysTime;
-            this.totalBytes = totalBytes;
-        }
-    }
-
-    /**
-     * Comparator to sort parsed log lines by timestamp.
-     */
-    private static final Comparator<VisorIgfsProfilerParsedLine> PARSED_LINE_BY_TS_COMPARATOR =
-        new Comparator<VisorIgfsProfilerParsedLine>() {
-            @Override public int compare(VisorIgfsProfilerParsedLine a, VisorIgfsProfilerParsedLine b) {
-                return a.ts < b.ts ? -1
-                    : a.ts > b.ts ? 1
-                    : 0;
-            }
-    };
-
-    /**
-     * Job that do actual profiler work.
-     */
-    private static class VisorIgfsProfilerJob extends VisorJob<String, Collection<VisorIgfsProfilerEntry>> {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        // Named column indexes in log file.
-        private static final int LOG_COL_TIMESTAMP = 0;
-        private static final int LOG_COL_THREAD_ID = 1;
-        private static final int LOG_COL_ENTRY_TYPE = 3;
-        private static final int LOG_COL_PATH = 4;
-        private static final int LOG_COL_GGFS_MODE = 5;
-        private static final int LOG_COL_STREAM_ID = 6;
-        private static final int LOG_COL_DATA_LEN = 8;
-        private static final int LOG_COL_OVERWRITE = 10;
-        private static final int LOG_COL_POS = 13;
-        private static final int LOG_COL_USER_TIME = 17;
-        private static final int LOG_COL_SYSTEM_TIME = 18;
-        private static final int LOG_COL_TOTAL_BYTES = 19;
-
-        /** List of log entries that should be parsed. */
-        private static final Set<Integer> LOG_TYPES = F.asSet(
-            TYPE_OPEN_IN,
-            TYPE_OPEN_OUT,
-            TYPE_RANDOM_READ,
-            TYPE_CLOSE_IN,
-            TYPE_CLOSE_OUT
-        );
-
-        /**
-         * Create job with given argument.
-         *
-         * @param arg GGFS name.
-         * @param debug Debug flag.
-         */
-        private VisorIgfsProfilerJob(String arg, boolean debug) {
-            super(arg, debug);
-        }
-
-        /** {@inheritDoc} */
-        @Override protected Collection<VisorIgfsProfilerEntry> run(String arg) {
-            try {
-                Path logsDir = resolveIgfsProfilerLogsDir(ignite.fileSystem(arg));
-
-                if (logsDir != null)
-                    return parse(logsDir, arg);
-                else
-                    return Collections.emptyList();
-            }
-            catch (IOException | IllegalArgumentException e) {
-                throw new IgniteException("Failed to parse profiler logs for GGFS: " + arg, e);
-            }
-            catch (IgniteCheckedException e) {
-                throw U.convertException(e);
-            }
-        }
-
-        /**
-         * Parse boolean.
-         *
-         * @param ss Array of source strings.
-         * @param ix Index of array item to parse.
-         * @return Parsed boolean.
-         */
-        private boolean parseBoolean(String[] ss, int ix) {
-            return ix < ss.length && "1".equals(ss[ix]);
-        }
-
-        /**
-         * Parse integer.
-         *
-         * @param ss Array of source strings.
-         * @param ix Index of array item to parse.
-         * @param dflt Default value if string is empty or index is out of array bounds.
-         * @return Parsed integer.
-         * @exception NumberFormatException  if the string does not contain a parsable integer.
-         */
-        private int parseInt(String[] ss, int ix, int dflt) {
-            if (ss.length <= ix)
-                return dflt;
-            else {
-                String s = ss[ix];
-
-                return s.isEmpty() ? dflt : Integer.parseInt(s);
-            }
-        }
-
-        /**
-         * Parse long.
-         *
-         * @param ss Array of source strings.
-         * @param ix Index of array item to parse.
-         * @param dflt Default value if string is empty or index is out of array bounds.
-         * @return Parsed integer.
-         * @exception NumberFormatException if the string does not contain a parsable long.
-         */
-        private long parseLong(String[] ss, int ix, long dflt) {
-            if (ss.length <= ix)
-                return dflt;
-            else {
-                String s = ss[ix];
-
-                return s.isEmpty() ? dflt : Long.parseLong(s);
-            }
-        }
-
-        /**
-         * Parse string.
-         *
-         * @param ss Array of source strings.
-         * @param ix Index of array item to parse.
-         * @return Parsed string.
-         */
-        private String parseString(String[] ss, int ix) {
-            if (ss.length <= ix)
-                return "";
-            else {
-                String s = ss[ix];
-
-                return s.isEmpty() ? "" : s;
-            }
-        }
-
-        /**
-         * Parse GGFS mode from string.
-         *
-         * @param ss Array of source strings.
-         * @param ix Index of array item to parse.
-         * @return Parsed GGFS mode or {@code null} if string is empty.
-         */
-        private IgfsMode parseGgfsMode(String[] ss, int ix) {
-            if (ss.length <= ix)
-                return null;
-            else {
-                String s = ss[ix];
-
-                return s.isEmpty() ? null : IgfsMode.valueOf(s);
-            }
-        }
-
-        /**
-         * Parse line from log.
-         *
-         * @param s Line with text to parse.
-         * @return Parsed data.
-         */
-        private VisorIgfsProfilerParsedLine parseLine(String s) {
-            String[] ss = s.split(DELIM_FIELD);
-
-            long streamId = parseLong(ss, LOG_COL_STREAM_ID, -1);
-
-            if (streamId >= 0) {
-                int entryType = parseInt(ss, LOG_COL_ENTRY_TYPE, -1);
-
-                // Parse only needed types.
-                if (LOG_TYPES.contains(entryType))
-                    return new VisorIgfsProfilerParsedLine(
-                        parseLong(ss, LOG_COL_TIMESTAMP, 0),
-                        entryType,
-                        parseString(ss, LOG_COL_PATH),
-                        parseGgfsMode(ss, LOG_COL_GGFS_MODE),
-                        streamId,
-                        parseLong(ss, LOG_COL_DATA_LEN, 0),
-                        parseBoolean(ss, LOG_COL_OVERWRITE),
-                        parseLong(ss, LOG_COL_POS, 0),
-                        parseLong(ss, LOG_COL_USER_TIME, 0),
-                        parseLong(ss, LOG_COL_SYSTEM_TIME, 0),
-                        parseLong(ss, LOG_COL_TOTAL_BYTES, 0)
-                    );
-            }
-
-            return null;
-        }
-
-        /**
-         * Aggregate information from parsed lines grouped by {@code streamId}.
-         */
-        private VisorIgfsProfilerEntry aggregateParsedLines(List<VisorIgfsProfilerParsedLine> lines) {
-            VisorIgfsProfilerUniformityCounters counters = new VisorIgfsProfilerUniformityCounters();
-
-            Collections.sort(lines, PARSED_LINE_BY_TS_COMPARATOR);
-
-            String path = "";
-            long ts = 0;
-            long size = 0;
-            long bytesRead = 0;
-            long readTime = 0;
-            long userReadTime = 0;
-            long bytesWritten = 0;
-            long writeTime = 0;
-            long userWriteTime = 0;
-            IgfsMode mode = null;
-
-            for (VisorIgfsProfilerParsedLine line : lines) {
-                if (!line.path.isEmpty())
-                    path = line.path;
-
-                ts = line.ts; // Remember last timestamp.
-
-                // Remember last GGFS mode.
-                if (line.mode != null)
-                    mode = line.mode;
-
-                switch (line.entryType) {
-                    case TYPE_OPEN_IN:
-                        size = line.dataLen; // Remember last file size.
-
-                        counters.invalidate(size);
-                        break;
-
-                    case TYPE_OPEN_OUT:
-                        if (line.overwrite) {
-                            size = 0; // If file was overridden, set size to zero.
-
-                            counters.invalidate(size);
-                        }
-                        break;
-
-                    case TYPE_CLOSE_IN:
-                        bytesRead += line.totalBytes; // Add to total bytes read.
-                        readTime += line.sysTime; // Add to read time.
-                        userReadTime += line.userTime; // Add to user read time.
-
-                        counters.increment(line.pos, line.totalBytes);
-
-                        break;
-
-                    case TYPE_CLOSE_OUT:
-                        size += line.totalBytes; // Add to files size.
-                        bytesWritten += line.totalBytes; // Add to total bytes written.
-                        writeTime += line.sysTime; // Add to write time.
-                        userWriteTime += line.userTime; // Add to user write time.
-
-                        counters.invalidate(size);
-
-                        break;
-
-                    case TYPE_RANDOM_READ:
-                        counters.increment(line.pos, line.totalBytes);
-
-                        break;
-
-                    default:
-                        throw new IllegalStateException("Unexpected GGFS profiler log entry type: " + line.entryType);
-                }
-            }
-
-            // Return only fully parsed data with path.
-            return path.isEmpty() ? null :
-                new VisorIgfsProfilerEntry(
-                    path,
-                    ts,
-                    mode,
-                    size,
-                    bytesRead,
-                    readTime,
-                    userReadTime,
-                    bytesWritten,
-                    writeTime,
-                    userWriteTime,
-                    counters);
-        }
-
-        /**
-         * @param p Path to log file to parse.
-         * @return Collection of parsed and aggregated entries.
-         * @throws IOException if failed to read log file.
-         */
-        private Collection<VisorIgfsProfilerEntry> parseFile(Path p) throws IOException {
-            Collection<VisorIgfsProfilerParsedLine> parsedLines = new ArrayList<>(512);
-
-            try (BufferedReader br = Files.newBufferedReader(p, Charset.forName("UTF-8"))) {
-                String line = br.readLine(); // Skip first line with columns header.
-
-                if (line != null) {
-                    // Check file header.
-                    if (line.equalsIgnoreCase(HDR))
-                        line = br.readLine();
-
-                        while (line != null) {
-                            try {
-                                VisorIgfsProfilerParsedLine ln = parseLine(line);
-
-                                if (ln != null)
-                                    parsedLines.add(ln);
-                            }
-                            catch (NumberFormatException ignored) {
-                                // Skip invalid lines.
-                            }
-
-                            line = br.readLine();
-                        }
-                }
-            }
-
-            // Group parsed lines by streamId.
-            Map<Long, List<VisorIgfsProfilerParsedLine>> byStreamId = new HashMap<>();
-
-            for (VisorIgfsProfilerParsedLine line: parsedLines) {
-                List<VisorIgfsProfilerParsedLine> grp = byStreamId.get(line.streamId);
-
-                if (grp == null) {
-                    grp = new ArrayList<>();
-
-                    byStreamId.put(line.streamId, grp);
-                }
-
-                grp.add(line);
-            }
-
-            // Aggregate each group.
-            Collection<VisorIgfsProfilerEntry> entries = new ArrayList<>(byStreamId.size());
-
-            for (List<VisorIgfsProfilerParsedLine> lines : byStreamId.values()) {
-                VisorIgfsProfilerEntry entry = aggregateParsedLines(lines);
-
-                if (entry != null)
-                    entries.add(entry);
-            }
-
-            // Group by files.
-            Map<String, List<VisorIgfsProfilerEntry>> byPath = new HashMap<>();
-
-            for (VisorIgfsProfilerEntry entry: entries) {
-                List<VisorIgfsProfilerEntry> grp = byPath.get(entry.path());
-
-                if (grp == null) {
-                    grp = new ArrayList<>();
-
-                    byPath.put(entry.path(), grp);
-                }
-
-                grp.add(entry);
-            }
-
-            // Aggregate by files.
-            Collection<VisorIgfsProfilerEntry> res = new ArrayList<>(byPath.size());
-
-            for (List<VisorIgfsProfilerEntry> lst : byPath.values())
-                res.add(VisorIgfsProfiler.aggregateGgfsProfilerEntries(lst));
-
-            return res;
-        }
-
-        /**
-         * Parse all GGFS log files in specified log directory.
-         *
-         * @param logDir Folder were log files located.
-         * @return List of line with aggregated information by files.
-         */
-        private Collection<VisorIgfsProfilerEntry> parse(Path logDir, String ggfsName) throws IOException {
-            Collection<VisorIgfsProfilerEntry> parsedFiles = new ArrayList<>(512);
-
-            try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(logDir)) {
-                PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:igfs-log-" + ggfsName + "-*.csv");
-
-                for (Path p : dirStream) {
-                    if (matcher.matches(p.getFileName())) {
-                        try {
-                            parsedFiles.addAll(parseFile(p));
-                        }
-                        catch (NoSuchFileException ignored) {
-                            // Files was deleted, skip it.
-                        }
-                        catch (Exception e) {
-                            ignite.log().warning("Failed to parse GGFS profiler log file: " + p, e);
-                        }
-                    }
-                }
-            }
-
-            return parsedFiles;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorIgfsProfilerJob.class, this);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected VisorIgfsProfilerJob job(String arg) {
-        return new VisorIgfsProfilerJob(arg, debug);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerUniformityCounters.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerUniformityCounters.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerUniformityCounters.java
deleted file mode 100644
index 228e81f..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsProfilerUniformityCounters.java
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.internal.util.typedef.*;
-
-import java.io.*;
-import java.util.*;
-
-import static org.apache.ignite.internal.visor.ggfs.VisorIgfsProfiler.*;
-
-/**
- * Class to support uniformity calculation.
- *
- * <a href="http://en.wikipedia.org/wiki/Coefficient_of_variation">
- * Uniformity calculated as coefficient of variation.
- * </a>
- *
- * Count read frequency for each file and compare with ideal uniform distribution.
- */
-public class VisorIgfsProfilerUniformityCounters implements Serializable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Analyzed file size in bytes. */
-    private long fileSize = 0;
-
-    /** Current block size to calculate uniformity. */
-    private long blockSize = UNIFORMITY_DFLT_BLOCK_SIZE;
-
-    private ArrayList<Integer> counters = new ArrayList<>();
-
-    private long calcBlockSize(long fileSize) {
-        return Math.max(UNIFORMITY_DFLT_BLOCK_SIZE, fileSize / UNIFORMITY_BLOCKS);
-    }
-
-    /**
-     * Check if counters and blockSize should be adjusted according to file size.
-     *
-     * @param newFileSize New size of file.
-     */
-    public void invalidate(long newFileSize) {
-        if (newFileSize < fileSize) { // If newFileSize is less than current fileSize then clear counters.
-            fileSize = newFileSize;
-
-            counters.clear();
-
-            blockSize = calcBlockSize(fileSize);
-        }
-        else if (newFileSize > fileSize) // If newFileSize is bigger then current fileSize then adjust counters and blockSize.
-            compact(newFileSize);
-    }
-
-    /**
-     * Perform compacting counters if {@code newBlockSize} is great more than twice then compact previous counters.
-     *
-     * @param newFileSize New file size to check.
-     */
-    private void compact(long newFileSize) {
-        long newBlockSize = calcBlockSize(newFileSize);
-
-        if (counters.isEmpty())
-            blockSize = newBlockSize;
-        else {
-            if (newBlockSize >= 2 * blockSize) {
-                int ratio = (int)(newBlockSize / blockSize);
-
-                ArrayList<Integer> compacted = new ArrayList<>();
-
-                int sum = 0;
-                int cnt = 0;
-
-                for (Integer counter : counters) {
-                    sum += counter;
-                    cnt++;
-
-                    if (cnt >= ratio) {
-                        compacted.add(sum);
-
-                        sum = 0;
-                        cnt = 0;
-                    }
-                }
-
-                if (sum > 0)
-                    compacted.add(sum);
-
-                counters.clear();
-                counters.addAll(compacted);
-
-                blockSize = newBlockSize;
-            }
-        }
-
-        fileSize = newFileSize;
-    }
-
-    /**
-     * Ensure counters capacity and initial state.
-     *
-     * @param minCapacity Desired minimum capacity.
-     */
-    private void capacity(int minCapacity) {
-        counters.ensureCapacity(minCapacity);
-
-        while(counters.size() < minCapacity)
-            counters.add(0);
-    }
-
-    /**
-     * Increment counters by given pos and length.
-     *
-     * @param pos Position in file.
-     * @param len Read data length.
-     */
-    public void increment(long pos, long len) {
-        int blockFrom = (int)(pos / blockSize);
-        int blockTo = (int)((pos + len) / blockSize) + 1;
-
-        capacity(blockTo);
-
-        for (int i = blockFrom; i < blockTo; i++)
-            counters.set(i, counters.get(i) + 1);
-    }
-
-    /**
-     * Add given counters.
-     *
-     * @param other Counters to add.
-     */
-    public void aggregate(VisorIgfsProfilerUniformityCounters other) {
-        if (fileSize < other.fileSize)
-            compact(other.fileSize);
-        else if (fileSize > other.fileSize)
-            other.compact(fileSize);
-
-        int cnt = other.counters.size();
-
-        if (counters.size() < cnt)
-            capacity(cnt);
-
-        for (int i = 0; i < cnt; i++)
-            counters.set(i, counters.get(i) + other.counters.get(i));
-    }
-
-    /**
-     * Calculate uniformity as standard deviation.
-     * See: http://en.wikipedia.org/wiki/Standard_deviation.
-     *
-     * @return Uniformity value as number in {@code 0..1} range.
-     */
-    public double calc() {
-        if (counters.isEmpty())
-            return -1;
-        else {
-            int cap = (int) (fileSize / blockSize + (fileSize % blockSize > 0 ? 1 : 0));
-
-            capacity(cap);
-
-            int sz = counters.size();
-
-            int n = F.sumInt(counters);
-
-            double mean = 1.0 / sz;
-
-            // Calc standard deviation for block read frequency: SQRT(SUM(Freq_i - Mean)^2 / K)
-            // where Mean = 1 / K
-            //       K - Number of blocks
-            //       Freq_i = Counter_i / N
-            //       N - Sum of all counters
-            double sigma = 0;
-
-            for (Integer counter : counters)
-                sigma += Math.pow(counter.doubleValue() / n - mean, 2);
-
-            sigma = Math.sqrt(sigma / sz);
-
-            // Calc uniformity coefficient.
-            return 1.0 - sigma;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsResetMetricsTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsResetMetricsTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsResetMetricsTask.java
deleted file mode 100644
index 0cd5b4d..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsResetMetricsTask.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.task.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.visor.*;
-
-import java.util.*;
-
-/**
- * Resets GGFS metrics.
- */
-@GridInternal
-public class VisorIgfsResetMetricsTask extends VisorOneNodeTask<Set<String>, Void> {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** {@inheritDoc} */
-    @Override protected VisorIgfsResetMetricsJob job(Set<String> arg) {
-        return new VisorIgfsResetMetricsJob(arg, debug);
-    }
-
-    /**
-     * Job that reset GGFS metrics.
-     */
-    private static class VisorIgfsResetMetricsJob extends VisorJob<Set<String>, Void> {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /**
-         * @param arg GGFS names.
-         * @param debug Debug flag.
-         */
-        private VisorIgfsResetMetricsJob(Set<String> arg, boolean debug) {
-            super(arg, debug);
-        }
-
-        /** {@inheritDoc} */
-        @Override protected Void run(Set<String> ggfsNames) {
-            for (String ggfsName: ggfsNames)
-                try {
-                    ignite.fileSystem(ggfsName).resetMetrics();
-                }
-                catch (IllegalArgumentException iae) {
-                    throw new IgniteException("Failed to reset metrics for GGFS: " + ggfsName, iae);
-                }
-
-            return null;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorIgfsResetMetricsJob.class, this);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsSamplingStateTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsSamplingStateTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsSamplingStateTask.java
deleted file mode 100644
index 4229988..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/ggfs/VisorIgfsSamplingStateTask.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * 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.ggfs;
-
-import org.apache.ignite.*;
-import org.apache.ignite.internal.processors.igfs.*;
-import org.apache.ignite.internal.processors.task.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.internal.visor.*;
-import org.apache.ignite.lang.*;
-
-/**
- * Task to set GGFS instance sampling state.
- */
-@GridInternal
-public class VisorIgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<String, Boolean>, Void> {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /**
-     * Job that perform parsing of GGFS profiler logs.
-     */
-    private static class VisorIgfsSamplingStateJob extends VisorJob<IgniteBiTuple<String, Boolean>, Void> {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /**
-         * Create job with given argument.
-         *
-         * @param arg Job argument.
-         * @param debug Debug flag.
-         */
-        public VisorIgfsSamplingStateJob(IgniteBiTuple<String, Boolean> arg, boolean debug) {
-            super(arg, debug);
-        }
-
-        /** {@inheritDoc} */
-        @Override protected Void run(IgniteBiTuple<String, Boolean> arg) {
-            try {
-                ((IgfsEx)ignite.fileSystem(arg.get1())).globalSampling(arg.get2());
-
-                return null;
-            }
-            catch (IllegalArgumentException iae) {
-                throw new IgniteException("Failed to set sampling state for GGFS: " + arg.get1(), iae);
-            }
-            catch(IgniteCheckedException e) {
-                throw U.convertException(e);
-            }
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorIgfsSamplingStateJob.class, this);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected VisorIgfsSamplingStateJob job(IgniteBiTuple<String, Boolean> arg) {
-        return new VisorIgfsSamplingStateJob(arg, debug);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
new file mode 100644
index 0000000..aa6e06e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
@@ -0,0 +1,113 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.igfs.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+
+import java.io.*;
+
+/**
+ * Data transfer object for {@link org.apache.ignite.IgniteFs}.
+ */
+public class VisorIgfs implements Serializable {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** GGFS instance name. */
+    private final String name;
+
+    /** GGFS instance working mode. */
+    private final IgfsMode mode;
+
+    /** GGFS metrics. */
+    private final VisorIgfsMetrics metrics;
+
+    /** Whether GGFS has configured secondary file system. */
+    private final boolean secondaryFsConfigured;
+
+    /**
+     * Create data transfer object.
+     *
+     * @param name GGFS name.
+     * @param mode GGFS mode.
+     * @param metrics GGFS metrics.
+     * @param secondaryFsConfigured Whether GGFS has configured secondary file system.
+     */
+    public VisorIgfs(
+        String name,
+        IgfsMode mode,
+        VisorIgfsMetrics metrics,
+        boolean secondaryFsConfigured
+    ) {
+        this.name = name;
+        this.mode = mode;
+        this.metrics = metrics;
+        this.secondaryFsConfigured = secondaryFsConfigured;
+    }
+
+    /**
+     * @param ggfs Source GGFS.
+     * @return Data transfer object for given GGFS.
+     * @throws IgniteCheckedException
+     */
+    public static VisorIgfs from(IgniteFs ggfs) throws IgniteCheckedException {
+        assert ggfs != null;
+
+        return new VisorIgfs(
+            ggfs.name(),
+            ggfs.configuration().getDefaultMode(),
+            VisorIgfsMetrics.from(ggfs.metrics()),
+            ggfs.configuration().getSecondaryFileSystem() != null
+        );
+    }
+
+    /**
+     * @return GGFS instance name.
+     */
+    public String name() {
+        return name;
+    }
+
+    /**
+     * @return GGFS instance working mode.
+     */
+    public IgfsMode mode() {
+        return mode;
+    }
+
+    /**
+     * @return GGFS metrics.
+     */
+    public VisorIgfsMetrics metrics() {
+        return metrics;
+    }
+
+    /**
+     * @return Whether GGFS has configured secondary file system.
+     */
+    public boolean secondaryFileSystemConfigured() {
+        return secondaryFsConfigured;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorIgfs.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
new file mode 100644
index 0000000..557c966
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
@@ -0,0 +1,106 @@
+/*
+ * 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 org.apache.ignite.internal.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.io.*;
+
+/**
+ * GGFS endpoint descriptor.
+ */
+public class VisorIgfsEndpoint implements Serializable{
+    /** */
+    private static final long  serialVersionUID = 0L;
+
+    /** GGFS name. */
+    private final String ggfsName;
+
+    /** Grid name. */
+    private final String gridName;
+
+    /** Host address / name. */
+    private final String hostName;
+
+    /** Port number. */
+    private final int port;
+
+    /**
+     * Create GGFS endpoint descriptor with given parameters.
+     * @param ggfsName GGFS name.
+     * @param gridName Grid name.
+     * @param hostName Host address / name.
+     * @param port Port number.
+     */
+    public VisorIgfsEndpoint(@Nullable String ggfsName, String gridName, @Nullable String hostName, int port) {
+        this.ggfsName = ggfsName;
+        this.gridName = gridName;
+        this.hostName = hostName;
+        this.port = port;
+    }
+
+    /**
+     * @return GGFS name.
+     */
+    @Nullable public String ggfsName() {
+        return ggfsName;
+    }
+
+    /**
+     * @return Grid name.
+     */
+    public String gridName() {
+        return gridName;
+    }
+
+    /**
+     * @return Host address / name.
+     */
+    @Nullable public String hostName() {
+        return hostName;
+    }
+
+    /**
+     * @return Port number.
+     */
+    public int port() {
+        return port;
+    }
+
+    /**
+     * @return URI Authority
+     */
+    public String authority() {
+        String addr = hostName + ":" + port;
+
+        if (ggfsName == null && gridName == null)
+            return addr;
+        else if (ggfsName == null)
+            return gridName + "@" + addr;
+        else if (gridName == null)
+            return ggfsName + "@" + addr;
+        else
+            return ggfsName + ":" + gridName + "@" + addr;
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorIgfsEndpoint.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/9b49a585/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
new file mode 100644
index 0000000..8c4e39f
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsFormatTask.java
@@ -0,0 +1,70 @@
+/*
+ * 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 org.apache.ignite.*;
+import org.apache.ignite.internal.processors.task.*;
+import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.internal.visor.*;
+
+/**
+ * Format GGFS instance.
+ */
+@GridInternal
+public class VisorIgfsFormatTask extends VisorOneNodeTask<String, Void> {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** {@inheritDoc} */
+    @Override protected VisorIgfsFormatJob job(String arg) {
+        return new VisorIgfsFormatJob(arg, debug);
+    }
+
+    /**
+     * Job that format GGFS.
+     */
+    private static class VisorIgfsFormatJob extends VisorJob<String, Void> {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /**
+         * @param arg GGFS name to format.
+         * @param debug Debug flag.
+         */
+        private VisorIgfsFormatJob(String arg, boolean debug) {
+            super(arg, debug);
+        }
+
+        /** {@inheritDoc} */
+        @Override protected Void run(String ggfsName) {
+            try {
+                ignite.fileSystem(ggfsName).format();
+            }
+            catch (IllegalArgumentException iae) {
+                throw new IgniteException("Failed to format IgniteFs: " + ggfsName, iae);
+            }
+
+            return null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return S.toString(VisorIgfsFormatJob.class, this);
+        }
+    }
+}


Mime
View raw message