geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From upthewatersp...@apache.org
Subject [geode] 02/02: Splotless
Date Thu, 02 Nov 2017 21:10:33 GMT
This is an automated email from the ASF dual-hosted git repository.

upthewaterspout pushed a commit to branch feature/GEODE-3930
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 2834e5a9143a6e6d443d1f36cc2eb0185eb85371
Author: Dan Smith <upthewaterspout@apache.org>
AuthorDate: Thu Nov 2 14:10:05 2017 -0700

    Splotless
---
 .../org/apache/geode/internal/cache/AbstractRegion.java |  2 +-
 .../org/apache/geode/internal/cache/LocalRegion.java    |  5 +++--
 .../apache/geode/internal/cache/PartitionedRegion.java  |  3 +--
 .../geode/cache/lucene/internal/LuceneServiceImpl.java  |  8 ++++----
 .../cache/lucene/LuceneIndexCreationDUnitTest.java      | 17 ++++++++---------
 .../lucene/LuceneIndexCreationIntegrationTest.java      |  6 ++----
 6 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
index f3971d3..43ab2f1 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegion.java
@@ -874,7 +874,7 @@ public abstract class AbstractRegion implements Region, RegionAttributes,
Attrib
 
   public void addAsyncEventQueueId(String asyncEventQueueId, boolean isInternal) {
     getAsyncEventQueueIds().add(asyncEventQueueId);
-    if(!isInternal) {
+    if (!isInternal) {
       getVisibleAsyncEventQueueIds().add(asyncEventQueueId);
     }
     setAllGatewaySenderIds();
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
index 7e703d0..abcd1df 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java
@@ -541,7 +541,8 @@ public class LocalRegion extends AbstractRegion implements InternalRegion,
Loade
     return this.stopper;
   }
 
-  private final CopyOnWriteHashMap<String, CacheServiceProfile> cacheServiceProfiles
= new CopyOnWriteHashMap<>();
+  private final CopyOnWriteHashMap<String, CacheServiceProfile> cacheServiceProfiles
=
+      new CopyOnWriteHashMap<>();
 
   private static String calcFullPath(String regionName, LocalRegion parentRegion) {
     StringBuilder buf = null;
@@ -634,7 +635,7 @@ public class LocalRegion extends AbstractRegion implements InternalRegion,
Loade
     this.isUsedForParallelGatewaySenderQueue =
         internalRegionArgs.isUsedForParallelGatewaySenderQueue();
     this.serialGatewaySender = internalRegionArgs.getSerialGatewaySender();
-    if(internalRegionArgs.getCacheServiceProfiles() != null) {
+    if (internalRegionArgs.getCacheServiceProfiles() != null) {
       this.cacheServiceProfiles.putAll(internalRegionArgs.getCacheServiceProfiles());
     }
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
index e3e399f..4c95e77 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java
@@ -1221,8 +1221,7 @@ public class PartitionedRegion extends LocalRegion
     addAsyncEventQueueId(asyncEventQueueId, false);
   }
 
-  public void addAsyncEventQueueId(
-      String asyncEventQueueId, boolean isInternal) {
+  public void addAsyncEventQueueId(String asyncEventQueueId, boolean isInternal) {
     super.addAsyncEventQueueId(asyncEventQueueId, isInternal);
     new UpdateAttributesProcessor(this).distribute();
     ((PartitionedRegion) this).distributeUpdatedProfileOnSenderCreation();
diff --git a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
index 4d2bf31..22f498c 100644
--- a/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
+++ b/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java
@@ -250,16 +250,16 @@ public class LuceneServiceImpl implements InternalLuceneService {
 
   }
 
-  private void createIndexOnExistingRegion(PartitionedRegion region, String indexName, String
regionPath,
-      String[] fields, Analyzer analyzer, Map<String, Analyzer> fieldAnalyzers,
+  private void createIndexOnExistingRegion(PartitionedRegion region, String indexName,
+      String regionPath, String[] fields, Analyzer analyzer, Map<String, Analyzer>
fieldAnalyzers,
       LuceneSerializer serializer) {
     validateRegionAttributes(region.getAttributes());
 
     String aeqId = LuceneServiceImpl.getUniqueIndexName(indexName, regionPath);
     region.addAsyncEventQueueId(aeqId, true);
 
-    region.addCacheServiceProfile(new LuceneIndexCreationProfile(indexName, regionPath,
-        fields, analyzer, fieldAnalyzers, serializer));
+    region.addCacheServiceProfile(new LuceneIndexCreationProfile(indexName, regionPath, fields,
+        analyzer, fieldAnalyzers, serializer));
 
     LuceneIndexImpl luceneIndex = beforeDataRegionCreated(indexName, regionPath,
         region.getAttributes(), analyzer, fieldAnalyzers, aeqId, serializer, fields);
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
index 743ccd2..fd296fd 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationDUnitTest.java
@@ -262,7 +262,8 @@ public class LuceneIndexCreationDUnitTest extends LuceneDUnitTest {
 
   @Test
   @Parameters({"PARTITION", "PARTITION_REDUNDANT"})
-  public void creatingIndexAfterRegionAndStartingUpSecondMemberSucceeds(RegionTestableType
regionType) {
+  public void creatingIndexAfterRegionAndStartingUpSecondMemberSucceeds(
+      RegionTestableType regionType) {
     dataStore1.invoke(() -> {
       regionType.createDataStore(getCache(), REGION_NAME);
       createIndexAfterRegion("field1");
@@ -279,7 +280,8 @@ public class LuceneIndexCreationDUnitTest extends LuceneDUnitTest {
 
   @Test()
   @Parameters({"PARTITION", "PARTITION_REDUNDANT"})
-  public void creatingIndexAfterRegionAndStartingUpSecondMemberWithoutIndexFails(RegionTestableType
regionType) {
+  public void creatingIndexAfterRegionAndStartingUpSecondMemberWithoutIndexFails(
+      RegionTestableType regionType) {
     dataStore1.invoke(() -> {
       regionType.createDataStore(getCache(), REGION_NAME);
       createIndexAfterRegion("field1");
@@ -616,24 +618,21 @@ public class LuceneIndexCreationDUnitTest extends LuceneDUnitTest {
     assertEquals(expectedSize, getCache().getAsyncEventQueues(false).size());
   }
 
-  private void createIndexAfterRegion(String ... fields) {
+  private void createIndexAfterRegion(String... fields) {
     LuceneService luceneService = LuceneServiceProvider.get(getCache());
     LuceneIndexFactoryImpl indexFactory =
         (LuceneIndexFactoryImpl) luceneService.createIndexFactory();
     indexFactory.setFields(fields).create(INDEX_NAME, REGION_NAME, true);
   }
 
-  private void putEntryAndQuery()
-      throws InterruptedException, LuceneQueryException {
+  private void putEntryAndQuery() throws InterruptedException, LuceneQueryException {
     Cache cache = getCache();
     Region region = cache.getRegion(REGION_NAME);
     region.put("key1", new TestObject("field1Value", "field2Value"));
     LuceneService luceneService = LuceneServiceProvider.get(cache);
     luceneService.waitUntilFlushed(INDEX_NAME, REGION_NAME, 1, TimeUnit.MINUTES);
-    LuceneQuery<Object, Object>
-        query =
-        luceneService.createLuceneQueryFactory()
-            .create(INDEX_NAME, REGION_NAME, "field1:field1Value", "field1");
+    LuceneQuery<Object, Object> query = luceneService.createLuceneQueryFactory().create(INDEX_NAME,
+        REGION_NAME, "field1:field1Value", "field1");
     assertEquals(Collections.singletonList("key1"), query.findKeys());
   }
 
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationIntegrationTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationIntegrationTest.java
index 0b5bb04..5f4e74b 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationIntegrationTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneIndexCreationIntegrationTest.java
@@ -200,10 +200,8 @@ public class LuceneIndexCreationIntegrationTest extends LuceneIntegrationTest
{
 
     region.put("key1", new TestObject("hello", "world"));
     luceneService.waitUntilFlushed(INDEX_NAME, REGION_NAME, 1, TimeUnit.MINUTES);
-    LuceneQuery<Object, Object>
-        query =
-        luceneService.createLuceneQueryFactory()
-            .create(INDEX_NAME, REGION_NAME, "field1:hello", "field1");
+    LuceneQuery<Object, Object> query = luceneService.createLuceneQueryFactory().create(INDEX_NAME,
+        REGION_NAME, "field1:hello", "field1");
 
     assertEquals(Collections.singletonList("key1"), query.findKeys());
   }

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <commits@geode.apache.org>.

Mime
View raw message