ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/9] ignite git commit: ignite-3477 Minor
Date Mon, 30 Jan 2017 17:47:13 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-freelist 260aee1c8 -> a4256544b


ignite-3477 Minor


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

Branch: refs/heads/ignite-3477-freelist
Commit: 9c87affb45da9d41068ea80b58989ac7067ed41b
Parents: ad06102
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Jan 27 16:12:40 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Jan 27 16:12:40 2017 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/internal/IgniteKernal.java | 4 ++++
 .../java/org/apache/ignite/internal/pagemem/PageMemory.java    | 5 +++++
 .../ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java    | 6 ++----
 .../processors/cache/database/freelist/FreeListImpl.java       | 2 +-
 .../internal/processors/cache/database/freelist/PagesList.java | 1 -
 .../internal/processors/cache/database/tree/io/DataPageIO.java | 4 +---
 6 files changed, 13 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9c87affb/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index c280b30..ed75db6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -97,6 +97,7 @@ import org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager;
 import org.apache.ignite.internal.managers.failover.GridFailoverManager;
 import org.apache.ignite.internal.managers.indexing.GridIndexingManager;
 import org.apache.ignite.internal.managers.loadbalancer.GridLoadBalancerManager;
+import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.processors.GridProcessor;
 import org.apache.ignite.internal.processors.affinity.GridAffinityProcessor;
 import org.apache.ignite.internal.processors.cache.GridCacheAdapter;
@@ -1126,6 +1127,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
                                 sysPoolQSize = exec.getQueue().size();
                             }
 
+                            PageMemory pageMem = ctx.cache().context().database().pageMemory();
+
                             String id = U.id8(localNode().id());
 
                             String msg = NL +
@@ -1134,6 +1137,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
                                 "    ^-- H/N/C [hosts=" + hosts + ", nodes=" + nodes + ",
CPUs=" + cpus + "]" + NL +
                                 "    ^-- CPU [cur=" + dblFmt.format(cpuLoadPct) + "%, avg="
+
                                 dblFmt.format(avgCpuLoadPct) + "%, GC=" + dblFmt.format(gcPct)
+ "%]" + NL +
+                                "    ^-- PageMemory [pages=" + pageMem.loadedPages() + "]"
+ NL +
                                 "    ^-- Heap [used=" + dblFmt.format(heapUsedInMBytes) +
"MB, free=" +
                                 dblFmt.format(freeHeapPct) + "%, comm=" + dblFmt.format(heapCommInMBytes)
+ "MB]" + NL +
                                 "    ^-- Non heap [used=" + dblFmt.format(nonHeapUsedInMBytes)
+ "MB, free=" +

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c87affb/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
index 2e427de..6bd2ad0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageMemory.java
@@ -60,4 +60,9 @@ public interface PageMemory extends LifecycleAware, PageIdAllocator {
      * @return Page byte buffer.
      */
     public ByteBuffer pageBuffer(long pageAddr);
+
+    /**
+     * @return Total number of loaded pages in memory.
+     */
+    public long loadedPages();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c87affb/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
index 3bc5241..64b7c64 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
@@ -316,10 +316,8 @@ public class PageMemoryNoStoreImpl implements PageMemory {
         }
     }
 
-    /**
-     * @return Total number of loaded pages in memory.
-     */
-    public long loadedPages() {
+    /** {@inheritDoc} */
+    @Override public long loadedPages() {
         long total = 0;
 
         for (Segment seg : segments) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c87affb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
index 87d5e4d..892c1ec 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
@@ -80,7 +80,7 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList
{
 
                 int rowSize = getRowSize(row);
 
-                boolean updated = io.updateRow(pageAddr, itemId, pageSize(), null, row, getRowSize(row));
+                boolean updated = io.updateRow(pageAddr, itemId, pageSize(), null, row, rowSize);
 
                 if (updated && isWalDeltaRecordNeeded(wal, page)) {
                     // TODO This record must contain only a reference to a logical WAL record
with the actual data.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c87affb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/PagesList.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/PagesList.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/PagesList.java
index e44838d..6ad976e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/PagesList.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/PagesList.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.database.freelist;
 
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;

http://git-wip-us.apache.org/repos/asf/ignite/blob/9c87affb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
index fdb812f..df14dc1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
@@ -452,12 +452,10 @@ public class DataPageIO extends PageIO {
     }
 
     /**
-     * Sets position to start of actual fragment data and limit to it's end.
-     *
      * @param pageAddr Page address.
      * @param itemId Item to position on.
      * @param pageSize Page size.
-     * @return Link to the next fragment or {@code 0} if it is the last fragment or the data
row is not fragmented.
+     * @return Size and offset of actual fragment data, and link to the next fragment if
data is fragmented.
      */
     public DataPagePayload readPayload(final long pageAddr, final int itemId, final int pageSize)
{
         int dataOff = getDataOffset(pageAddr, itemId, pageSize);


Mime
View raw message