geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ash...@apache.org
Subject [05/15] incubator-geode git commit: GEODE-429: Remove RegionFactory.setHdfsStore
Date Wed, 21 Oct 2015 15:58:52 GMT
GEODE-429: Remove RegionFactory.setHdfsStore


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/7bcc1e44
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/7bcc1e44
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/7bcc1e44

Branch: refs/heads/feature/GEODE-409
Commit: 7bcc1e44cb7f0f69381c06d583b058926ca85331
Parents: b3f838e
Author: Ashvin Agrawal <ashvin@apache.org>
Authored: Mon Oct 19 13:41:31 2015 -0700
Committer: Ashvin Agrawal <ashvin@apache.org>
Committed: Wed Oct 21 08:55:22 2015 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/cache/RegionFactory.java   | 25 --------------------
 .../cli/functions/RegionCreateFunction.java     |  8 -------
 .../hdfs/internal/HDFSConfigJUnitTest.java      | 16 ++++++++-----
 .../hdfs/internal/HDFSEntriesSetJUnitTest.java  |  3 ++-
 .../internal/hoplog/BaseHoplogTestCase.java     |  2 +-
 .../HdfsSortedOplogOrganizerJUnitTest.java      |  2 +-
 ...FSQueueRegionOperationsOffHeapJUnitTest.java |  2 +-
 .../cache/HDFSRegionOperationsJUnitTest.java    |  4 ++--
 .../HDFSRegionOperationsOffHeapJUnitTest.java   |  2 +-
 .../HDFSRegionMBeanAttributeJUnitTest.java      |  2 +-
 10 files changed, 19 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
index 40041cb..72a0a44 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java
@@ -902,31 +902,6 @@ public class RegionFactory<K,V>
     this.attrsFactory.addAsyncEventQueueId(asyncEventQueueId);
     return this;
   }
-  /**
-   * Sets the HDFSStore name attribute.
-   * This causes the region to belong to the HDFSStore.
-   * @param name the name of the hdfsstore
-   * @return a reference to this RegionFactory object
-   * 
-   * @see AttributesFactory#setHDFSStoreName
-   * @since 9.0
-   */
-  public RegionFactory<K,V> setHDFSStoreName(String name) {
-    this.attrsFactory.setHDFSStoreName(name);
-    return this;
-  }
-  
-  /**
-   * Sets the HDFS write only attribute. if the region
-   * is configured to be write only to HDFS, events that have 
-   * been evicted from memory cannot be read back from HDFS.
-   * Events are written to HDFS in the order in which they occurred.
-   * @since 9.0
-   */
-  public RegionFactory<K,V> setHDFSWriteOnly(boolean writeOnly) {
-    this.attrsFactory.setHDFSWriteOnly(writeOnly);
-    return this;
-  }
 
   /**
    * Set the compressor to be used by this region for compressing

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
index 74afc47..3bf8b3f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/RegionCreateFunction.java
@@ -309,14 +309,6 @@ public class RegionCreateFunction extends FunctionAdapter implements
InternalEnt
     
     String regionName = regionPathData.getName();
     
-    final String hdfsStoreName = regionCreateArgs.getHDFSStoreName();
-	if (hdfsStoreName != null && !hdfsStoreName.isEmpty()) {
-		factory.setHDFSStoreName(hdfsStoreName);		
-	}
-	if (regionCreateArgs.isSetHDFSWriteOnly()) {
-		factory.setHDFSWriteOnly(regionCreateArgs.getHDFSWriteOnly());
-	}
-	  
     if (parentRegion != null) {
       createdRegion = factory.createSubregion(parentRegion, regionName);
     } else {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 b0c6520..26e6c73 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
@@ -72,7 +72,8 @@ public class HDFSConfigJUnitTest extends TestCase {
         HDFSStoreFactory hsf = this.c.createHDFSStoreFactory();
         HDFSStore store = hsf.create("myHDFSStore");
         RegionFactory rf1 = this.c.createRegionFactory(RegionShortcut.PARTITION);
-        Region r1 = rf1.setHDFSStoreName("myHDFSStore").create("r1");
+//        rf1.setHDFSStoreName("myHDFSStore");
+        Region r1 = rf1.create("r1");
        
         r1.put("k1", "v1");
         
@@ -89,8 +90,9 @@ public class HDFSConfigJUnitTest extends TestCase {
         hsf = this.c.createHDFSStoreFactory();
         hsf.create("myHDFSStore");
         
-        r1 = this.c.createRegionFactory(RegionShortcut.PARTITION).setHDFSStoreName("myHDFSStore")
-              .create("r1");
+        RegionFactory<Object, Object> rf = this.c.createRegionFactory(RegionShortcut.PARTITION);
+//        rf.setHDFSStoreName("myHDFSStore");
+        r1 = rf.create("r1");
        
         r1.put("k1", "v1");
         assertTrue("Mismatch in attributes, actual.batchsize: " + store.getBatchSize() +
" and expected batchsize: 32", store.getBatchSize()== 32);
@@ -126,8 +128,9 @@ public class HDFSConfigJUnitTest extends TestCase {
         hsf.create("myHDFSStore");
         
         
-        r1 = this.c.createRegionFactory(RegionShortcut.PARTITION).setHDFSStoreName("myHDFSStore")
-            .setHDFSWriteOnly(true).create("r1");
+        rf = this.c.createRegionFactory(RegionShortcut.PARTITION);
+//        rf.setHDFSStoreName("myHDFSStore").setHDFSWriteOnly(true);
+        r1 = rf.create("r1");
        
         r1.put("k1", "v1");
         store = c.findHDFSStore(r1.getAttributes().getHDFSStoreName());
@@ -469,7 +472,8 @@ public class HDFSConfigJUnitTest extends TestCase {
       HDFSStoreImpl store = (HDFSStoreImpl) hsf.create("myHDFSStore");
       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");
+//      rf1.setHDFSStoreName("myHDFSStore");
+      LocalRegion r1 = (LocalRegion) rf1.setEvictionAttributes(EvictionAttributes.createLRUEntryAttributes(1)).create("r1");
      
       //Populate about many times our block cache size worth of data
       //We want to try to cache at least 5 blocks worth of index and metadata

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 f864176..3085a66 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
@@ -73,7 +73,8 @@ public class HDFSEntriesSetJUnitTest extends TestCase {
     paf.setTotalNumBuckets(1);
     
     RegionFactory rf = cache.createRegionFactory(RegionShortcut.PARTITION);
-    region = (PartitionedRegion) rf.setHDFSStoreName("test").setPartitionAttributes(paf.create()).create("test");
+//    rf.setHDFSStoreName("test");
+    region = (PartitionedRegion) rf.setPartitionAttributes(paf.create()).create("test");
     
     // prime the region so buckets get created
     region.put("test", "test");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 b35f756..07d9f77 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
@@ -90,7 +90,7 @@ public abstract class BaseHoplogTestCase extends TestCase {
     hdfsStore = (HDFSStoreImpl) hsf.create(HDFS_STORE_NAME);
 
     regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION);
-    regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
+//    regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
     region = regionfactory.create(getName());
     
     // disable compaction by default and clear existing queues

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/HdfsSortedOplogOrganizerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/HdfsSortedOplogOrganizerJUnitTest.java
b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/HdfsSortedOplogOrganizerJUnitTest.java
index 4529067..e6a1229 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/HdfsSortedOplogOrganizerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/hdfs/internal/hoplog/HdfsSortedOplogOrganizerJUnitTest.java
@@ -744,7 +744,7 @@ public class HdfsSortedOplogOrganizerJUnitTest extends BaseHoplogTestCase
{
     }
       
     // create region with store
-    regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
+//    regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
     Region<Object, Object> region1 = regionfactory.create("region-1");
     ExpectedException ex = DistributedTestCase.addExpectedException("CorruptHFileException");
     try {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 4565568..24cd1dc 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
@@ -37,7 +37,7 @@ public class HDFSQueueRegionOperationsOffHeapJUnitTest extends HDFSQueueRegionOp
     PartitionAttributes prAttr = new PartitionAttributesFactory().setTotalNumBuckets(10).create();
     rf.setPartitionAttributes(prAttr);
     rf.setOffHeap(true);
-    rf.setHDFSStoreName(hdfsStore.getName());
+//    rf.setHDFSStoreName(hdfsStore.getName());
     Region<Integer, String> r = rf.create(regionName);
 //    addListener(r);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 b24ee5d..d96e31b 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
@@ -108,7 +108,7 @@ public class HDFSRegionOperationsJUnitTest extends TestCase {
     RegionFactory<Integer, String> rf = cache.createRegionFactory(RegionShortcut.PARTITION);
     PartitionAttributes prAttr = new PartitionAttributesFactory().setTotalNumBuckets(10).create();
     rf.setPartitionAttributes(prAttr);
-    rf.setHDFSStoreName(hdfsStore.getName());
+//    rf.setHDFSStoreName(hdfsStore.getName());
     Region<Integer, String> r = rf.create(regionName);
     
     ((PartitionedRegion) r).setQueryHDFS(true);
@@ -265,7 +265,7 @@ public class HDFSRegionOperationsJUnitTest extends TestCase {
 
   public void test050LRURegionAttributesForPR() {
     RegionFactory<Integer, String> rf = cache.createRegionFactory();
-    rf.setHDFSStoreName(hdfsStore.getName());
+//    rf.setHDFSStoreName(hdfsStore.getName());
     rf.setDataPolicy(DataPolicy.HDFS_PARTITION);
     verifyLRURegionAttributesForPR(rf.create(getName()));
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 f9c96a2..de2aae3 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
@@ -59,7 +59,7 @@ public class HDFSRegionOperationsOffHeapJUnitTest extends HDFSRegionOperationsJU
     PartitionAttributes prAttr = new PartitionAttributesFactory().setTotalNumBuckets(10).create();
     rf.setPartitionAttributes(prAttr);
     rf.setOffHeap(true);
-    rf.setHDFSStoreName(hdfsStore.getName());
+//    rf.setHDFSStoreName(hdfsStore.getName());
     Region<Integer, String> r = rf.create(regionName);
 //    addListener(r);
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/7bcc1e44/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 c563d5a..14b61e6 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
@@ -77,7 +77,7 @@ public class HDFSRegionMBeanAttributeJUnitTest extends TestCase {
     hdfsStore = (HDFSStoreImpl) hsf.create(HDFS_STORE_NAME);
 
     RegionFactory<Object, Object> regionfactory = cache.createRegionFactory(RegionShortcut.PARTITION);
-    regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
+//    regionfactory.setHDFSStoreName(HDFS_STORE_NAME);
 
     // regionfactory.setCompressionCodec("Some");
     PartitionAttributesFactory fac = new PartitionAttributesFactory();


Mime
View raw message