You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2017/04/11 23:58:06 UTC
[7/7] geode git commit: spotless changes
spotless changes
Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/9ade788c
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/9ade788c
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/9ade788c
Branch: refs/heads/feature/GEODE-2097
Commit: 9ade788cfb979614917bfbee522e8e9295a01f75
Parents: 98c56f6
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Tue Apr 11 16:57:39 2017 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Tue Apr 11 16:57:39 2017 -0700
----------------------------------------------------------------------
.../cache/lru/HeapLRUCapacityController.java | 3 +-
.../internal/cache/lru/LRUMapCallbacks.java | 1 +
.../OffHeapLRURecoveryRegressionTest.java | 41 ++++++++++----------
3 files changed, 23 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/geode/blob/9ade788c/geode-core/src/main/java/org/apache/geode/internal/cache/lru/HeapLRUCapacityController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/lru/HeapLRUCapacityController.java b/geode-core/src/main/java/org/apache/geode/internal/cache/lru/HeapLRUCapacityController.java
index f6c8848..e1c3420 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/lru/HeapLRUCapacityController.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/lru/HeapLRUCapacityController.java
@@ -286,7 +286,8 @@ public class HeapLRUCapacityController extends LRUAlgorithm {
@Override
public boolean lruLimitExceeded(LRUStatistics lruStatistics, DiskRegionView drv) {
- InternalResourceManager resourceManager = drv.getDiskStore().getCache().getResourceManager();
+ InternalResourceManager resourceManager =
+ drv.getDiskStore().getCache().getResourceManager();
if (!drv.getOffHeap()) {
return resourceManager.getHeapMonitor().getState().isEviction();
} else {
http://git-wip-us.apache.org/repos/asf/geode/blob/9ade788c/geode-core/src/main/java/org/apache/geode/internal/cache/lru/LRUMapCallbacks.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/lru/LRUMapCallbacks.java b/geode-core/src/main/java/org/apache/geode/internal/cache/lru/LRUMapCallbacks.java
index ad9db55..c1ae28a 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/lru/LRUMapCallbacks.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/lru/LRUMapCallbacks.java
@@ -55,6 +55,7 @@ public interface LRUMapCallbacks {
/**
* Return true if the lru has exceeded its limit and needs to evict. Note that this method is
* currently used to prevent disk recovery from faulting in values once the limit is exceeded.
+ *
* @param drv TODO
*/
public boolean lruLimitExceeded(DiskRegionView drv);
http://git-wip-us.apache.org/repos/asf/geode/blob/9ade788c/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapLRURecoveryRegressionTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapLRURecoveryRegressionTest.java b/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapLRURecoveryRegressionTest.java
index 1fc9556..f23ea95 100644
--- a/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapLRURecoveryRegressionTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/offheap/OffHeapLRURecoveryRegressionTest.java
@@ -1,18 +1,16 @@
/*
- * 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
+ * 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
+ * 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.
+ * 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.geode.internal.offheap;
@@ -42,12 +40,11 @@ import org.apache.geode.test.junit.categories.IntegrationTest;
public class OffHeapLRURecoveryRegressionTest {
static final String DS_NAME = "OffHeapLRURecoveryRegressionTestDS";
+
/**
- * Test populates an offheap heaplru persistent region that contains
- * more data than can fit in offheap memory.
- * It then recovers the region to demonstrate that recovering
- * this data will not try to put everything into offheap but
- * instead leave some of it on disk.
+ * Test populates an offheap heaplru persistent region that contains more data than can fit in
+ * offheap memory. It then recovers the region to demonstrate that recovering this data will not
+ * try to put everything into offheap but instead leave some of it on disk.
*/
@Test
public void recoveringTooMuchDataDoesNotRunOutOfOffHeapMemory() {
@@ -56,8 +53,8 @@ public class OffHeapLRURecoveryRegressionTest {
GemFireCacheImpl gfc = createCache();
try {
Region<Object, Object> r = createRegion(gfc);
- byte[] v = new byte[1024*1024];
- for (int i=0; i < ENTRY_COUNT; i++) {
+ byte[] v = new byte[1024 * 1024];
+ for (int i = 0; i < ENTRY_COUNT; i++) {
r.put(i, v);
}
expectedUsedMemory = MemoryAllocatorImpl.getAllocator().getUsedMemory();
@@ -86,7 +83,7 @@ public class OffHeapLRURecoveryRegressionTest {
System.clearProperty("gemfire.disk.recoverLruValues");
}
}
-
+
private GemFireCacheImpl createCache() {
Properties props = new Properties();
props.setProperty(LOCATORS, "");
@@ -96,10 +93,12 @@ public class OffHeapLRURecoveryRegressionTest {
result.getResourceManager().setEvictionOffHeapPercentage(50.0f);
return result;
}
+
private Region<Object, Object> createRegion(GemFireCacheImpl gfc) {
DiskStoreFactory dsf = gfc.createDiskStoreFactory();
dsf.create(DS_NAME);
- RegionFactory<Object, Object> rf = gfc.createRegionFactory(RegionShortcut.LOCAL_PERSISTENT_OVERFLOW);
+ RegionFactory<Object, Object> rf =
+ gfc.createRegionFactory(RegionShortcut.LOCAL_PERSISTENT_OVERFLOW);
rf.setOffHeap(true);
rf.setDiskStoreName(DS_NAME);
Region<Object, Object> r = rf.create("OffHeapLRURecoveryRegressionTestRegion");