[geode] branch feature/GEODE-4738 updated: GEODE-4738: move eventSeqNum and versionVector setting in constructors.
This is an automated email from the ASF dual-hosted git repository. eshu11 pushed a commit to branch feature/GEODE-4738 in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/feature/GEODE-4738 by this push: new 9b60ddc GEODE-4738: move eventSeqNum and versionVector setting in constructors. 9b60ddc is described below commit 9b60ddcfff29bbc5436fc052ba8edd123ccdf29d Author: eshuAuthorDate: Fri Feb 23 17:21:07 2018 -0800 GEODE-4738: move eventSeqNum and versionVector setting in constructors. --- .../apache/geode/internal/cache/BucketRegion.java | 45 +++--- .../geode/internal/cache/DistributedRegion.java| 5 - .../apache/geode/internal/cache/LocalRegion.java | 33 ++-- .../geode/internal/cache/PartitionedRegion.java| 5 + .../internal/cache/BucketRegionJUnitTest.java | 1 + .../RegionVersionVectorIntegrationTest.java| 171 + 6 files changed, 219 insertions(+), 41 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java index 736f50d..8d03df8 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/BucketRegion.java @@ -216,6 +216,7 @@ public class BucketRegion extends DistributedRegion implements Bucket { Assert.assertTrue(internalRegionArgs.getPartitionedRegion() != null); this.redundancy = internalRegionArgs.getPartitionedRegionBucketRedundancy(); this.partitionedRegion = internalRegionArgs.getPartitionedRegion(); +setEventSeqNum(); } // Attempt to direct the GII process to the primary first @@ -228,28 +229,6 @@ public class BucketRegion extends DistributedRegion implements Bucket { getBucketAdvisor().getProxyBucketRegion().setBucketRegion(this); boolean success = false; try { - if (this.partitionedRegion.isShadowPR() - && this.partitionedRegion.getColocatedWith() != null) { -PartitionedRegion parentPR = ColocationHelper.getLeaderRegion(this.partitionedRegion); -BucketRegion parentBucket = parentPR.getDataStore().getLocalBucketById(getId()); -// needs to be set only once. -if (parentBucket.eventSeqNum == null) { - parentBucket.eventSeqNum = new AtomicLong5(getId()); -} - } - if (this.partitionedRegion.getColocatedWith() == null) { -this.eventSeqNum = new AtomicLong5(getId()); - } else { -PartitionedRegion parentPR = ColocationHelper.getLeaderRegion(this.partitionedRegion); -BucketRegion parentBucket = parentPR.getDataStore().getLocalBucketById(getId()); -if (parentBucket == null && logger.isDebugEnabled()) { - logger.debug("The parentBucket of region {} bucketId {} is NULL", - this.partitionedRegion.getFullPath(), getId()); -} -Assert.assertTrue(parentBucket != null); -this.eventSeqNum = parentBucket.eventSeqNum; - } - final InternalDistributedMember primaryHolder = getBucketAdvisor().basicGetPrimaryMember(); if (primaryHolder != null && !primaryHolder.equals(getMyId())) { // Ignore the provided image target, use an existing primary (if any) @@ -267,6 +246,28 @@ public class BucketRegion extends DistributedRegion implements Bucket { } } + private void setEventSeqNum() { +if (this.partitionedRegion.isShadowPR() && this.partitionedRegion.getColocatedWith() != null) { + PartitionedRegion parentPR = ColocationHelper.getLeaderRegion(this.partitionedRegion); + BucketRegion parentBucket = parentPR.getDataStore().getLocalBucketById(getId()); + // needs to be set only once. + if (parentBucket.eventSeqNum == null) { +parentBucket.eventSeqNum = new AtomicLong5(getId()); + } +} +if (this.partitionedRegion.getColocatedWith() == null) { + this.eventSeqNum = new AtomicLong5(getId()); +} else { + PartitionedRegion parentPR = ColocationHelper.getLeaderRegion(this.partitionedRegion); + BucketRegion parentBucket = parentPR.getDataStore().getLocalBucketById(getId()); + if (parentBucket == null && logger.isDebugEnabled()) { +logger.debug("The parentBucket of region {} bucketId {} is NULL", +this.partitionedRegion.getFullPath(), getId()); + } + Assert.assertTrue(parentBucket != null); + this.eventSeqNum = parentBucket.eventSeqNum; +} + } @Override diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java index 9727de2..551cd78 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/DistributedRegion.java +++
[geode] branch develop updated: GEODE-4704: Modified ConflationKey to use shadowKey when comparing events
This is an automated email from the ASF dual-hosted git repository. boglesby pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 147e6bc GEODE-4704: Modified ConflationKey to use shadowKey when comparing events 147e6bc is described below commit 147e6bc6b9009aa8e878141ef30e55145732943d Author: Barry OglesbyAuthorDate: Fri Feb 23 15:41:13 2018 -0800 GEODE-4704: Modified ConflationKey to use shadowKey when comparing events --- .../wan/AbstractGatewaySenderEventProcessor.java | 15 ++- .../internal/cache/wan/GatewaySenderEventImpl.java | 2 +- ...rallelGatewaySenderEventProcessorJUnitTest.java | 141 + .../wan/parallel/ParallelGatewaySenderHelper.java | 79 .../ParallelQueueRemovalMessageJUnitTest.java | 26 +--- 5 files changed, 239 insertions(+), 24 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySenderEventProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySenderEventProcessor.java index 7e67e9b..9309e43 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySenderEventProcessor.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySenderEventProcessor.java @@ -731,7 +731,7 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread { return false; } - private List conflate(List events) { + public List conflate(List events) { List conflatedEvents = null; // Conflate the batch if necessary if (this.sender.isBatchConflationEnabled() && events.size() > 1) { @@ -756,7 +756,7 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread { // The event should not be conflated (create or destroy). Add it to // the map. ConflationKey key = new ConflationKey(gsEvent.getRegion().getFullPath(), - gsEvent.getKeyToConflate(), gsEvent.getOperation()); + gsEvent.getKeyToConflate(), gsEvent.getOperation(), gsEvent.getShadowKey()); conflatedEventsMap.put(key, gsEvent); } } @@ -1321,10 +1321,17 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread { private String regionName; +private long shadowKey; + private ConflationKey(String region, Object key, Operation operation) { + this(region, key, operation, -1); +} + +private ConflationKey(String region, Object key, Operation operation, long shadowKey) { this.key = key; this.operation = operation; this.regionName = region; + this.shadowKey = shadowKey; } @Override @@ -1334,6 +1341,7 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread { result = prime * result + key.hashCode(); result = prime * result + operation.hashCode(); result = prime * result + regionName.hashCode(); + result = prime * result + Long.hashCode(this.shadowKey); return result; } @@ -1358,6 +1366,9 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread { if (!this.operation.equals(that.operation)) { return false; } + if (this.shadowKey != that.shadowKey) { +return false; + } return true; } } diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java index d314664..3a1ecd0 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java @@ -757,7 +757,7 @@ public class GatewaySenderEventImpl implements AsyncEvent, DataSerializableFixed .append(getValueAsString(true)).append(";valueIsObject=").append(this.valueIsObject) .append(";numberOfParts=").append(this.numberOfParts).append(";callbackArgument=") .append(this.callbackArgument).append(";possibleDuplicate=").append(this.possibleDuplicate) - .append(";creationTime=").append(this.creationTime).append(";shadowKey= ") + .append(";creationTime=").append(this.creationTime).append(";shadowKey=") .append(this.shadowKey).append(";timeStamp=").append(this.versionTimeStamp) .append(";acked=").append(this.isAcked).append(";dispatched=").append(this.isDispatched) .append(";bucketId=").append(this.bucketId).append(";isConcurrencyConflict=") diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderEventProcessorJUnitTest.java
[geode] branch feature/GEODE-4704 deleted (was 4431174)
This is an automated email from the ASF dual-hosted git repository. boglesby pushed a change to branch feature/GEODE-4704 in repository https://gitbox.apache.org/repos/asf/geode.git. was 4431174 GEODE-4704: Modified ConflationKey to use shadowKey when comparing events The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository. -- To stop receiving notification emails like this one, please contact bogle...@apache.org.
[geode-native] branch develop updated: Added CLion to list of optional tools for MacOS
This is an automated email from the ASF dual-hosted git repository. jbarrett pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git The following commit(s) were added to refs/heads/develop by this push: new ebd8111 Added CLion to list of optional tools for MacOS ebd8111 is described below commit ebd8111a7a2711593e420255df18ce9eebacc045 Author: Jacob BarrettAuthorDate: Fri Feb 23 15:14:00 2018 -0800 Added CLion to list of optional tools for MacOS --- BUILDING.md | 1 + 1 file changed, 1 insertion(+) diff --git a/BUILDING.md b/BUILDING.md index 2fdfdb1..14f15fb 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -77,6 +77,7 @@ Due to limitations in CMake, the documentation must be built as a separate step * [CMake GUI](https://cmake.org/) * [Doxygen GUI](http://ftp.stack.nl/pub/users/dimitri/Doxygen-1.8.11.dmg) * [Eclipse CDT 8.8](https://eclipse.org/cdt/) or newer +* [CLion](https://www.jetbrains.com/clion/) ## Windows * Windows 8.1 64-bit -- To stop receiving notification emails like this one, please contact jbarr...@apache.org.
[geode] branch develop updated: GEODE-4541: remove singleton calls (#1463)
This is an automated email from the ASF dual-hosted git repository. dschneider pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new d752dce GEODE-4541: remove singleton calls (#1463) d752dce is described below commit d752dceaee450ce4d49dcd06766b3dd665211e16 Author: Darrel SchneiderAuthorDate: Fri Feb 23 11:48:16 2018 -0800 GEODE-4541: remove singleton calls (#1463) * removed getAnyInstance call from PartitionedRegionHelper * removed getInstance call from CacheServerLauncher * removed getAnyInstance call from EventStateHelper * DistributedPutAllOperation no longer calls GemFireCacheImpl.getInstance * EntryEventImpl no longer calls getInstance. This fix requires that when an EntryEventImpl is deserialized that setRegion will be called on it before the values are accessed. Also encapsulated the "region" field and got rid of getLocalRegion in favor of getRegion. --- .../geode/internal/cache/AbstractRegionMap.java| 16 +- .../internal/cache/AbstractUpdateOperation.java| 2 +- .../apache/geode/internal/cache/BucketRegion.java | 4 +- .../geode/internal/cache/CacheServerLauncher.java | 2 +- .../internal/cache/CreateRegionProcessor.java | 3 +- .../geode/internal/cache/DestroyOperation.java | 2 +- .../apache/geode/internal/cache/DistTXState.java | 8 +- .../internal/cache/DistTXStateOnCoordinator.java | 8 +- .../cache/DistTXStateProxyImplOnCoordinator.java | 2 +- .../internal/cache/DistributedPutAllOperation.java | 26 +-- .../geode/internal/cache/DistributedRegion.java| 2 +- .../geode/internal/cache/EntryEventImpl.java | 178 - .../geode/internal/cache/EventStateHelper.java | 9 +- .../internal/cache/FutureCachedDeserializable.java | 35 .../internal/cache/InitialImageOperation.java | 4 +- .../geode/internal/cache/InvalidateOperation.java | 2 +- .../geode/internal/cache/LocalRegionDataView.java | 8 +- .../internal/cache/PartitionedRegionDataView.java | 12 +- .../internal/cache/PartitionedRegionHelper.java| 9 +- .../cache/SearchLoadAndWriteProcessor.java | 2 +- .../geode/internal/cache/TXStateProxyImpl.java | 16 +- .../cache/UpdateEntryVersionOperation.java | 2 +- .../cache/entries/AbstractRegionEntry.java | 2 +- .../geode/internal/cache/map/RegionMapDestroy.java | 4 +- .../cache/partitioned/PutAllPRMessage.java | 16 +- .../geode/internal/cache/tx/DistTxEntryEvent.java | 11 +- .../internal/cache/tx/DistributedTXRegionStub.java | 4 +- .../internal/cache/tx/PartitionedTXRegionStub.java | 6 +- .../geode/internal/cache/EntryEventImplTest.java | 2 +- .../codeAnalysis/sanctionedDataSerializables.txt | 12 +- 30 files changed, 237 insertions(+), 172 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java index 8ae34d0..68d7134 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/AbstractRegionMap.java @@ -2438,7 +2438,7 @@ public abstract class AbstractRegionMap // Note that v will be null instead of INVALID because setOldValue // converts INVALID to null. // But checkExpectedOldValue handle this and says INVALID equals null. - if (!AbstractRegionEntry.checkExpectedOldValue(expectedOldValue, v, event.getLocalRegion())) { + if (!AbstractRegionEntry.checkExpectedOldValue(expectedOldValue, v, event.getRegion())) { return false; } } @@ -2455,7 +2455,7 @@ public abstract class AbstractRegionMap // In these cases we want to even get the old value from disk if it is not in memory ReferenceCountHelper.skipRefCountTracking(); @Released -Object oldValueInVMOrDisk = re.getValueOffHeapOrDiskWithoutFaultIn(event.getLocalRegion()); +Object oldValueInVMOrDisk = re.getValueOffHeapOrDiskWithoutFaultIn(event.getRegion()); ReferenceCountHelper.unskipRefCountTracking(); try { event.setOldValue(oldValueInVMOrDisk, true); @@ -2468,9 +2468,9 @@ public abstract class AbstractRegionMap @Retained @Released -Object oldValueInVM = re.getValueRetain(event.getLocalRegion(), true); // OFFHEAP: re - // synced so can use - // its ref. +Object oldValueInVM = re.getValueRetain(event.getRegion(), true); // OFFHEAP: re + // synced
[geode] branch develop updated: GEODE-4407 (#1499): Refactoring incremental backup logic
This is an automated email from the ASF dual-hosted git repository. agingade pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 2dfc8ae GEODE-4407 (#1499): Refactoring incremental backup logic 2dfc8ae is described below commit 2dfc8aee602d697702ef57bdaf7e12b4815572cf Author: agingadeAuthorDate: Fri Feb 23 11:32:55 2018 -0800 GEODE-4407 (#1499): Refactoring incremental backup logic Removed dependency on target location while fetching backup files from source. --- .../apache/geode/internal/cache/DiskStoreImpl.java | 1 + .../org/apache/geode/internal/cache/Oplog.java | 49 + .../internal/cache/backup/BackupDefinition.java| 20 +- .../internal/cache/backup/BackupFileCopier.java| 4 +- .../{BackupDestination.java => BackupFilter.java} | 12 +- .../geode/internal/cache/backup/BackupService.java | 20 +- .../geode/internal/cache/backup/BackupTask.java| 240 +++-- .../{BackupDestination.java => BackupWriter.java} | 4 +- .../cache/{ => backup}/DiskStoreBackup.java| 13 +- .../cache/backup/FileSystemBackupDestination.java | 145 - .../cache/backup/FileSystemBackupWriter.java | 237 .../FileSystemIncrementalBackupLocation.java | 132 ...stination.java => IncrementalBackupFilter.java} | 25 ++- ...ination.java => IncrementalBackupLocation.java} | 13 +- .../geode/internal/cache/backup/RestoreScript.java | 4 + .../cache/backup/BackupDefinitionTest.java | 21 +- .../backup/BackupFileCopierIntegrationTest.java| 5 +- .../internal/cache/backup/BackupServiceTest.java | 5 +- ...onTest.java => FileSystemBackupWriterTest.java} | 69 +++--- .../FileSystemIncrementalBackupLocationTest.java | 189 .../backup/IncrementalBackupDistributedTest.java | 5 +- 21 files changed, 730 insertions(+), 483 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java index 0ad8310..c4d8fa0 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/DiskStoreImpl.java @@ -89,6 +89,7 @@ import org.apache.geode.i18n.StringId; import org.apache.geode.internal.Version; import org.apache.geode.internal.cache.ExportDiskRegion.ExportWriter; import org.apache.geode.internal.cache.backup.BackupService; +import org.apache.geode.internal.cache.backup.DiskStoreBackup; import org.apache.geode.internal.cache.entries.DiskEntry; import org.apache.geode.internal.cache.entries.DiskEntry.Helper.ValueWrapper; import org.apache.geode.internal.cache.entries.DiskEntry.RecoveredEntry; diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java index 1a9a5844..00fb08e 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java @@ -1215,46 +1215,8 @@ public class Oplog implements CompactableOplog, Flushable { return matchingFiles; } - /** - * Returns a map of baseline oplog files to copy that match this oplog's files for a currently - * running backup. - * - * @param baselineOplogFiles a List of files to match this oplog's filenames against. - * @return a map of baslineline oplog files to copy. May be empty if total current set for this - * oplog does not match the baseline. - */ - public Map mapBaseline(Collection baselineOplogFiles) { -// Map of baseline oplog file name to oplog file -Map baselineOplogMap = -TransformUtils.transformAndMap(baselineOplogFiles, TransformUtils.fileNameTransformer); - -// Returned Map of baseline file to current oplog file -Map baselineToOplogMap = new HashMap<>(); - -// Check for crf existence -if ((null != this.crf.f) && this.crf.f.exists() -&& baselineOplogMap.containsKey(this.crf.f.getName())) { - baselineToOplogMap.put(baselineOplogMap.get(this.crf.f.getName()), - IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(this.crf.f)); -} - -// Check for drf existence -if ((null != this.drf.f) && this.drf.f.exists() -&& baselineOplogMap.containsKey(this.drf.f.getName())) { - baselineToOplogMap.put(baselineOplogMap.get(this.drf.f.getName()), - IOUtils.tryGetCanonicalFileElseGetAbsoluteFile(this.drf.f)); -} - -// Check for krf existence -if (getParent().getDiskInitFile().hasKrf(this.oplogId)) { - File krfFile = getKrfFile(); - if (krfFile.exists() && baselineOplogMap.containsKey(krfFile.getName())) { -
[geode] branch develop updated: GEODE-4559: pass the Cache to a Declarable (#1422)
This is an automated email from the ASF dual-hosted git repository. dschneider pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 3b6a9aa GEODE-4559: pass the Cache to a Declarable (#1422) 3b6a9aa is described below commit 3b6a9aaf9d1ae6608a1fd9ffee01b399a6a11452 Author: Darrel SchneiderAuthorDate: Fri Feb 23 11:32:44 2018 -0800 GEODE-4559: pass the Cache to a Declarable (#1422) * Declarable now has a default method named "initialize(Cache, Properties)". This allows a Declarable to know the cache that created it. Deprecated Declarable.init(Properties). Note that for backwards compatibility, the product calls both these methods. Also the two Declarables that the product implements, AutoBalancer and ReflectionBasedAutoSerializer, implement both these methods but after the first calls subsequent calls of init or initialize will be noops. * initialize on ReflectionBasedAutoSerializer now call setRegionService with the cache. init and initialize can now be called multiple times and each time the properties will be set again. This is for backwards compatibility. * The AutoBalancer no longer looks up the static cache. but instead of given one by the product calling setCache during initialization. --- .../connectors/jdbc/JdbcWriterIntegrationTest.java | 1 - .../java/org/apache/geode/cache/Declarable.java| 19 + .../internal/InternalDistributedSystem.java| 6 -- .../org/apache/geode/internal/DeployedJar.java | 12 +-- .../internal/cache/xmlcache/CacheCreation.java | 68 +-- .../internal/cache/xmlcache/CacheXmlGenerator.java | 12 ++- .../internal/cache/xmlcache/CacheXmlParser.java| 15 ++-- .../cache/xmlcache/ClientCacheCreation.java| 9 +- .../cache/xmlcache/FunctionServiceCreation.java| 23 +++-- .../management/internal/cli/domain/ClassName.java | 7 +- .../functions/CreateAsyncEventQueueFunction.java | 3 +- .../cli/functions/RegionAlterFunction.java | 10 +-- .../cli/functions/RegionCreateFunction.java| 13 +-- .../geode/pdx/ReflectionBasedAutoSerializer.java | 25 +- .../apache/geode/cache30/CacheXml66DUnitTest.java | 6 +- .../apache/geode/cache30/ReconnectDUnitTest.java | 18 ++-- .../cache/xmlcache/CacheCreationJUnitTest.java | 98 ++ .../internal/cli/domain/ClassNameTest.java | 6 +- .../geode/pdx/AutoSerializableJUnitTest.java | 20 ++--- .../java/parReg/query/unittest/NewPortfolio.java | 2 +- .../test/java/parReg/query/unittest/Position.java | 4 +- .../LuceneIndexXmlParserIntegrationJUnitTest.java | 11 ++- .../cache/lucene/test/LuceneTestSerializer.java| 5 ++ .../org/apache/geode/cache/util/AutoBalancer.java | 50 --- .../util/AutoBalancerIntegrationJUnitTest.java | 21 +++-- .../geode/cache/util/AutoBalancerJUnitTest.java| 14 ++-- 26 files changed, 369 insertions(+), 109 deletions(-) diff --git a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java index 86851b9..8401c42 100644 --- a/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java +++ b/geode-connectors/src/test/java/org/apache/geode/connectors/jdbc/JdbcWriterIntegrationTest.java @@ -210,7 +210,6 @@ public class JdbcWriterIntegrationTest { private Region createRegionWithJDBCSynchronousWriter(String regionName) throws ConnectionConfigExistsException, RegionMappingExistsException { jdbcWriter = new JdbcWriter(createSqlHandler()); -jdbcWriter.init(new Properties()); RegionFactory regionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE); diff --git a/geode-core/src/main/java/org/apache/geode/cache/Declarable.java b/geode-core/src/main/java/org/apache/geode/cache/Declarable.java index 6632cb9..c4822c6 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/Declarable.java +++ b/geode-core/src/main/java/org/apache/geode/cache/Declarable.java @@ -63,6 +63,25 @@ public interface Declarable { * * @throws IllegalArgumentException If one of the configuration options in props is * illegal or malformed. + * @deprecated as of Geode 1.5 implement initialize instead. */ default void init(Properties props) {}; + + /** + * Initializes a user-defined object, owned by the given cache, using the given properties. + * Note that any uncaught exception + * thrown by this method will cause the Cache initialization to fail. + * Note that if this method is implemented then the deprecated init method should not be + * implemented. + * The product will call both methods
[geode] branch develop updated: GEODE-3813: Improved and fixed formatting in javaDoc for deprecated behavior (#1500)
This is an automated email from the ASF dual-hosted git repository. jasonhuynh pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 94db6a7 GEODE-3813: Improved and fixed formatting in javaDoc for deprecated behavior (#1500) 94db6a7 is described below commit 94db6a7d3d473fec40540c510858e60ce47cd741 Author: Jason HuynhAuthorDate: Fri Feb 23 10:57:27 2018 -0800 GEODE-3813: Improved and fixed formatting in javaDoc for deprecated behavior (#1500) --- .../main/java/org/apache/geode/cache/Region.java | 63 +- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/cache/Region.java b/geode-core/src/main/java/org/apache/geode/cache/Region.java index bf0d3bb..2a6036f 100644 --- a/geode-core/src/main/java/org/apache/geode/cache/Region.java +++ b/geode-core/src/main/java/org/apache/geode/cache/Region.java @@ -2014,21 +2014,39 @@ public interface Region extends ConcurrentMap { * cleared from the client and the current value for this key is inserted into the local cache * before this call returns. * - * @param key The key on which to register interest. If the key is a List, then all - *the keys in the List will be registered. The key can also be the special - *token 'ALL_KEYS', which will register interest in all keys in the region. In effect, - *this will cause an update to any key in this region in the CacheServer to be pushed to - *the client. + * @param key The key on which to register interest. * * - *This method uses the default InterestResultPolicy. + *###Deprecated behavior### + * + * + *The following List and + *'ALL_KEYS' behavior is now deprecated. As an alternative, please use + * + * + *{@link #registerInterestForKeys(Iterable, InterestResultPolicy)} + * + * + *{@link #registerInterestForAllKeys(InterestResultPolicy)} + * + * + * + *If the key is a List, then all the keys in the + *List will be registered. The key can also be the special token 'ALL_KEYS', + *which will register interest in all keys in the region. In effect, this will cause an + *update to any key in this region in the CacheServer to be pushed to the client. * * * *Using 'ALL_KEYS' is the same as calling {@link #registerInterestRegex(String)} with - *".*" as the argument. This means that all keys any type are pushed to the client and + *".*" as the argument. This means that all keys of any type are pushed to the client and *inserted into the local cache. * + *###End of deprecation### + * + * + *This method uses the default InterestResultPolicy. + * * * *If you locally-destroy a key and your region has concurrency-checks-enabled turned off @@ -2064,22 +2082,39 @@ public interface Region extends ConcurrentMap { * events to your client cache. * * - * @param key The key on which to register interest. If the key is a List, then all - *the keys in the List will be registered. The key can also be the special - *token 'ALL_KEYS', which will register interest in all keys in the region. In effect, - *this will cause an update to any key in this region in the CacheServer to be pushed to - *the client. + * @param key The key on which to register interest. * * - *This method uses the default InterestResultPolicy. + *###Deprecated behavior### + * + * + *The following List and + *'ALL_KEYS' behavior is now deprecated. As an alternative, please use + * + * + *{@link #registerInterestForKeys(Iterable, InterestResultPolicy)} + * + * + *{@link #registerInterestForAllKeys(InterestResultPolicy)} + * + * + * + *If the key is a List, then all the keys in the + *List will be registered. The key can also be the special token 'ALL_KEYS', + *which will register interest in all keys in the region. In effect, this will cause an + *update to any key in this region in the CacheServer to be pushed to the client. * * * *Using 'ALL_KEYS' is the same as calling {@link #registerInterestRegex(String)} with - *".*" as the argument. This means that all keys any type are pushed to the client and + *".*" as the argument. This means that all keys of any type are pushed to the client and *
[geode-native] 02/11: GEODE-4341: Added rename to README
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit aacb32e86ee2f0b521d0294c1e8db05ff9819835 Author: Ryan McMahonAuthorDate: Tue Feb 13 17:37:56 2018 -0800 GEODE-4341: Added rename to README --- examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md index cb8111f..0478098 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md @@ -1,6 +1,7 @@ -# Cache Example +# PutGetRemove Example This is a very simple example showing how to create a `Cache` using the `CacheFactory`, configure a `Pool` with a `PoolFactory`, and configure a `Region` with a `RegionFactory`. +We then put, get, and remove some primitive data in the region. ## Prerequisites * Install [Apache Geode](https://geode.apache.org) @@ -13,7 +14,7 @@ configure a `Pool` with a `PoolFactory`, and configure a `Region` with a `Region gfsh>start server --name=server gfsh>create region --name=region --type=PARTITION ``` -* Execute `Apache.Geode.Examples.Cache.exe`. +* Execute `Apache.Geode.Examples.PutGetRemove.exe`. output: ``` -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 04/11: GEODE-4341: Added startserver and stopserver scripts
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 5e0f766b6905da78adead2a3b2c7d8023cf0f566 Author: Ryan McMahonAuthorDate: Wed Feb 14 16:20:48 2018 -0800 GEODE-4341: Added startserver and stopserver scripts --- .../startserver.ps1| 41 ++ .../stopserver.ps1 | 41 ++ 2 files changed, 82 insertions(+) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 new file mode 100644 index 000..05dfab9 --- /dev/null +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 @@ -0,0 +1,41 @@ +#!/bin/env bash + +# 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 +# +# 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. + +$GFSH_PATH = "" +if (Get-Command gfsh -ErrorAction SilentlyContinue) +{ +$GFSH_PATH = "gfsh" +} +else +{ +if (-not (Test-Path env:GEODE_HOME)) +{ +echo "Could not find gfsh. Please set the GEODE_HOME path. e.g. " +echo "(Powershell) `$env:GEODE_HOME = " +echo " OR" +echo "(Command-line) set %GEODE_HOME% = " +} +else +{ +$GFSH_PATH = "$env:GEODE_HOME\bin\gfsh.bat" +} +} + +if ($GFSH_PATH -ne "") +{ + Invoke-Expression "$GFSH_PATH -e 'start locator --name=locator --dir=$PSScriptRoot' -e 'start server --name=server --dir=$PSScriptRoot' -e 'create region --name=example_userinfo --type=PARTITION'" +} \ No newline at end of file diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/stopserver.ps1 b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/stopserver.ps1 new file mode 100644 index 000..6c78ac8 --- /dev/null +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/stopserver.ps1 @@ -0,0 +1,41 @@ +#!/bin/env bash + +# 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 +# +# 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. + +$GFSH_PATH = "" +if (Get-Command gfsh -ErrorAction SilentlyContinue) +{ +$GFSH_PATH = "gfsh" +} +else +{ +if (-not (Test-Path env:GEODE_HOME)) +{ +echo "Could not find gfsh. Please set the GEODE_HOME path. e.g. " +echo "(Powershell) `$env:GEODE_HOME = " +echo " OR" +echo "(Command-line) set %GEODE_HOME% = " +} +else +{ +$GFSH_PATH = "$env:GEODE_HOME\bin\gfsh.bat" +} +} + +if ($GFSH_PATH -ne "") +{ + Invoke-Expression "$GFSH_PATH -e 'connect' -e 'destroy region --name=example_userinfo' -e 'stop server --name=server' -e 'stop locator --name=locator'" +} \ No newline at end of file -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 07/11: WIP: builds from command line, dunno if it works in the IDE
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 9cbf42875fcbcd2b24d71bbe6579dd539ebb92a5 Author: Blake BenderAuthorDate: Tue Feb 20 21:11:15 2018 + WIP: builds from command line, dunno if it works in the IDE --- .../dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt index 39ba4aa..620fa21 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt @@ -20,10 +20,16 @@ project(PutGetRemove CSharp) add_executable(${PROJECT_NAME} Program.cs) +message(STATUS "output dir is ${RUNTIME_OUTPUT_DIRECTORY}") +message(STATUS "project binary dir: ${PROJECT_BINARY_DIR}") + +message(STATUS "current source dir is ${CMAKE_CURRENT_SOURCE_DIR}") +message(STATUS "Attempting to link to ${CMAKE_CURRENT_SOURCE_DIR}/../../../build/clicache/src/Debug/Apache.Geode.dll") + target_link_libraries(${PROJECT_NAME} -${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/Pivotal.Gemfire.dll) + ${CMAKE_CURRENT_SOURCE_DIR}/../../../build/clicache/src/Debug/Apache.Geode.dll) set_property(TARGET PutGetRemove PROPERTY VS_DOTNET_REFERENCES "System" -"Pivotal.Gemfire") + "${CMAKE_CURRENT_SOURCE_DIR}\\..\\..\\..\\build\\clicache\\src\\Debug\\Apache.Geode.dll") -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] branch develop updated (2501051 -> 7bf9fa8)
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a change to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git. from 2501051 GEODE-4697: Removing FunctionExecutionTimeout from CLI tests new 457f11e GEODE-4341: Renaming 'Cache' to 'PutGetRemove' new aacb32e GEODE-4341: Added rename to README new 60ff97a GEODE-4341: Working example of PutGetRemove new 5e0f766 GEODE-4341: Added startserver and stopserver scripts new 328faae GEODE-4341: Set new location for locator and server new b3d958d GEODE-4341: Added cmake files for examples new 9cbf428 WIP: builds from command line, dunno if it works in the IDE new be518d0 WIP: cmake code to allow us to generate projects and build C# examples. new c6d72b0 WIP: seems to be all working now new a66cc63 GEODE-4341: Fix missing line in README.md new 7bf9fa8 GEODE-4341: Incorporate PR feedback The 11 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../Apache.Geode.Examples.AuthInitialize.csproj| 62 --- .../dotnet/Apache.Geode.Examples.Cache/Program.cs | 51 examples/dotnet/Apache.Geode.Examples.sln | 33 -- .../AuthInitialize}/CMakeLists.txt | 33 +- .../ExampleAuthInitialize.cs | 0 .../Program.cs | 0 .../README.md | 0 .../AuthInitialize/startserver.ps1}| 35 +++ .../AuthInitialize/stopserver.ps1} | 35 +++ examples/{ => dotnet}/CMakeLists.txt | 7 ++- .../Apache.Geode.Examples.PutGetRemove.csproj} | 4 +- .../PutGetRemove}/CMakeLists.txt | 32 +- examples/dotnet/PutGetRemove/Program.cs| 70 ++ .../README.md | 15 +++-- .../PutGetRemove/startserver.ps1} | 35 +++ .../PutGetRemove/stopserver.ps1} | 35 +++ examples/dotnet/README.md | 11 +++- 17 files changed, 220 insertions(+), 238 deletions(-) delete mode 100644 examples/dotnet/Apache.Geode.Examples.AuthInitialize/Apache.Geode.Examples.AuthInitialize.csproj delete mode 100644 examples/dotnet/Apache.Geode.Examples.Cache/Program.cs delete mode 100644 examples/dotnet/Apache.Geode.Examples.sln copy examples/{cpp/customserializable => dotnet/AuthInitialize}/CMakeLists.txt (52%) rename examples/dotnet/{Apache.Geode.Examples.AuthInitialize => AuthInitialize}/ExampleAuthInitialize.cs (100%) rename examples/dotnet/{Apache.Geode.Examples.AuthInitialize => AuthInitialize}/Program.cs (100%) rename examples/dotnet/{Apache.Geode.Examples.AuthInitialize => AuthInitialize}/README.md (100%) copy examples/{cpp/put-get-remove/startserver.sh => dotnet/AuthInitialize/startserver.ps1} (53%) mode change 100755 => 100644 copy examples/{cpp/put-get-remove/startserver.sh => dotnet/AuthInitialize/stopserver.ps1} (56%) mode change 100755 => 100644 copy examples/{ => dotnet}/CMakeLists.txt (89%) rename examples/dotnet/{Apache.Geode.Examples.Cache/Apache.Geode.Examples.Cache.csproj => PutGetRemove/Apache.Geode.Examples.PutGetRemove.csproj} (95%) copy examples/{cpp/customserializable => dotnet/PutGetRemove}/CMakeLists.txt (53%) create mode 100644 examples/dotnet/PutGetRemove/Program.cs rename examples/dotnet/{Apache.Geode.Examples.Cache => PutGetRemove}/README.md (53%) copy examples/{cpp/put-get-remove/startserver.sh => dotnet/PutGetRemove/startserver.ps1} (53%) mode change 100755 => 100644 copy examples/{cpp/put-get-remove/startserver.sh => dotnet/PutGetRemove/stopserver.ps1} (55%) mode change 100755 => 100644 -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 10/11: GEODE-4341: Fix missing line in README.md
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit a66cc633c66ed707ea11c10c33b9a3214d22205f Author: Blake BenderAuthorDate: Wed Feb 21 13:59:37 2018 -0600 GEODE-4341: Fix missing line in README.md --- examples/dotnet/README.md | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/dotnet/README.md b/examples/dotnet/README.md index ebb76d4..7682936 100644 --- a/examples/dotnet/README.md +++ b/examples/dotnet/README.md @@ -12,9 +12,10 @@ ## Using 1) Use cmake to generate the .sln and .vcxproj files for the Examples ``` - cd examples\dotnet - mkdir build - cmake .. -G"Visual Studio 14 2015 Win64" -DGEODE_ASSEMBLY=C:\path\to\Apache.Geode.dll -Thost=x64 +cd examples\dotnet +mkdir build +cd build +cmake .. -G"Visual Studio 14 2015 Win64" -DGEODE_ASSEMBLY=C:\path\to\Apache.Geode.dll -Thost=x64 ``` 2) Open `Apache.Geode.Examples.sln` in [Visual Studio 2015](https://www.visualstudio.com/) or newer. -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 08/11: WIP: cmake code to allow us to generate projects and build C# examples.
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit be518d004427b490edbd9bc39cee1be930882d5b Author: Blake BenderAuthorDate: Wed Feb 21 16:27:44 2018 + WIP: cmake code to allow us to generate projects and build C# examples. --- .../Apache.Geode.Examples.PutGetRemove/CMakeLists.txt| 4 ++-- examples/dotnet/CMakeLists.txt | 2 ++ examples/dotnet/cmake/FindGeodeAssembly.cmake| 16 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt index 620fa21..ab638b8 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt @@ -27,9 +27,9 @@ message(STATUS "current source dir is ${CMAKE_CURRENT_SOURCE_DIR}") message(STATUS "Attempting to link to ${CMAKE_CURRENT_SOURCE_DIR}/../../../build/clicache/src/Debug/Apache.Geode.dll") target_link_libraries(${PROJECT_NAME} - ${CMAKE_CURRENT_SOURCE_DIR}/../../../build/clicache/src/Debug/Apache.Geode.dll) + ${GEODE_ASSEMBLY}) set_property(TARGET PutGetRemove PROPERTY VS_DOTNET_REFERENCES "System" - "${CMAKE_CURRENT_SOURCE_DIR}\\..\\..\\..\\build\\clicache\\src\\Debug\\Apache.Geode.dll") +"${GEODE_ASSEMBLY}") diff --git a/examples/dotnet/CMakeLists.txt b/examples/dotnet/CMakeLists.txt index dda8923..96223d1 100644 --- a/examples/dotnet/CMakeLists.txt +++ b/examples/dotnet/CMakeLists.txt @@ -15,4 +15,6 @@ cmake_minimum_required(VERSION 3.4) project(examples) +include(cmake/FindGeodeAssembly.cmake) + add_subdirectory(Apache.Geode.Examples.PutGetRemove) diff --git a/examples/dotnet/cmake/FindGeodeAssembly.cmake b/examples/dotnet/cmake/FindGeodeAssembly.cmake new file mode 100644 index 000..3c0208c --- /dev/null +++ b/examples/dotnet/cmake/FindGeodeAssembly.cmake @@ -0,0 +1,16 @@ +set(GEODE_ASSEMBLY_DEBUG_IN_BUILT_SOURCE_TREE "${CMAKE_CURRENT_SOURCE_DIR}/../../build/clicache/src/Debug/Apache.Geode.dll") +set(GEODE_ASSEMBLY_IN_BUILT_SOURCE_TREE "${CMAKE_CURRENT_SOURCE_DIR}/../../build/clicache/src/Release/Apache.Geode.dll") +set(GEODE_ASSEMBLY_IN_INSTALL_TREE "${CMAKE_CURRENT_SOURCE_DIR}/../../bin/Apache.Geode.dll") + + +if (EXISTS ${GEODE_ASSEMBLY_IN_INSTALL_TREE}) + set(GEODE_ASSEMBLY ${GEODE_ASSEMBLY_IN_INSTALL_TREE}) +elseif (EXISTS ${GEODE_ASSEMBLY_DEBUG_IN_BUILT_SOURCE_TREE}) + set(GEODE_ASSEMBLY ${GEODE_ASSEMBLY_DEBUG_IN_BUILT_SOURCE_TREE}) +elseif (EXISTS ${GEODE_ASSEMBLY_IN_BUILT_SOURCE_TREE}) + set(GEODE_ASSEMBLY ${GEODE_ASSEMBLY_IN_BUILT_SOURCE_TREE}) +else() + set(GEODE_ASSEMBLY "GEODE_ASSEMBLY-NOT_FOUND") +endif() + +message(STATUS "Geode assembly located at ${GEODE_ASSEMBLY}") -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 01/11: GEODE-4341: Renaming 'Cache' to 'PutGetRemove'
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 457f11efa80068c83d7239313bec0c6af41be04d Author: Ryan McMahonAuthorDate: Tue Feb 13 17:22:48 2018 -0800 GEODE-4341: Renaming 'Cache' to 'PutGetRemove' --- .../Apache.Geode.Examples.PutGetRemove.csproj}| 4 ++-- .../Program.cs| 0 .../README.md | 0 examples/dotnet/Apache.Geode.Examples.sln | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/dotnet/Apache.Geode.Examples.Cache/Apache.Geode.Examples.Cache.csproj b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/Apache.Geode.Examples.PutGetRemove.csproj similarity index 95% rename from examples/dotnet/Apache.Geode.Examples.Cache/Apache.Geode.Examples.Cache.csproj rename to examples/dotnet/Apache.Geode.Examples.PutGetRemove/Apache.Geode.Examples.PutGetRemove.csproj index f7e1a01..bc3bb04 100644 --- a/examples/dotnet/Apache.Geode.Examples.Cache/Apache.Geode.Examples.Cache.csproj +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/Apache.Geode.Examples.PutGetRemove.csproj @@ -23,8 +23,8 @@ limitations under the License. {15ACFB5B-0D2C-4C38-9236-7AF01874A84F} Exe Properties -Apache.Geode.Examples.Cache -Apache.Geode.Examples.Cache +Apache.Geode.Examples.PutGetRemove +Apache.Geode.Examples.PutGetRemove v4.5.2 512 true diff --git a/examples/dotnet/Apache.Geode.Examples.Cache/Program.cs b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/Program.cs similarity index 100% rename from examples/dotnet/Apache.Geode.Examples.Cache/Program.cs rename to examples/dotnet/Apache.Geode.Examples.PutGetRemove/Program.cs diff --git a/examples/dotnet/Apache.Geode.Examples.Cache/README.md b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md similarity index 100% rename from examples/dotnet/Apache.Geode.Examples.Cache/README.md rename to examples/dotnet/Apache.Geode.Examples.PutGetRemove/README.md diff --git a/examples/dotnet/Apache.Geode.Examples.sln b/examples/dotnet/Apache.Geode.Examples.sln index 74295f0..8ee70be 100644 --- a/examples/dotnet/Apache.Geode.Examples.sln +++ b/examples/dotnet/Apache.Geode.Examples.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Geode.Examples.Cache", "Apache.Geode.Examples.Cache\Apache.Geode.Examples.Cache.csproj", "{15ACFB5B-0D2C-4C38-9236-7AF01874A84F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Geode.Examples.PutGetRemove", "Apache.Geode.Examples.PutGetRemove\Apache.Geode.Examples.PutGetRemove.csproj", "{15ACFB5B-0D2C-4C38-9236-7AF01874A84F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Geode.Examples.AuthInitialize", "Apache.Geode.Examples.AuthInitialize\Apache.Geode.Examples.AuthInitialize.csproj", "{047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36}" EndProject -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 09/11: WIP: seems to be all working now
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit c6d72b0b520c3cc42971d832a145eb2b8e02b23f Author: Blake BenderAuthorDate: Wed Feb 21 19:06:54 2018 + WIP: seems to be all working now --- .../CMakeLists.txt | 6 examples/dotnet/Apache.Geode.Examples.sln | 33 -- examples/dotnet/CMakeLists.txt | 3 +- examples/dotnet/README.md | 10 +-- examples/dotnet/cmake/FindGeodeAssembly.cmake | 16 --- 5 files changed, 15 insertions(+), 53 deletions(-) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt index ab638b8..3a8d7e1 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt @@ -17,6 +17,12 @@ cmake_minimum_required(VERSION 3.8.2) project(PutGetRemove CSharp) +message(STATUS "Assembly is ${GEODE_ASSEMBLY}") + +if ("${GEODE_ASSEMBLY}" STREQUAL "") + message(FATAL_ERROR "GEODE_ASSEMBLY not set, examples will not build without it") +endif() + add_executable(${PROJECT_NAME} Program.cs) diff --git a/examples/dotnet/Apache.Geode.Examples.sln b/examples/dotnet/Apache.Geode.Examples.sln deleted file mode 100644 index 8ee70be..000 --- a/examples/dotnet/Apache.Geode.Examples.sln +++ /dev/null @@ -1,33 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Geode.Examples.PutGetRemove", "Apache.Geode.Examples.PutGetRemove\Apache.Geode.Examples.PutGetRemove.csproj", "{15ACFB5B-0D2C-4C38-9236-7AF01874A84F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Geode.Examples.AuthInitialize", "Apache.Geode.Examples.AuthInitialize\Apache.Geode.Examples.AuthInitialize.csproj", "{047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CB7AB243-26A9-4B20-8ED9-5D35D12F9FF3}" - ProjectSection(SolutionItems) = preProject - README.md = README.md - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {15ACFB5B-0D2C-4C38-9236-7AF01874A84F}.Debug|x64.ActiveCfg = Debug|x64 - {15ACFB5B-0D2C-4C38-9236-7AF01874A84F}.Debug|x64.Build.0 = Debug|x64 - {15ACFB5B-0D2C-4C38-9236-7AF01874A84F}.Release|x64.ActiveCfg = Release|x64 - {15ACFB5B-0D2C-4C38-9236-7AF01874A84F}.Release|x64.Build.0 = Release|x64 - {047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36}.Debug|x64.ActiveCfg = Debug|x64 - {047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36}.Debug|x64.Build.0 = Debug|x64 - {047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36}.Release|x64.ActiveCfg = Release|x64 - {047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/examples/dotnet/CMakeLists.txt b/examples/dotnet/CMakeLists.txt index 96223d1..db538ad 100644 --- a/examples/dotnet/CMakeLists.txt +++ b/examples/dotnet/CMakeLists.txt @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. cmake_minimum_required(VERSION 3.4) -project(examples) -include(cmake/FindGeodeAssembly.cmake) +project(Apache.Geode.Examples) add_subdirectory(Apache.Geode.Examples.PutGetRemove) diff --git a/examples/dotnet/README.md b/examples/dotnet/README.md index 9b66b74..ebb76d4 100644 --- a/examples/dotnet/README.md +++ b/examples/dotnet/README.md @@ -2,6 +2,7 @@ ## Prerequisites * Install [Apache Geode](https://geode.apache.org) +* Install [CMake](https://cmake.org/download/) * Build and install [Apache Geode Native](https://github.com/apache/geode-native) ## Examples @@ -9,6 +10,11 @@ * [Apache.Geode.Examples.Cache](Apache.Geode.Examples.Cache/README.md) ## Using -1) Open `Apache.Geode.Examples.sln` in [Visual Studio 2015](https://www.visualstudio.com/) +1) Use cmake to generate the .sln and .vcxproj files for the Examples +``` + cd examples\dotnet + mkdir build + cmake .. -G"Visual Studio 14 2015 Win64" -DGEODE_ASSEMBLY=C:\path\to\Apache.Geode.dll -Thost=x64 +``` +2) Open `Apache.Geode.Examples.sln` in [Visual Studio
[geode-native] 06/11: GEODE-4341: Added cmake files for examples
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit b3d958df8acacc9ed0054eb94804055bfd015515 Author: Ryan McMahonAuthorDate: Thu Feb 15 17:11:17 2018 -0800 GEODE-4341: Added cmake files for examples --- .../CMakeLists.txt | 29 ++ examples/dotnet/CMakeLists.txt | 18 ++ 2 files changed, 47 insertions(+) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt new file mode 100644 index 000..39ba4aa --- /dev/null +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt @@ -0,0 +1,29 @@ +# 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 +# +# 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. + +cmake_minimum_required(VERSION 3.8.2) + +project(PutGetRemove CSharp) + +add_executable(${PROJECT_NAME} +Program.cs) + +target_link_libraries(${PROJECT_NAME} +${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/Pivotal.Gemfire.dll) + +set_property(TARGET PutGetRemove PROPERTY VS_DOTNET_REFERENCES +"System" +"Pivotal.Gemfire") + diff --git a/examples/dotnet/CMakeLists.txt b/examples/dotnet/CMakeLists.txt new file mode 100644 index 000..dda8923 --- /dev/null +++ b/examples/dotnet/CMakeLists.txt @@ -0,0 +1,18 @@ +# 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 +# +# 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. +cmake_minimum_required(VERSION 3.4) +project(examples) + +add_subdirectory(Apache.Geode.Examples.PutGetRemove) -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode-native] 11/11: GEODE-4341: Incorporate PR feedback
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 7bf9fa8afbbd4a0b9a74a9c9b0c081a8ebbae5d4 Author: Blake BenderAuthorDate: Thu Feb 22 22:41:11 2018 + GEODE-4341: Incorporate PR feedback --- .../Apache.Geode.Examples.AuthInitialize.csproj| 62 -- .../CMakeLists.txt | 7 +-- .../ExampleAuthInitialize.cs | 0 .../Program.cs | 0 .../README.md | 0 .../startserver.ps1| 2 +- .../stopserver.ps1 | 2 +- examples/dotnet/CMakeLists.txt | 3 +- .../Apache.Geode.Examples.PutGetRemove.csproj | 0 .../CMakeLists.txt | 0 .../Program.cs | 2 +- .../README.md | 0 .../startserver.ps1| 0 .../stopserver.ps1 | 0 14 files changed, 9 insertions(+), 69 deletions(-) diff --git a/examples/dotnet/Apache.Geode.Examples.AuthInitialize/Apache.Geode.Examples.AuthInitialize.csproj b/examples/dotnet/Apache.Geode.Examples.AuthInitialize/Apache.Geode.Examples.AuthInitialize.csproj deleted file mode 100644 index 74be271..000 --- a/examples/dotnet/Apache.Geode.Examples.AuthInitialize/Apache.Geode.Examples.AuthInitialize.csproj +++ /dev/null @@ -1,62 +0,0 @@ - -http://schemas.microsoft.com/developer/msbuild/2003;> - - -Debug -AnyCPU -{047FC72E-F06D-4F3A-9EF3-B66FAE4B6C36} -Exe -Properties -Apache.Geode.Examples.AuthInitialize -Apache.Geode.Examples.AuthInitialize -v4.5.2 -512 -true - - -true -bin\x64\Debug\ -DEBUG;TRACE -full -x64 -prompt -MinimumRecommendedRules.ruleset -true - - -bin\x64\Release\ -TRACE -true -pdbonly -x64 -prompt -MinimumRecommendedRules.ruleset -true - - - - ..\..\..\..\build\clicache\src\Debug\Apache.Geode.dll - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt b/examples/dotnet/AuthInitialize/CMakeLists.txt similarity index 91% copy from examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt copy to examples/dotnet/AuthInitialize/CMakeLists.txt index 3a8d7e1..b5bb961 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/CMakeLists.txt +++ b/examples/dotnet/AuthInitialize/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 3.8.2) -project(PutGetRemove CSharp) +project(AuthInitialize CSharp) message(STATUS "Assembly is ${GEODE_ASSEMBLY}") @@ -24,7 +24,8 @@ if ("${GEODE_ASSEMBLY}" STREQUAL "") endif() add_executable(${PROJECT_NAME} -Program.cs) +Program.cs + ExampleAuthInitialize.cs) message(STATUS "output dir is ${RUNTIME_OUTPUT_DIRECTORY}") message(STATUS "project binary dir: ${PROJECT_BINARY_DIR}") @@ -35,7 +36,7 @@ message(STATUS "Attempting to link to ${CMAKE_CURRENT_SOURCE_DIR}/../../../build target_link_libraries(${PROJECT_NAME} ${GEODE_ASSEMBLY}) -set_property(TARGET PutGetRemove PROPERTY VS_DOTNET_REFERENCES +set_property(TARGET ${PROJECT_NAME} PROPERTY VS_DOTNET_REFERENCES "System" "${GEODE_ASSEMBLY}") diff --git a/examples/dotnet/Apache.Geode.Examples.AuthInitialize/ExampleAuthInitialize.cs b/examples/dotnet/AuthInitialize/ExampleAuthInitialize.cs similarity index 100% rename from examples/dotnet/Apache.Geode.Examples.AuthInitialize/ExampleAuthInitialize.cs rename to examples/dotnet/AuthInitialize/ExampleAuthInitialize.cs diff --git a/examples/dotnet/Apache.Geode.Examples.AuthInitialize/Program.cs b/examples/dotnet/AuthInitialize/Program.cs similarity index 100% rename from examples/dotnet/Apache.Geode.Examples.AuthInitialize/Program.cs rename to examples/dotnet/AuthInitialize/Program.cs diff --git a/examples/dotnet/Apache.Geode.Examples.AuthInitialize/README.md b/examples/dotnet/AuthInitialize/README.md similarity index 100% rename from examples/dotnet/Apache.Geode.Examples.AuthInitialize/README.md rename to examples/dotnet/AuthInitialize/README.md diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 b/examples/dotnet/AuthInitialize/startserver.ps1 similarity index 94% copy from examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 copy to examples/dotnet/AuthInitialize/startserver.ps1 index cdffe7a..49d764e 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 +++ b/examples/dotnet/AuthInitialize/startserver.ps1 @@ -37,5 +37,5 @@ else if ($GFSH_PATH -ne "") { - Invoke-Expression
[geode-native] 05/11: GEODE-4341: Set new location for locator and server
This is an automated email from the ASF dual-hosted git repository. echobravo pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode-native.git commit 328faaef00812336405a3bc8b1856bb1ca567850 Author: Ryan McMahonAuthorDate: Wed Feb 14 17:07:15 2018 -0800 GEODE-4341: Set new location for locator and server Signed-off-by: Ivan Godwin --- examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 index 05dfab9..cdffe7a 100644 --- a/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 +++ b/examples/dotnet/Apache.Geode.Examples.PutGetRemove/startserver.ps1 @@ -37,5 +37,5 @@ else if ($GFSH_PATH -ne "") { - Invoke-Expression "$GFSH_PATH -e 'start locator --name=locator --dir=$PSScriptRoot' -e 'start server --name=server --dir=$PSScriptRoot' -e 'create region --name=example_userinfo --type=PARTITION'" + Invoke-Expression "$GFSH_PATH -e 'start locator --name=locator --dir=$PSScriptRoot\locator' -e 'start server --name=server --dir=$PSScriptRoot\server' -e 'create region --name=example_userinfo --type=PARTITION'" } \ No newline at end of file -- To stop receiving notification emails like this one, please contact echobr...@apache.org.
[geode] branch develop updated: GEODE-4722: Refactor CliUtil (#1487)
This is an automated email from the ASF dual-hosted git repository. prhomberg pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new df093b5 GEODE-4722: Refactor CliUtil (#1487) df093b5 is described below commit df093b5b8f2d1bee549e0b76472b4fcdd51ddc7f Author: Patrick RhombergAuthorDate: Fri Feb 23 10:03:45 2018 -0800 GEODE-4722: Refactor CliUtil (#1487) * Reorder methods, grouped by similar functionality. * Replace .stackTraceToString and .contains with Apache Commons methods. * Moved getClientIdFromCacheClientProxy to only class that calls it. * Move arrayToString from CliUtil to sensible StringUtils. Moved associated test. * Refactor CliUtil methods. --- .../jdbc/internal/cli/ExceptionHandler.java| 3 +- .../distributed/internal/InternalLocator.java | 5 +- .../geode/internal/admin/ClientStatsManager.java | 5 +- .../apache/geode/internal/lang/StringUtils.java| 13 + .../internal/beans/CacheServerBridge.java | 16 +- .../geode/management/internal/cli/CliUtil.java | 653 + .../internal/cli/CommandResponseBuilder.java | 4 +- .../geode/management/internal/cli/Launcher.java| 7 +- .../cli/commands/CompactDiskStoreCommand.java | 3 +- .../commands/CompactOfflineDiskStoreCommand.java | 3 +- .../internal/cli/commands/CreateRegionCommand.java | 6 +- .../cli/commands/DescribeMemberCommand.java| 5 +- .../cli/commands/DescribeRegionCommand.java| 5 +- .../commands/UpgradeOfflineDiskStoreCommand.java | 3 +- .../internal/cli/domain/RegionAttributesInfo.java | 3 +- .../cli/functions/AlterRuntimeConfigFunction.java | 4 +- .../cli/functions/GarbageCollectionFunction.java | 5 +- .../cli/functions/RegionAlterFunction.java | 3 +- .../cli/functions/RegionCreateFunction.java| 3 +- .../geode/management/internal/cli/shell/Gfsh.java | 2 +- .../internal/cli/util/DiskStoreCompacter.java | 13 +- .../internal/cli/util/DiskStoreUpgrader.java | 13 +- .../geode/internal/lang/StringUtilsJUnitTest.java | 11 + .../geode/management/internal/cli/CliUtilTest.java | 11 - .../cli/commands/ClientCommandsTestUtils.java | 5 +- .../commands/DescribeClientCommandDUnitTest.java | 14 +- .../cli/commands/ListClientCommandDUnitTest.java | 7 +- 27 files changed, 392 insertions(+), 433 deletions(-) diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ExceptionHandler.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ExceptionHandler.java index 0909d7a..59b4a6a 100644 --- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ExceptionHandler.java +++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/internal/cli/ExceptionHandler.java @@ -16,6 +16,7 @@ package org.apache.geode.connectors.jdbc.internal.cli; import java.io.Serializable; +import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.logging.log4j.Logger; import org.apache.geode.cache.Cache; @@ -51,7 +52,7 @@ class ExceptionHandler implements Serializable { private String getExceptionMessage(final Exception exception) { String message = exception.getMessage(); if (message == null) { - message = CliUtil.stackTraceAsString(exception); + message = ExceptionUtils.getStackTrace(exception); } return message; } diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java index 8608b5c..7c7b5af 100644 --- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java +++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java @@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.logging.log4j.Logger; import org.apache.geode.CancelException; @@ -75,7 +76,6 @@ import org.apache.geode.internal.net.SocketCreator; import org.apache.geode.internal.net.SocketCreatorFactory; import org.apache.geode.management.internal.JmxManagerLocator; import org.apache.geode.management.internal.JmxManagerLocatorRequest; -import org.apache.geode.management.internal.cli.CliUtil; import org.apache.geode.management.internal.configuration.domain.SharedConfigurationStatus; import org.apache.geode.management.internal.configuration.handlers.SharedConfigurationStatusRequestHandler; import org.apache.geode.management.internal.configuration.messages.SharedConfigurationStatusRequest; @@ -1123,7 +1123,8 @@ public class
[geode] branch develop updated: GEODE-4703: Prevent sending RemoveCacheServerProfileMessage to older members (#1468)
This is an automated email from the ASF dual-hosted git repository. jasonhuynh pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 1d1bc3b GEODE-4703: Prevent sending RemoveCacheServerProfileMessage to older members (#1468) 1d1bc3b is described below commit 1d1bc3b25dc82412edaf127e5f0e55cee924df6e Author: Jason HuynhAuthorDate: Fri Feb 23 09:43:20 2018 -0800 GEODE-4703: Prevent sending RemoveCacheServerProfileMessage to older members (#1468) --- .../geode/internal/cache/GemFireCacheImpl.java | 13 +++ .../cache/wan/WANRollingUpgradeDUnitTest.java | 42 ++ 2 files changed, 55 insertions(+) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java index efb6f07..6efb94c 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/GemFireCacheImpl.java @@ -175,6 +175,7 @@ import org.apache.geode.i18n.LogWriterI18n; import org.apache.geode.internal.Assert; import org.apache.geode.internal.ClassPathLoader; import org.apache.geode.internal.SystemTimer; +import org.apache.geode.internal.Version; import org.apache.geode.internal.cache.backup.BackupService; import org.apache.geode.internal.cache.control.InternalResourceManager; import org.apache.geode.internal.cache.control.InternalResourceManager.ResourceType; @@ -4575,6 +4576,18 @@ public class GemFireCacheImpl implements InternalCache, InternalClientCache, Has Set otherMembers = this.dm.getOtherDistributionManagerIds(); RemoveCacheServerProfileMessage message = new RemoveCacheServerProfileMessage(); message.operateOnLocalCache(this); + +// Remove this while loop when we release GEODE 2.0 +// This block prevents sending a message to old members that do not know about +// the RemoveCacheServerProfileMessage +Iterator memberIterator = otherMembers.iterator(); +while (memberIterator.hasNext()) { + InternalDistributedMember member = (InternalDistributedMember) memberIterator.next(); + if (Version.GEODE_150.compareTo(member.getVersionObject()) > 0) { +memberIterator.remove(); + } +} + if (!otherMembers.isEmpty()) { if (logger.isDebugEnabled()) { logger.debug("Sending add cache server profile message to other members."); diff --git a/geode-wan/src/test/java/org/apache/geode/cache/wan/WANRollingUpgradeDUnitTest.java b/geode-wan/src/test/java/org/apache/geode/cache/wan/WANRollingUpgradeDUnitTest.java index 8b4a0d3..e2dc99c 100644 --- a/geode-wan/src/test/java/org/apache/geode/cache/wan/WANRollingUpgradeDUnitTest.java +++ b/geode-wan/src/test/java/org/apache/geode/cache/wan/WANRollingUpgradeDUnitTest.java @@ -664,6 +664,48 @@ public class WANRollingUpgradeDUnitTest extends JUnit4CacheTestCase { assertEquals(0, remoteServer1EventsReceived + remoteServer2EventsReceived); } + @Test + public void testVerifyGatewayReceiverDoesNotSendRemoveCacheServerProfileToMembersOlderThan1dot5() + throws Exception { +final Host host = Host.getHost(0); +VM oldLocator = host.getVM(oldVersion, 0); +VM oldServer = host.getVM(oldVersion, 1); +VM currentServer = host.getVM(VersionManager.CURRENT_VERSION, 2); + +// Start locator +final int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET); +DistributedTestUtils.deleteLocatorStateFile(port); +final String locators = NetworkUtils.getServerHostName(host) + "[" + port + "]"; +oldLocator.invoke(() -> startLocator(port, 0, locators, "")); + +IgnoredException ie = +IgnoredException.addIgnoredException("could not get remote locator information"); +try { + // Start old server + oldServer.invoke(() -> createCache(locators)); + + // Locators before 1.4 handled configuration asynchronously. + // We must wait for configuration configuration to be ready, or confirm that it is disabled. + oldLocator.invoke( + () -> Awaitility.await().atMost(65, TimeUnit.SECONDS).pollInterval(1, TimeUnit.SECONDS) + .until(() -> assertTrue( + !InternalLocator.getLocator().getConfig().getEnableClusterConfiguration() + || InternalLocator.getLocator().isSharedConfigurationRunning(; + + oldServer.invoke(() -> createGatewayReceiver()); + + currentServer.invoke(() -> createCache(locators)); + + currentServer.invoke(() -> createGatewayReceiver()); + currentServer.invoke(() -> getCache().getGatewayReceivers().forEach(r -> { +r.stop(); +r.destroy(); + })); +} finally { + ie.remove(); +} + } + private void createCache(String locators) { Properties props
[geode] branch develop updated: GEODE-4402: Add logging where exceptions would be thrown or caught. (#1452)
This is an automated email from the ASF dual-hosted git repository. pivotalsarge pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 1f2193b GEODE-4402: Add logging where exceptions would be thrown or caught. (#1452) 1f2193b is described below commit 1f2193bdfc7845e40ff75e6bde16840cdce7269a Author: Michael "Sarge" DodgeAuthorDate: Fri Feb 23 07:56:54 2018 -0800 GEODE-4402: Add logging where exceptions would be thrown or caught. (#1452) * GEODE-4402: Add logging where exceptions would be thrown or caught. * GEODE-4402: Address review comments. * GEODE-4402: Add another ignore exception. * GEODE-4402: Fix spotless. * Adding log messages that were lost on the merge commit --- .../v1/LocatorMessageExecutionContext.java | 2 -- .../protocol/protobuf/v1/ProtobufOpsProcessor.java | 2 +- .../protobuf/v1/ProtobufSerializationService.java | 1 - .../protobuf/v1/ProtobufStreamProcessor.java | 1 + .../protobuf/v1/ServerMessageExecutionContext.java | 2 -- .../AbstractFunctionRequestOperationHandler.java | 22 +- .../v1/operations/ProtocolVersionHandler.java | 4 .../AuthenticationRequestOperationHandler.java | 8 .../v1/acceptance/LocatorConnectionDUnitTest.java | 3 +++ 9 files changed, 26 insertions(+), 19 deletions(-) diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/LocatorMessageExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/LocatorMessageExecutionContext.java index a38f49c..b615326 100644 --- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/LocatorMessageExecutionContext.java +++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/LocatorMessageExecutionContext.java @@ -15,7 +15,6 @@ package org.apache.geode.internal.protocol.protobuf.v1; - import org.apache.geode.annotations.Experimental; import org.apache.geode.distributed.Locator; import org.apache.geode.internal.cache.InternalCache; @@ -57,5 +56,4 @@ public class LocatorMessageExecutionContext extends MessageExecutionContext { public Locator getLocator() throws InvalidExecutionContextException { return locator; } - } diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufOpsProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufOpsProcessor.java index 7f1996c..eca629d 100644 --- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufOpsProcessor.java +++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufOpsProcessor.java @@ -32,7 +32,6 @@ import org.apache.geode.internal.protocol.protobuf.v1.state.exception.OperationN */ @Experimental public class ProtobufOpsProcessor { - private final ProtobufOperationContextRegistry protobufOperationContextRegistry; private final ProtobufSerializationService serializationService; private static final Logger logger = LogService.getLogger(ProtobufOpsProcessor.class); @@ -81,6 +80,7 @@ public class ProtobufOpsProcessor { operationContext.getFromRequest().apply(request), context); } catch (InvalidExecutionContextException exception) { logger.error("Invalid execution context found for operation {}", requestType); + logger.error(exception); return Failure.of(BasicTypes.ErrorCode.INVALID_REQUEST, "Invalid execution context found for operation."); } diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufSerializationService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufSerializationService.java index e2a8429..d20b05e 100644 --- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufSerializationService.java +++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/v1/ProtobufSerializationService.java @@ -171,5 +171,4 @@ public class ProtobufSerializationService implements SerializationService implements ProtobufOperationHandler { - + private static final Logger logger = LogService.getLogger(); @Override public Result process(ProtobufSerializationService serializationService, Req request, @@ -60,8 +63,9 @@ public abstract class AbstractFunctionRequestOperationHandler // check security for function. function.getRequiredPermissions(regionName).forEach(securityService::authorize); } catch (NotAuthorizedException ex) { - return Failure.of(BasicTypes.ErrorCode.AUTHORIZATION_FAILED, - "Authorization failed for function \"" + functionID + "\""); + final String
[geode] branch develop updated: GEODE-3875: gfsh command to create jndi binding (#1475)
This is an automated email from the ASF dual-hosted git repository. sai_boorlagadda pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 8354b61 GEODE-3875: gfsh command to create jndi binding (#1475) 8354b61 is described below commit 8354b61afb363db3eea44e31a496c1a4372e1d60 Author: Sai BoorlagaddaAuthorDate: Fri Feb 23 06:15:16 2018 -0800 GEODE-3875: gfsh command to create jndi binding (#1475) --- .../internal/datasource/AbstractPoolCache.java | 11 +- .../datasource/ConfiguredDataSourceProperties.java | 11 +- .../internal/datasource/ManagedPoolCacheImpl.java | 2 +- .../internal/datasource/TranxPoolCacheImpl.java| 2 +- .../apache/geode/internal/jndi/JNDIInvoker.java| 9 +- .../cli/commands/CommandAvailabilityIndicator.java | 3 +- .../cli/commands/CreateJndiBindingCommand.java | 258 + .../cli/converters/ConfigPropertyConverter.java| 58 +++ .../cli/functions/CreateJndiBindingFunction.java | 38 ++ .../cli/functions/JndiBindingConfiguration.java| 217 +++ .../configuration/domain/Configuration.java| 13 +- .../sanctioned-geode-core-serializables.txt| 3 + .../CreateAsyncEventQueueCommandDUnitTest.java | 3 +- .../CreateDefinedIndexesCommandDUnitTest.java | 5 +- .../CreateJndiBindingCommandDUnitTest.java | 106 ++ .../cli/commands/CreateJndiBindingCommandTest.java | 408 + .../converters/ConfigPropertyConverterTest.java| 75 17 files changed, 1197 insertions(+), 25 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/datasource/AbstractPoolCache.java b/geode-core/src/main/java/org/apache/geode/internal/datasource/AbstractPoolCache.java index 2af7f47..ff1ba43 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/datasource/AbstractPoolCache.java +++ b/geode-core/src/main/java/org/apache/geode/internal/datasource/AbstractPoolCache.java @@ -39,11 +39,6 @@ import org.apache.geode.internal.logging.LoggingThreadGroup; * connection pools. The class also implements the Serializable interface. The pool maintain a list * for keeping the available connections(not assigned to user) and the active connections(assigned * to user) This is a thread safe class. - * - * Second Version .Modified the synchronization code & objects on which locks were being taken. - * Changed the logic of retrieval of connection & returning of connection. The beahviour of cleaner - * thread has been modified such that it waits on activeCache if it is empty. Prevention of - * deadlocks & optmization of code. */ public abstract class AbstractPoolCache implements ConnectionPoolCache, Serializable { @@ -56,11 +51,9 @@ public abstract class AbstractPoolCache implements ConnectionPoolCache, Serializ protected EventListener connEventListner; // private String error = ""; protected ConfiguredDataSourceProperties configProps; - // Asif:expirationTime is for the available - // connection which are expired in milliseconds + // expirationTime is for the available connection which are expired in milliseconds protected int expirationTime; - // Asif:timeOut is for the Active connection which are time out in - // milliseconds + // timeOut is for the Active connection which are time out in milliseconds protected int timeOut; // Client Timeout in milliseconds protected int loginTimeOut; diff --git a/geode-core/src/main/java/org/apache/geode/internal/datasource/ConfiguredDataSourceProperties.java b/geode-core/src/main/java/org/apache/geode/internal/datasource/ConfiguredDataSourceProperties.java index c947de8..e036f39 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/datasource/ConfiguredDataSourceProperties.java +++ b/geode-core/src/main/java/org/apache/geode/internal/datasource/ConfiguredDataSourceProperties.java @@ -14,17 +14,18 @@ */ package org.apache.geode.internal.datasource; +import java.io.PrintWriter; +import java.io.Serializable; + /** - * JavaBean for datasource and poold properties. + * JavaBean for datasource and pooled properties. * - * This class now contains only those paramaters which are needed by the Gemfire DataSource - * configuration. This maps to those paramaters which are specified as attributes of + * This class now contains only those parameters which are needed by the Gemfire DataSource + * configuration. This maps to those parameters which are specified as attributes of * tag. Those parameters which are specified as attributes of tag are not * stored. * */ -import java.io.*; - public class ConfiguredDataSourceProperties implements Serializable { private static final long serialVersionUID = 1241739895646314739L; diff --git a/geode-core/src/main/java/org/apache/geode/internal/datasource/ManagedPoolCacheImpl.java
[geode] branch develop updated: GEODE-4691: Gfsh command Start Locator shows inconsistent behavior wi… (#1478)
This is an automated email from the ASF dual-hosted git repository. sai_boorlagadda pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 7d7361c GEODE-4691: Gfsh command Start Locator shows inconsistent behavior wi… (#1478) 7d7361c is described below commit 7d7361cd1a211ce91f8aadc52deb7e6e63f8414c Author: Sai BoorlagaddaAuthorDate: Fri Feb 23 06:04:38 2018 -0800 GEODE-4691: Gfsh command Start Locator shows inconsistent behavior wi… (#1478) ...th auto-connecting with a Security Manager --- .../cli/commands/StartLocatorAcceptanceTest.java | 9 + .../internal/cli/commands/StartLocatorCommand.java | 18 ++ .../geode/management/internal/cli/i18n/CliStrings.java | 6 +++--- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StartLocatorAcceptanceTest.java b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StartLocatorAcceptanceTest.java index 2fb904f..faa80d6 100644 --- a/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StartLocatorAcceptanceTest.java +++ b/geode-assembly/src/test/java/org/apache/geode/management/internal/cli/commands/StartLocatorAcceptanceTest.java @@ -48,4 +48,13 @@ public class StartLocatorAcceptanceTest { assertThat(execution.getOutputText()) .doesNotContain("Cluster configuration service is up and running."); } + + @Test + public void startLocatorWithSecurityManagerShouldNotBeConnected() throws Exception { +GfshExecution execution = GfshScript +.of("start locator --name=locator1 --J=-Dgemfire.security-manager=org.apache.geode.examples.SimpleSecurityManager") +.execute(gfshRule); +assertThat(execution.getOutputText()) +.contains("Security Manager is enabled - unable to auto-connect."); + } } diff --git a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java index 60c8c50..7232647 100644 --- a/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java +++ b/geode-core/src/main/java/org/apache/geode/management/internal/cli/commands/StartLocatorCommand.java @@ -293,10 +293,11 @@ public class StartLocatorCommand implements GfshCommand { // If the connect succeeds add the connected message to the result, // Else, ask the user to use the "connect" command to connect to the Locator. if (shouldAutoConnect(connect)) { - doAutoConnect(locatorHostName, locatorPort, configProperties, infoResultData); + boolean connected = + doAutoConnect(locatorHostName, locatorPort, configProperties, infoResultData); // Report on the state of the Shared Configuration service if enabled... - if (enableSharedConfiguration) { + if (enableSharedConfiguration && connected) { infoResultData.addLine(ClusterConfigurationStatusRetriever.fromLocator(locatorHostName, locatorPort, configProperties)); } @@ -314,7 +315,7 @@ public class StartLocatorCommand implements GfshCommand { return (connect && !isConnectedAndReady()); } - private void doAutoConnect(final String locatorHostname, final int locatorPort, + private boolean doAutoConnect(final String locatorHostname, final int locatorPort, final Properties configurationProperties, final InfoResultData infoResultData) { boolean connectSuccess = false; boolean jmxManagerAuthEnabled = false; @@ -375,27 +376,28 @@ public class StartLocatorCommand implements GfshCommand { infoResultData.addLine("\n"); infoResultData.addLine(responseFailureMessage); } - +return connectSuccess; } private void doOnConnectionFailure(final String locatorHostName, final int locatorPort, final boolean jmxManagerAuthEnabled, final boolean jmxManagerSslEnabled, final InfoResultData infoResultData) { infoResultData.addLine("\n"); - infoResultData.addLine(CliStrings.format(CliStrings.START_LOCATOR__USE__0__TO__CONNECT, -new CommandStringBuilder(CliStrings.CONNECT) -.addOption(CliStrings.CONNECT__LOCATOR, locatorHostName + "[" + locatorPort + "]") -.toString())); +CommandStringBuilder commandUsage = new CommandStringBuilder(CliStrings.CONNECT) +.addOption(CliStrings.CONNECT__LOCATOR, locatorHostName + "[" + locatorPort + "]"); StringBuilder message = new StringBuilder(); if (jmxManagerAuthEnabled) { + commandUsage.addOption(CliStrings.CONNECT__USERNAME).addOption(CliStrings.CONNECT__PASSWORD); message.append("Authentication"); } if (jmxManagerSslEnabled) {