You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by as...@apache.org on 2015/10/21 17:58:53 UTC
[06/15] incubator-geode git commit: GEODE-429: Remove HDFS
RegionShortcuts
GEODE-429: Remove HDFS RegionShortcuts
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b3f838ea
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b3f838ea
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b3f838ea
Branch: refs/heads/feature/GEODE-409
Commit: b3f838ea6a0b0eb150dcb92b7f6e46e5ee9db1e4
Parents: ef5d9e2
Author: Ashvin Agrawal <as...@apache.org>
Authored: Mon Oct 19 11:55:53 2015 -0700
Committer: Ashvin Agrawal <as...@apache.org>
Committed: Wed Oct 21 08:55:22 2015 -0700
----------------------------------------------------------------------
.../gemstone/gemfire/cache/RegionShortcut.java | 50 --------------------
.../internal/cache/GemFireCacheImpl.java | 42 ----------------
.../hdfs/internal/HDFSConfigJUnitTest.java | 8 ++--
.../hdfs/internal/HDFSEntriesSetJUnitTest.java | 2 +-
.../internal/hoplog/BaseHoplogTestCase.java | 2 +-
...FSQueueRegionOperationsOffHeapJUnitTest.java | 2 +-
.../cache/HDFSRegionOperationsJUnitTest.java | 2 +-
.../HDFSRegionOperationsOffHeapJUnitTest.java | 2 +-
.../HDFSRegionMBeanAttributeJUnitTest.java | 2 +-
9 files changed, 10 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionShortcut.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionShortcut.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionShortcut.java
index ae3cbdb..5000032 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionShortcut.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionShortcut.java
@@ -226,54 +226,4 @@ public enum RegionShortcut {
* The actual RegionAttributes for a REPLICATE_PROXY region set the {@link DataPolicy} to {@link DataPolicy#EMPTY} and {@link Scope} to {@link Scope#DISTRIBUTED_ACK}.
*/
REPLICATE_PROXY,
-
- /**
- * A PARTITION_HDFS has local state that is partitioned across each peer member
- * that created the region.
- * In addition its state is written to HDFS.
- * The random access to the data in HDFS is also enabled.
- * The actual RegionAttributes for a PARTITION_HDFS region set the {@link DataPolicy} to {@link DataPolicy#HDFS_PARTITION}.
- * The HDFS event queue's property random-access is set to true.
- * The {@link EvictionAttributes} are set to {@link EvictionAlgorithm#LRU_HEAP}
- * with {@link EvictionAction#OVERFLOW_TO_DISK}.
- */
- PARTITION_HDFS,
-
- /**
- * A PARTITION_REDUNDANT_HDFS has local state that is partitioned across each peer member
- * that created the region.
- * In addition its state is written to HDFS and recovered from HDFS when the region is
- * created. The random access to the data in HDFS is also enabled.
- * In addition an extra copy of the data is kept in memory.
- * The actual RegionAttributes for a PARTITION_REDUNDANT_HDFS region set the {@link DataPolicy} to {@link DataPolicy#HDFS_PARTITION}
- * and the redundant-copies to 1. The HDFS event queue's property random-access is set to true.
- * The {@link EvictionAttributes} are set to {@link EvictionAlgorithm#LRU_HEAP}
- * with {@link EvictionAction#OVERFLOW_TO_DISK}.
- */
- PARTITION_REDUNDANT_HDFS,
-
- /**
- * A PARTITION_WRITEONLY_HDFS_STORE has local state that is partitioned across each peer member
- * that created the region.
- * In addition its state is written to HDFS and recovered from HDFS when the region is
- * created. The random access to the data in HDFS is disabled.
- * The actual RegionAttributes for a PARTITION_WRITEONLY_HDFS_STORE region set the {@link DataPolicy} to {@link DataPolicy#HDFS_PARTITION}.
- * The HDFS event queue's property write only is set as true.
- * The {@link EvictionAttributes} are set to {@link EvictionAlgorithm#LRU_HEAP}
- * with {@link EvictionAction#OVERFLOW_TO_DISK}.
- */
- PARTITION_WRITEONLY_HDFS_STORE,
-
- /**
- * A PARTITION_REDUNDANT_WRITEONLY_HDFS_STORE has local state that is partitioned across each peer member
- * that created the region.
- * In addition its state is written to HDFS and recovered from HDFS when the region is
- * created. The random access to the data in HDFS is disabled.
- * In addition an extra copy of the data is kept in memory.
- * The actual RegionAttributes for a PARTITION_REDUNDANT_WRITEONLY_HDFS_STORE region set the {@link DataPolicy} to {@link DataPolicy#HDFS_PARTITION}
- * and the redundant-copies to 1. The HDFS event queue's property write only is set as true.
- * The {@link EvictionAttributes} are set to {@link EvictionAlgorithm#LRU_HEAP}
- * with {@link EvictionAction#OVERFLOW_TO_DISK}.
- */
- PARTITION_REDUNDANT_WRITEONLY_HDFS_STORE
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 4bf0f42..0d4961b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -4916,48 +4916,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
c.setRegionAttributes(pra.toString(), af.create());
break;
}
- case PARTITION_HDFS: {
- AttributesFactory af = new AttributesFactory();
- af.setDataPolicy(DataPolicy.HDFS_PARTITION);
- PartitionAttributesFactory paf = new PartitionAttributesFactory();
- af.setPartitionAttributes(paf.create());
- af.setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK));
- af.setHDFSWriteOnly(false);
- c.setRegionAttributes(pra.toString(), af.create());
- break;
- }
- case PARTITION_REDUNDANT_HDFS: {
- AttributesFactory af = new AttributesFactory();
- af.setDataPolicy(DataPolicy.HDFS_PARTITION);
- PartitionAttributesFactory paf = new PartitionAttributesFactory();
- paf.setRedundantCopies(1);
- af.setPartitionAttributes(paf.create());
- af.setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK));
- af.setHDFSWriteOnly(false);
- c.setRegionAttributes(pra.toString(), af.create());
- break;
- }
- case PARTITION_WRITEONLY_HDFS_STORE: {
- AttributesFactory af = new AttributesFactory();
- af.setDataPolicy(DataPolicy.HDFS_PARTITION);
- PartitionAttributesFactory paf = new PartitionAttributesFactory();
- af.setPartitionAttributes(paf.create());
- af.setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK));
- af.setHDFSWriteOnly(true);
- c.setRegionAttributes(pra.toString(), af.create());
- break;
- }
- case PARTITION_REDUNDANT_WRITEONLY_HDFS_STORE: {
- AttributesFactory af = new AttributesFactory();
- af.setDataPolicy(DataPolicy.HDFS_PARTITION);
- PartitionAttributesFactory paf = new PartitionAttributesFactory();
- paf.setRedundantCopies(1);
- af.setPartitionAttributes(paf.create());
- af.setEvictionAttributes(EvictionAttributes.createLRUHeapAttributes(null, EvictionAction.OVERFLOW_TO_DISK));
- af.setHDFSWriteOnly(true);
- c.setRegionAttributes(pra.toString(), af.create());
- break;
- }
default:
throw new IllegalStateException("unhandled enum " + pra);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSConfigJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSConfigJUnitTest.java
index a1c9eb1..b0c6520 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSConfigJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSConfigJUnitTest.java
@@ -71,7 +71,7 @@ public class HDFSConfigJUnitTest extends TestCase {
try {
HDFSStoreFactory hsf = this.c.createHDFSStoreFactory();
HDFSStore store = hsf.create("myHDFSStore");
- RegionFactory rf1 = this.c.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory rf1 = this.c.createRegionFactory(RegionShortcut.PARTITION);
Region r1 = rf1.setHDFSStoreName("myHDFSStore").create("r1");
r1.put("k1", "v1");
@@ -89,7 +89,7 @@ public class HDFSConfigJUnitTest extends TestCase {
hsf = this.c.createHDFSStoreFactory();
hsf.create("myHDFSStore");
- r1 = this.c.createRegionFactory(RegionShortcut.PARTITION_WRITEONLY_HDFS_STORE).setHDFSStoreName("myHDFSStore")
+ r1 = this.c.createRegionFactory(RegionShortcut.PARTITION).setHDFSStoreName("myHDFSStore")
.create("r1");
r1.put("k1", "v1");
@@ -126,7 +126,7 @@ public class HDFSConfigJUnitTest extends TestCase {
hsf.create("myHDFSStore");
- r1 = this.c.createRegionFactory(RegionShortcut.PARTITION_WRITEONLY_HDFS_STORE).setHDFSStoreName("myHDFSStore")
+ r1 = this.c.createRegionFactory(RegionShortcut.PARTITION).setHDFSStoreName("myHDFSStore")
.setHDFSWriteOnly(true).create("r1");
r1.put("k1", "v1");
@@ -467,7 +467,7 @@ public class HDFSConfigJUnitTest extends TestCase {
float percentage = 100 * (float) blockCacheSize / (float) heapSize;
hsf.setBlockCacheSize(percentage);
HDFSStoreImpl store = (HDFSStoreImpl) hsf.create("myHDFSStore");
- RegionFactory rf1 = this.c.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory rf1 = this.c.createRegionFactory(RegionShortcut.PARTITION);
//Create a region that evicts everything
LocalRegion r1 = (LocalRegion) rf1.setHDFSStoreName("myHDFSStore").setEvictionAttributes(EvictionAttributes.createLRUEntryAttributes(1)).create("r1");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEntriesSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEntriesSetJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEntriesSetJUnitTest.java
index 75dfa93..f864176 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEntriesSetJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEntriesSetJUnitTest.java
@@ -72,7 +72,7 @@ public class HDFSEntriesSetJUnitTest extends TestCase {
PartitionAttributesFactory paf = new PartitionAttributesFactory();
paf.setTotalNumBuckets(1);
- RegionFactory rf = cache.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory rf = cache.createRegionFactory(RegionShortcut.PARTITION);
region = (PartitionedRegion) rf.setHDFSStoreName("test").setPartitionAttributes(paf.create()).create("test");
// prime the region so buckets get created
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/BaseHoplogTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/BaseHoplogTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/BaseHoplogTestCase.java
index eb713c0..b35f756 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/BaseHoplogTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/BaseHoplogTestCase.java
@@ -89,7 +89,7 @@ public abstract class BaseHoplogTestCase extends TestCase {
configureHdfsStoreFactory();
hdfsStore = (HDFSStoreImpl) hsf.create(HDFS_STORE_NAME);
- regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION);
regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
region = regionfactory.create(getName());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSQueueRegionOperationsOffHeapJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSQueueRegionOperationsOffHeapJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSQueueRegionOperationsOffHeapJUnitTest.java
index f28c138..4565568 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSQueueRegionOperationsOffHeapJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSQueueRegionOperationsOffHeapJUnitTest.java
@@ -33,7 +33,7 @@ public class HDFSQueueRegionOperationsOffHeapJUnitTest extends HDFSQueueRegionOp
}
@Override
protected Region<Integer, String> createRegion(String regionName) {
- RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION);
PartitionAttributes prAttr = new PartitionAttributesFactory().setTotalNumBuckets(10).create();
rf.setPartitionAttributes(prAttr);
rf.setOffHeap(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsJUnitTest.java
index 50b213a..b24ee5d 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsJUnitTest.java
@@ -105,7 +105,7 @@ public class HDFSRegionOperationsJUnitTest extends TestCase {
}
protected Region<Integer, String> createRegion(String regionName) {
- RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION);
PartitionAttributes prAttr = new PartitionAttributesFactory().setTotalNumBuckets(10).create();
rf.setPartitionAttributes(prAttr);
rf.setHDFSStoreName(hdfsStore.getName());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsOffHeapJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsOffHeapJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsOffHeapJUnitTest.java
index 421cd28..f9c96a2 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsOffHeapJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/HDFSRegionOperationsOffHeapJUnitTest.java
@@ -55,7 +55,7 @@ public class HDFSRegionOperationsOffHeapJUnitTest extends HDFSRegionOperationsJU
}
@Override
protected Region<Integer, String> createRegion(String regionName) {
- RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION);
PartitionAttributes prAttr = new PartitionAttributesFactory().setTotalNumBuckets(10).create();
rf.setPartitionAttributes(prAttr);
rf.setOffHeap(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b3f838ea/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/HDFSRegionMBeanAttributeJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/HDFSRegionMBeanAttributeJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/HDFSRegionMBeanAttributeJUnitTest.java
index 38145d1..c563d5a 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/HDFSRegionMBeanAttributeJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/bean/stats/HDFSRegionMBeanAttributeJUnitTest.java
@@ -76,7 +76,7 @@ public class HDFSRegionMBeanAttributeJUnitTest extends TestCase {
configureHdfsStoreFactory();
hdfsStore = (HDFSStoreImpl) hsf.create(HDFS_STORE_NAME);
- RegionFactory<Object, Object> regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION_HDFS);
+ RegionFactory<Object, Object> regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION);
regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
// regionfactory.setCompressionCodec("Some");