You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2020/07/23 07:36:15 UTC

[ignite] branch master updated: IGNITE-13262 Cleanup duplicated code. Refactored to IgniteLogger. Cleanup self references in IgniteUtils. - Fixes #8044.

This is an automated email from the ASF dual-hosted git repository.

akuznetsov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new 83de845  IGNITE-13262 Cleanup duplicated code. Refactored to IgniteLogger. Cleanup self references in IgniteUtils. - Fixes #8044.
83de845 is described below

commit 83de845a21200b4fc786eb7ecf943a5114393bdf
Author: Alexey Kuznetsov <ak...@apache.org>
AuthorDate: Thu Jul 23 14:35:44 2020 +0700

    IGNITE-13262 Cleanup duplicated code. Refactored to IgniteLogger. Cleanup self references in IgniteUtils. - Fixes #8044.
    
    Signed-off-by: Alexey Kuznetsov <ak...@apache.org>
---
 .../GridClientConnectionManagerAdapter.java        | 39 ++++++-----
 .../client/impl/connection/GridClientTopology.java |  7 +-
 .../client/util/GridClientStripedLock.java         |  5 +-
 .../internal/client/util/GridClientUtils.java      | 45 -------------
 .../apache/ignite/internal/util/IgniteUtils.java   | 75 +++++++++++-----------
 5 files changed, 62 insertions(+), 109 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
index 6fde7ad..c599b01 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientConnectionManagerAdapter.java
@@ -33,7 +33,6 @@ import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
-import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.net.ssl.SSLContext;
 import org.apache.ignite.IgniteCheckedException;
@@ -51,7 +50,6 @@ import org.apache.ignite.internal.client.impl.GridClientThreadFactory;
 import org.apache.ignite.internal.client.marshaller.GridClientMarshaller;
 import org.apache.ignite.internal.client.marshaller.optimized.GridClientZipOptimizedMarshaller;
 import org.apache.ignite.internal.client.util.GridClientStripedLock;
-import org.apache.ignite.internal.client.util.GridClientUtils;
 import org.apache.ignite.internal.processors.rest.client.message.GridClientHandshakeResponse;
 import org.apache.ignite.internal.processors.rest.client.message.GridClientMessage;
 import org.apache.ignite.internal.processors.rest.client.message.GridClientPingPacket;
@@ -68,7 +66,6 @@ import org.apache.ignite.logger.java.JavaLogger;
 import org.apache.ignite.plugin.security.SecurityCredentials;
 import org.jetbrains.annotations.Nullable;
 
-import static java.util.logging.Level.INFO;
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS;
 import static org.apache.ignite.internal.client.impl.connection.GridClientConnectionCloseReason.CLIENT_CLOSED;
 import static org.apache.ignite.internal.client.impl.connection.GridClientConnectionCloseReason.FAILED;
@@ -84,7 +81,7 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
     private static final int INIT_RETRY_INTERVAL = 1000;
 
     /** Class logger. */
-    private final Logger log;
+    private final IgniteLogger log;
 
     /** All local enabled MACs. */
     private final Collection<String> macs;
@@ -157,7 +154,7 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
         this.routers = new ArrayList<>(routers);
         this.top = top;
 
-        log = Logger.getLogger(getClass().getName());
+        log = new JavaLogger(Logger.getLogger(getClass().getName()));
 
         executor = cfg.getExecutorService() != null ? cfg.getExecutorService() :
             Executors.newCachedThreadPool(new GridClientThreadFactory("exec", true));
@@ -412,7 +409,7 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
             catch (Exception e) {
                 if (cause == null)
                     cause = e;
-                else if (log.isLoggable(INFO))
+                else if (log.isInfoEnabled())
                     log.info("Unable to connect to grid node [srvAddr=" + srv + ", msg=" + e.getMessage() + ']');
             }
         }
@@ -509,8 +506,8 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
 
     /** {@inheritDoc} */
     @Override public void terminateConnection(GridClientConnection conn, GridClientNode node, Throwable e) {
-        if (log.isLoggable(Level.FINE))
-            log.fine("Connection with remote node was terminated [node=" + node + ", srvAddr=" +
+        if (log.isDebugEnabled())
+            log.debug("Connection with remote node was terminated [node=" + node + ", srvAddr=" +
                 conn.serverAddress() + ", errMsg=" + e.getMessage() + ']');
 
         closeIdle();
@@ -545,9 +542,9 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
             conn.close(CLIENT_CLOSED, waitCompletion);
 
         if (pingExecutor != null)
-            GridClientUtils.shutdownNow(GridClientConnectionManager.class, pingExecutor, log);
+            U.shutdownNow(GridClientConnectionManager.class, pingExecutor, log);
 
-        GridClientUtils.shutdownNow(GridClientConnectionManager.class, executor, log);
+        U.shutdownNow(GridClientConnectionManager.class, executor, log);
 
         if (srv != null)
             srv.stop();
@@ -590,25 +587,25 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
      */
     private static class NioListener implements GridNioServerListener {
         /** */
-        private final Logger log;
+        private final IgniteLogger log;
 
         /**
          * @param log Logger.
          */
-        private NioListener(Logger log) {
+        private NioListener(IgniteLogger log) {
             this.log = log;
         }
 
         /** {@inheritDoc} */
         @Override public void onConnected(GridNioSession ses) {
-            if (log.isLoggable(Level.FINE))
-                log.fine("Session connected: " + ses);
+            if (log.isDebugEnabled())
+                log.debug("Session connected: " + ses);
         }
 
         /** {@inheritDoc} */
         @Override public void onDisconnected(GridNioSession ses, @Nullable Exception e) {
-            if (log.isLoggable(Level.FINE))
-                log.fine("Session disconnected: " + ses);
+            if (log.isDebugEnabled())
+                log.debug("Session disconnected: " + ses);
 
             GridClientFutureAdapter<Boolean> handshakeFut =
                 ses.removeMeta(GridClientNioTcpConnection.SES_META_HANDSHAKE);
@@ -651,7 +648,7 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
                         conn.handleResponse((GridClientMessage)msg);
                     }
                     catch (IOException e) {
-                        log.log(Level.SEVERE, "Failed to parse response.", e);
+                        log.error("Failed to parse response.", e);
                     }
                 }
             }
@@ -682,16 +679,16 @@ public abstract class GridClientConnectionManagerAdapter implements GridClientCo
 
         /** {@inheritDoc} */
         @Override public void onSessionWriteTimeout(GridNioSession ses) {
-            if (log.isLoggable(Level.FINE))
-                log.fine("Closing NIO session because of write timeout.");
+            if (log.isDebugEnabled())
+                log.debug("Closing NIO session because of write timeout.");
 
             ses.close();
         }
 
         /** {@inheritDoc} */
         @Override public void onSessionIdleTimeout(GridNioSession ses) {
-            if (log.isLoggable(Level.FINE))
-                log.fine("Closing NIO session because of idle timeout.");
+            if (log.isDebugEnabled())
+                log.debug("Closing NIO session because of idle timeout.");
 
             ses.close();
         }
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientTopology.java b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientTopology.java
index c537f17..04bf7de 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientTopology.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/impl/connection/GridClientTopology.java
@@ -32,6 +32,7 @@ import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.logging.Logger;
+import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.client.GridClientConfiguration;
 import org.apache.ignite.internal.client.GridClientDisconnectedException;
 import org.apache.ignite.internal.client.GridClientException;
@@ -40,10 +41,10 @@ import org.apache.ignite.internal.client.GridClientProtocol;
 import org.apache.ignite.internal.client.GridClientTopologyListener;
 import org.apache.ignite.internal.client.impl.GridClientNodeImpl;
 import org.apache.ignite.internal.client.impl.GridClientThreadFactory;
-import org.apache.ignite.internal.client.util.GridClientUtils;
 import org.apache.ignite.internal.util.typedef.C1;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.logger.java.JavaLogger;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS;
@@ -53,7 +54,7 @@ import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MACS;
  */
 public class GridClientTopology {
     /** Logger. */
-    private static final Logger log = Logger.getLogger(GridClientTopology.class.getName());
+    private static final IgniteLogger log = new JavaLogger(Logger.getLogger(GridClientTopology.class.getName()));
 
     /** Topology cache */
     private Map<UUID, GridClientNodeImpl> nodes = Collections.emptyMap();
@@ -412,7 +413,7 @@ public class GridClientTopology {
      * Shutdowns executor service that performs listener notification.
      */
     public void shutdown() {
-        GridClientUtils.shutdownNow(GridClientTopology.class, exec, log);
+        U.shutdownNow(GridClientTopology.class, exec, log);
     }
 
     /**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientStripedLock.java b/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientStripedLock.java
index 0e617d2..cea9f23 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientStripedLock.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientStripedLock.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.client.util;
 
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
+import org.apache.ignite.internal.util.typedef.internal.U;
 
 /**
  * This is an utility class for 'splitting' locking of some
@@ -58,7 +59,7 @@ public class GridClientStripedLock {
      * @return Lock.
      */
     public Lock getLock(int key) {
-        return locks[GridClientUtils.safeAbs(key) % locks.length];
+        return locks[U.safeAbs(key) % locks.length];
     }
 
     /**
@@ -67,7 +68,7 @@ public class GridClientStripedLock {
      * @return Lock.
      */
     public Lock getLock(long key) {
-        return locks[GridClientUtils.safeAbs((int)(key % locks.length))];
+        return locks[U.safeAbs((int)(key % locks.length))];
     }
 
     /**
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientUtils.java
index 3e922d2..5e50fd4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/client/util/GridClientUtils.java
@@ -22,11 +22,7 @@ import java.io.IOException;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.LinkedList;
-import java.util.List;
 import java.util.UUID;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Logger;
 import org.apache.ignite.internal.IgniteFeatures;
 import org.apache.ignite.internal.IgniteNodeAttributes;
 import org.apache.ignite.internal.client.GridClient;
@@ -130,35 +126,6 @@ public abstract class GridClientUtils {
     }
 
     /**
-     * Shutdowns given {@code ExecutorService} and wait for executor service to stop.
-     *
-     * @param owner The ExecutorService owner.
-     * @param exec ExecutorService to shutdown.
-     * @param log The logger to possible exceptions and warnings.
-     */
-    public static void shutdownNow(Class<?> owner, ExecutorService exec, Logger log) {
-        if (exec != null) {
-            List<Runnable> tasks = exec.shutdownNow();
-
-            if (!tasks.isEmpty())
-                log.warning("Runnable tasks outlived thread pool executor service [owner=" + getSimpleName(owner) +
-                    ", tasks=" + tasks + ']');
-
-            try {
-                exec.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS);
-            }
-            catch (InterruptedException ignored) {
-                log.warning("Got interrupted while waiting for executor service to stop.");
-
-                exec.shutdownNow();
-
-                // Preserve interrupt status.
-                Thread.currentThread().interrupt();
-            }
-        }
-    }
-
-    /**
      * Gets simple class name taking care of empty names.
      *
      * @param cls Class to get the name for.
@@ -169,18 +136,6 @@ public abstract class GridClientUtils {
     }
 
     /**
-     * Gets absolute value for integer. If integer is {@link Integer#MIN_VALUE}, then {@code 0} is returned.
-     *
-     * @param i Integer.
-     * @return Absolute value.
-     */
-    public static int safeAbs(int i) {
-        i = Math.abs(i);
-
-        return i < 0 ? 0 : i;
-    }
-
-    /**
      * Checks that all cluster nodes support specified feature.
      *
      * @param client Client.
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index a23daf3..92e1b1b 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -242,7 +242,6 @@ import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.X;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.internal.util.worker.GridWorker;
 import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteClosure;
@@ -1205,7 +1204,7 @@ public abstract class IgniteUtils {
      * @return {@code True} if ordering is supported.
      */
     public static boolean discoOrdered(DiscoverySpi discoSpi) {
-        DiscoverySpiOrderSupport ann = U.getAnnotation(discoSpi.getClass(), DiscoverySpiOrderSupport.class);
+        DiscoverySpiOrderSupport ann = getAnnotation(discoSpi.getClass(), DiscoverySpiOrderSupport.class);
 
         return ann != null && ann.value();
     }
@@ -1282,7 +1281,7 @@ public abstract class IgniteUtils {
      * @param msg Message.
      */
     public static void dumpStack(@Nullable IgniteLogger log, String msg) {
-        U.error(log, "Dumping stack.", new Exception(msg));
+        error(log, "Dumping stack.", new Exception(msg));
     }
 
     /**
@@ -1459,7 +1458,7 @@ public abstract class IgniteUtils {
             mxBean.dumpAllThreads(mxBean.isObjectMonitorUsageSupported(), mxBean.isSynchronizerUsageSupported());
 
         GridStringBuilder sb = new GridStringBuilder(THREAD_DUMP_MSG)
-            .a(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z").format(new Date(U.currentTimeMillis()))).a(NL);
+            .a(new SimpleDateFormat("yyyy/MM/dd HH:mm:ss z").format(new Date(currentTimeMillis()))).a(NL);
 
         for (ThreadInfo info : threadInfos) {
             printThreadInfo(info, sb, deadlockedThreadsIds);
@@ -1636,12 +1635,12 @@ public abstract class IgniteUtils {
             return cls.getDeclaredConstructor();
         }
         catch (Exception ignore) {
-            Method ctorFac = U.ctorFactory();
-            Object sunRefFac = U.sunReflectionFactory();
+            Method ctorFac = ctorFactory();
+            Object sunRefFac = sunReflectionFactory();
 
             if (ctorFac != null && sunRefFac != null)
                 try {
-                    ctor = (Constructor)ctorFac.invoke(sunRefFac, cls, U.objectConstructor());
+                    ctor = (Constructor)ctorFac.invoke(sunRefFac, cls, objectConstructor());
                 }
                 catch (IllegalAccessException | InvocationTargetException e) {
                     throw new IgniteCheckedException("Failed to get object constructor for class: " + cls, e);
@@ -4004,7 +4003,7 @@ public abstract class IgniteUtils {
             url = new URL(springCfgPath);
         }
         catch (MalformedURLException e) {
-            url = U.resolveIgniteUrl(springCfgPath);
+            url = resolveIgniteUrl(springCfgPath);
 
             if (url == null)
                 url = resolveInClasspath(springCfgPath);
@@ -4720,7 +4719,7 @@ public abstract class IgniteUtils {
      */
     public static void quietAndInfo(IgniteLogger log, String msg) {
         if (log.isQuiet())
-            U.quiet(false, msg);
+            quiet(false, msg);
 
         if (log.isInfoEnabled())
             log.info(msg);
@@ -5052,7 +5051,7 @@ public abstract class IgniteUtils {
             List<Runnable> tasks = exec.shutdownNow();
 
             if (!F.isEmpty(tasks))
-                U.warn(log, "Runnable tasks outlived thread pool executor service [owner=" + getSimpleName(owner) +
+                warn(log, "Runnable tasks outlived thread pool executor service [owner=" + getSimpleName(owner) +
                     ", tasks=" + tasks + ']');
 
             try {
@@ -5545,7 +5544,7 @@ public abstract class IgniteUtils {
         if (size == -1)
             return null;
 
-        HashMap<K, V> map = U.newHashMap(size);
+        HashMap<K, V> map = newHashMap(size);
 
         for (int i = 0; i < size; i++)
             map.put((K)in.readObject(), (V)in.readObject());
@@ -6092,10 +6091,10 @@ public abstract class IgniteUtils {
         if (obj instanceof GridPeerDeployAware)
             return ((GridPeerDeployAware)obj).deployClass();
 
-        if (U.isPrimitiveArray(obj))
+        if (isPrimitiveArray(obj))
             return obj.getClass();
 
-        if (!U.isJdk(obj.getClass()))
+        if (!isJdk(obj.getClass()))
             return obj.getClass();
 
         if (obj instanceof Iterable<?>) {
@@ -6111,7 +6110,7 @@ public abstract class IgniteUtils {
             if (e != null) {
                 Object k = e.getKey();
 
-                if (k != null && !U.isJdk(k.getClass()))
+                if (k != null && !isJdk(k.getClass()))
                     return k.getClass();
 
                 Object v = e.getValue();
@@ -6179,7 +6178,7 @@ public abstract class IgniteUtils {
         if (ldr == null)
             ldr = gridClassLoader;
 
-        String lambdaParent = U.lambdaEnclosingClassName(clsName);
+        String lambdaParent = lambdaEnclosingClassName(clsName);
 
         try {
             ldr.loadClass(lambdaParent == null ? clsName : lambdaParent);
@@ -6337,7 +6336,7 @@ public abstract class IgniteUtils {
         if (obj instanceof Iterable)
             return peerDeployAware0((Iterable)obj);
 
-        if (obj.getClass().isArray() && !U.isPrimitiveArray(obj))
+        if (obj.getClass().isArray() && !isPrimitiveArray(obj))
             return peerDeployAware0((Object[])obj);
 
         return peerDeployAware(obj);
@@ -8059,7 +8058,7 @@ public abstract class IgniteUtils {
                         f.get();
                     }
                     catch (IgniteCheckedException e) {
-                        U.error(log, "Failed to execute future: " + f, e);
+                        error(log, "Failed to execute future: " + f, e);
                     }
                 }
             });
@@ -8741,9 +8740,9 @@ public abstract class IgniteUtils {
         int dot = fileName.lastIndexOf('.');
 
         if (dot < 0 || dot == fileName.length() - 1)
-            return fileName + '-' + U.id8(nodeId);
+            return fileName + '-' + id8(nodeId);
         else
-            return fileName.substring(0, dot) + '-' + U.id8(nodeId) + fileName.substring(dot);
+            return fileName.substring(0, dot) + '-' + id8(nodeId) + fileName.substring(dot);
     }
 
     /**
@@ -8867,7 +8866,7 @@ public abstract class IgniteUtils {
      * @throws ClassNotFoundException If class not found.
      */
     public static Class<?> forName(String clsName, @Nullable ClassLoader ldr) throws ClassNotFoundException {
-        return U.forName(clsName, ldr, null);
+        return forName(clsName, ldr, null);
     }
 
     /**
@@ -9149,7 +9148,7 @@ public abstract class IgniteUtils {
      * @return {@code True} if error is invalid argument error on MAC.
      */
     public static boolean isMacInvalidArgumentError(Exception e) {
-        return U.isMacOs() && e instanceof SocketException && e.getMessage() != null &&
+        return isMacOs() && e instanceof SocketException && e.getMessage() != null &&
             e.getMessage().toLowerCase().contains("invalid argument");
     }
 
@@ -9205,7 +9204,7 @@ public abstract class IgniteUtils {
                     ((LifecycleAware)obj).stop();
                 }
                 catch (Exception e) {
-                    U.error(log, "Failed to stop component (ignoring): " + obj, e);
+                    error(log, "Failed to stop component (ignoring): " + obj, e);
                 }
             }
         }
@@ -9504,7 +9503,7 @@ public abstract class IgniteUtils {
                 File readme = new File(igniteDir, "README.txt");
 
                 if (!readme.exists()) {
-                    U.writeStringToFile(readme,
+                    writeStringToFile(readme,
                         "This is Apache Ignite working directory that contains information that \n" +
                         "    Ignite nodes need in order to function normally.\n" +
                         "Don't delete it unless you're sure you know what you're doing.\n\n" +
@@ -9563,7 +9562,7 @@ public abstract class IgniteUtils {
         }
 
         if (delIfExist && dir.exists()) {
-            if (!U.delete(dir))
+            if (!delete(dir))
                 throw new IgniteCheckedException("Failed to delete directory: " + dir);
         }
 
@@ -10417,7 +10416,7 @@ public abstract class IgniteUtils {
         assert arr != null;
 
         try {
-            return U.unmarshal(ctx.config().getMarshaller(), arr, clsLdr);
+            return unmarshal(ctx.config().getMarshaller(), arr, clsLdr);
         }
         catch (IgniteCheckedException e) {
             throw e;
@@ -10446,7 +10445,7 @@ public abstract class IgniteUtils {
         assert arr != null;
 
         try {
-            return U.unmarshal(ctx.marshaller(), arr, clsLdr);
+            return unmarshal(ctx.marshaller(), arr, clsLdr);
         }
         catch (IgniteCheckedException e) {
             throw e;
@@ -10735,8 +10734,8 @@ public abstract class IgniteUtils {
 
         if (adjustedWalArchiveSize > dsCfg.getMaxWalArchiveSize()) {
             if (log != null)
-                U.quietAndInfo(log, "Automatically adjusted max WAL archive size to " +
-                    U.readableSize(adjustedWalArchiveSize, false) +
+                quietAndInfo(log, "Automatically adjusted max WAL archive size to " +
+                    readableSize(adjustedWalArchiveSize, false) +
                     " (to override, use DataStorageConfiguration.setMaxWalArchiveSize)");
 
             return adjustedWalArchiveSize;
@@ -10785,7 +10784,7 @@ public abstract class IgniteUtils {
                 }
 
                 @Override public FileVisitResult visitFileFailed(Path file, IOException exc) {
-                    U.error(null, "file skipped - " + file, exc);
+                    error(null, "file skipped - " + file, exc);
 
                     // Skip directory or file
                     return FileVisitResult.CONTINUE;
@@ -10793,7 +10792,7 @@ public abstract class IgniteUtils {
 
                 @Override public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
                     if (exc != null)
-                        U.error(null, "error during size calculation of directory - " + dir, exc);
+                        error(null, "error during size calculation of directory - " + dir, exc);
 
                     // Ignoring
                     return FileVisitResult.CONTINUE;
@@ -10826,7 +10825,7 @@ public abstract class IgniteUtils {
                 }
 
                 @Override public FileVisitResult visitFileFailed(Path file, IOException exc) {
-                    U.error(null, "file skipped during recursive search - " + file, exc);
+                    error(null, "file skipped during recursive search - " + file, exc);
 
                     // Ignoring.
                     return FileVisitResult.CONTINUE;
@@ -10834,7 +10833,7 @@ public abstract class IgniteUtils {
 
                 @Override public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
                     if (exc != null)
-                        U.error(null, "error during recursive search - " + dir, exc);
+                        error(null, "error during recursive search - " + dir, exc);
 
                     // Ignoring.
                     return FileVisitResult.CONTINUE;
@@ -11321,7 +11320,7 @@ public abstract class IgniteUtils {
 
         return spi instanceof TcpDiscoverySpi
             ? ((TcpDiscoverySpi)spi).isLocalNodeCoordinator()
-            : F.eq(discoMgr.localNode(), U.oldest(discoMgr.aliveServerNodes(), null));
+            : F.eq(discoMgr.localNode(), oldest(discoMgr.aliveServerNodes(), null));
     }
 
     /**
@@ -11531,7 +11530,7 @@ public abstract class IgniteUtils {
             int cntr = val.get1();
 
             if (cntr == 0)
-                val.set2(U.currentTimeMillis());
+                val.set2(currentTimeMillis());
 
             val.set1(++cntr);
 
@@ -11545,16 +11544,16 @@ public abstract class IgniteUtils {
             int cntr = val.get1();
 
             if (--cntr == 0) {
-                long timeout = U.currentTimeMillis() - val.get2();
+                long timeout = currentTimeMillis() - val.get2();
 
                 if (timeout > readLockThreshold) {
                     GridStringBuilder sb = new GridStringBuilder();
 
                     sb.a(LOCK_HOLD_MESSAGE + timeout + " ms." + nl());
 
-                    U.printStackTrace(Thread.currentThread().getId(), sb);
+                    printStackTrace(Thread.currentThread().getId(), sb);
 
-                    U.warn(log, sb.toString());
+                    warn(log, sb.toString());
                 }
             }
 
@@ -11710,7 +11709,7 @@ public abstract class IgniteUtils {
                 lsnr.accept(t);
             }
             catch (Exception e) {
-                U.warn(log, "Listener error", e);
+                warn(log, "Listener error", e);
             }
         }
     }