Return-Path: X-Original-To: apmail-geode-commits-archive@minotaur.apache.org Delivered-To: apmail-geode-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99936189EC for ; Mon, 18 Apr 2016 23:01:23 +0000 (UTC) Received: (qmail 37036 invoked by uid 500); 18 Apr 2016 23:01:23 -0000 Delivered-To: apmail-geode-commits-archive@geode.apache.org Received: (qmail 37001 invoked by uid 500); 18 Apr 2016 23:01:23 -0000 Mailing-List: contact commits-help@geode.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.incubator.apache.org Delivered-To: mailing list commits@geode.incubator.apache.org Received: (qmail 36992 invoked by uid 99); 18 Apr 2016 23:01:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 23:01:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id EBDBBC3BF1 for ; Mon, 18 Apr 2016 23:01:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.216 X-Spam-Level: X-Spam-Status: No, score=-4.216 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id egr2FjTxRWY0 for ; Mon, 18 Apr 2016 23:01:19 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id A829A60E81 for ; Mon, 18 Apr 2016 23:01:12 +0000 (UTC) Received: (qmail 36052 invoked by uid 99); 18 Apr 2016 23:01:10 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 23:01:10 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7528BE9E9D; Mon, 18 Apr 2016 23:01:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: upthewaterspout@apache.org To: commits@geode.incubator.apache.org Date: Mon, 18 Apr 2016 23:01:25 -0000 Message-Id: In-Reply-To: <94f2ff4dd2ba4e2eba71e270cbb2ac73@git.apache.org> References: <94f2ff4dd2ba4e2eba71e270cbb2ac73@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/17] incubator-geode git commit: GEODE-1072: Removing HDFS related code GEODE-1072: Removing HDFS related code Removing all HDFS and EvictionCriteria created code. This code will be reinstated on a branch to be cleaned up and merged as a separate module. Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f0a8a55b Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f0a8a55b Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f0a8a55b Branch: refs/heads/feature/GEODE-1072 Commit: f0a8a55b55e43502e637ec0f11f7146118dceb71 Parents: 616676e Author: Dan Smith Authored: Fri Apr 15 14:38:06 2016 -0700 Committer: Dan Smith Committed: Fri Apr 15 16:48:33 2016 -0700 ---------------------------------------------------------------------- geode-core/build.gradle | 22 - .../gemfire/cache/AttributesFactory.java | 58 - .../gemfire/cache/AttributesMutator.java | 14 - .../gemfire/cache/CustomEvictionAttributes.java | 78 - .../com/gemstone/gemfire/cache/DataPolicy.java | 11 - .../gemfire/cache/EvictionCriteria.java | 57 - .../com/gemstone/gemfire/cache/Operation.java | 13 - .../gemfire/cache/RegionAttributes.java | 23 - .../gemstone/gemfire/cache/RegionFactory.java | 24 - .../internal/AsyncEventQueueFactoryImpl.java | 5 - .../gemfire/cache/hdfs/HDFSIOException.java | 52 - .../gemstone/gemfire/cache/hdfs/HDFSStore.java | 341 -- .../gemfire/cache/hdfs/HDFSStoreFactory.java | 203 - .../gemfire/cache/hdfs/HDFSStoreMutator.java | 196 - .../cache/hdfs/StoreExistsException.java | 32 - .../cache/hdfs/internal/FailureTracker.java | 96 - .../cache/hdfs/internal/FlushObserver.java | 53 - .../hdfs/internal/HDFSBucketRegionQueue.java | 1232 ------ .../cache/hdfs/internal/HDFSEntriesSet.java | 329 -- .../cache/hdfs/internal/HDFSEventListener.java | 179 - .../hdfs/internal/HDFSEventQueueFilter.java | 73 - .../hdfs/internal/HDFSGatewayEventImpl.java | 180 - .../hdfs/internal/HDFSIntegrationUtil.java | 117 - .../HDFSParallelGatewaySenderQueue.java | 471 --- .../hdfs/internal/HDFSStoreConfigHolder.java | 559 --- .../cache/hdfs/internal/HDFSStoreCreation.java | 198 - .../hdfs/internal/HDFSStoreFactoryImpl.java | 77 - .../cache/hdfs/internal/HDFSStoreImpl.java | 638 --- .../hdfs/internal/HDFSStoreMutatorImpl.java | 200 - .../HDFSWriteOnlyStoreEventListener.java | 184 - .../hdfs/internal/HoplogListenerForRegion.java | 72 - .../cache/hdfs/internal/PersistedEventImpl.java | 202 - .../hdfs/internal/QueuedPersistentEvent.java | 27 - .../hdfs/internal/SignalledFlushObserver.java | 122 - .../internal/SortedHDFSQueuePersistedEvent.java | 86 - .../internal/SortedHoplogPersistedEvent.java | 114 - .../UnsortedHDFSQueuePersistedEvent.java | 76 - .../internal/UnsortedHoplogPersistedEvent.java | 92 - .../hdfs/internal/hoplog/AbstractHoplog.java | 357 -- .../hoplog/AbstractHoplogOrganizer.java | 430 -- .../cache/hdfs/internal/hoplog/BloomFilter.java | 36 - .../hoplog/CloseTmpHoplogsTimerTask.java | 108 - .../hdfs/internal/hoplog/CompactionStatus.java | 72 - .../cache/hdfs/internal/hoplog/FlushStatus.java | 72 - .../internal/hoplog/HDFSCompactionManager.java | 330 -- .../internal/hoplog/HDFSFlushQueueArgs.java | 93 - .../internal/hoplog/HDFSFlushQueueFunction.java | 287 -- .../hoplog/HDFSForceCompactionArgs.java | 107 - .../hoplog/HDFSForceCompactionFunction.java | 129 - .../HDFSForceCompactionResultCollector.java | 131 - .../hoplog/HDFSLastCompactionTimeFunction.java | 56 - .../internal/hoplog/HDFSRegionDirector.java | 480 --- .../hdfs/internal/hoplog/HDFSStoreDirector.java | 78 - .../hoplog/HDFSUnsortedHoplogOrganizer.java | 447 --- .../hdfs/internal/hoplog/HFileSortedOplog.java | 853 ---- .../hoplog/HdfsSortedOplogOrganizer.java | 2004 ---------- .../cache/hdfs/internal/hoplog/Hoplog.java | 263 -- .../hdfs/internal/hoplog/HoplogConfig.java | 74 - .../hdfs/internal/hoplog/HoplogListener.java | 47 - .../hdfs/internal/hoplog/HoplogOrganizer.java | 123 - .../hdfs/internal/hoplog/HoplogSetIterator.java | 166 - .../hdfs/internal/hoplog/HoplogSetReader.java | 114 - .../internal/hoplog/SequenceFileHoplog.java | 395 -- .../hoplog/mapred/AbstractGFRecordReader.java | 106 - .../internal/hoplog/mapred/GFInputFormat.java | 95 - .../internal/hoplog/mapred/GFOutputFormat.java | 75 - .../mapreduce/AbstractGFRecordReader.java | 140 - .../hoplog/mapreduce/GFInputFormat.java | 124 - .../hdfs/internal/hoplog/mapreduce/GFKey.java | 72 - .../hoplog/mapreduce/GFOutputFormat.java | 198 - .../hoplog/mapreduce/HDFSSplitIterator.java | 197 - .../internal/hoplog/mapreduce/HoplogUtil.java | 463 --- .../hoplog/mapreduce/RWSplitIterator.java | 48 - .../hoplog/mapreduce/StreamSplitIterator.java | 46 - .../org/apache/hadoop/io/SequenceFile.java | 3726 ------------------ .../gemfire/cache/wan/GatewaySender.java | 2 - .../gemstone/gemfire/internal/DSFIDFactory.java | 3 - .../internal/DataSerializableFixedID.java | 1 - .../admin/remote/RemoteRegionAttributes.java | 25 - .../cache/AbstractBucketRegionQueue.java | 18 +- .../gemfire/internal/cache/AbstractRegion.java | 147 - .../internal/cache/AbstractRegionEntry.java | 30 +- .../internal/cache/AbstractRegionMap.java | 86 +- .../gemfire/internal/cache/BucketAdvisor.java | 1 - .../gemfire/internal/cache/BucketRegion.java | 209 +- .../internal/cache/BucketRegionQueue.java | 2 +- .../cache/CacheDistributionAdvisor.java | 22 +- .../gemfire/internal/cache/CachePerfStats.java | 75 - .../internal/cache/ColocationHelper.java | 3 - .../cache/CustomEvictionAttributesImpl.java | 35 - .../gemfire/internal/cache/DistTXState.java | 2 +- .../cache/DistributedCacheOperation.java | 3 - .../cache/DistributedPutAllOperation.java | 20 +- .../internal/cache/DistributedRegion.java | 31 +- .../gemfire/internal/cache/EntryEventImpl.java | 31 - .../gemfire/internal/cache/EvictorService.java | 284 -- .../internal/cache/GemFireCacheImpl.java | 99 - .../gemfire/internal/cache/HARegion.java | 15 +- .../internal/cache/HDFSLRURegionMap.java | 111 - .../gemfire/internal/cache/HDFSRegionMap.java | 32 - .../internal/cache/HDFSRegionMapDelegate.java | 540 --- .../internal/cache/HDFSRegionMapImpl.java | 74 - .../gemfire/internal/cache/InternalCache.java | 4 - .../internal/cache/InternalDataView.java | 28 +- .../internal/cache/InternalRegionArguments.java | 16 - .../gemfire/internal/cache/LocalRegion.java | 225 +- .../internal/cache/LocalRegionDataView.java | 35 +- .../internal/cache/NonLocalRegionEntry.java | 20 - .../gemstone/gemfire/internal/cache/Oplog.java | 13 - .../internal/cache/PartitionedRegion.java | 482 +-- .../cache/PartitionedRegionDataStore.java | 49 +- .../cache/PartitionedRegionDataView.java | 27 +- .../gemfire/internal/cache/ProxyRegionMap.java | 21 - .../gemfire/internal/cache/RegionEntry.java | 20 - .../internal/cache/RegionMapFactory.java | 6 - .../internal/cache/RemoteGetMessage.java | 2 +- .../gemfire/internal/cache/TXEntry.java | 3 +- .../gemfire/internal/cache/TXState.java | 38 +- .../internal/cache/TXStateInterface.java | 10 +- .../internal/cache/TXStateProxyImpl.java | 30 +- .../gemfire/internal/cache/TXStateStub.java | 32 +- .../cache/UserSpecifiedRegionAttributes.java | 24 +- .../internal/cache/ValidatingDiskRegion.java | 13 - .../partitioned/FetchBulkEntriesMessage.java | 2 +- .../internal/cache/partitioned/GetMessage.java | 22 +- .../cache/partitioned/PutAllPRMessage.java | 16 +- .../internal/cache/partitioned/PutMessage.java | 9 - .../persistence/soplog/ByteComparator.java | 55 - .../persistence/soplog/CursorIterator.java | 81 - .../soplog/DelegatingSerializedComparator.java | 37 - .../soplog/HFileStoreStatistics.java | 205 - .../persistence/soplog/KeyValueIterator.java | 42 - .../soplog/SortedOplogStatistics.java | 505 --- .../cache/persistence/soplog/SortedReader.java | 255 -- .../persistence/soplog/TrackedReference.java | 153 - .../cache/tier/sockets/BaseCommand.java | 8 +- .../cache/tier/sockets/command/Get70.java | 3 +- .../cache/tier/sockets/command/Request.java | 2 +- .../internal/cache/tx/ClientTXRegionStub.java | 4 +- .../cache/tx/DistributedTXRegionStub.java | 14 +- .../cache/tx/PartitionedTXRegionStub.java | 8 +- .../gemfire/internal/cache/tx/TXRegionStub.java | 4 +- .../cache/wan/AbstractGatewaySender.java | 22 +- .../cache/wan/GatewaySenderAttributes.java | 5 - ...rentParallelGatewaySenderEventProcessor.java | 3 - .../ConcurrentParallelGatewaySenderQueue.java | 12 - .../ParallelGatewaySenderEventProcessor.java | 22 +- .../parallel/ParallelGatewaySenderQueue.java | 20 +- .../cache/xmlcache/AsyncEventQueueCreation.java | 9 - .../internal/cache/xmlcache/CacheCreation.java | 39 +- .../internal/cache/xmlcache/CacheXml.java | 31 - .../internal/cache/xmlcache/CacheXmlParser.java | 170 - .../xmlcache/RegionAttributesCreation.java | 55 +- .../gemfire/internal/i18n/LocalizedStrings.java | 30 - .../management/DistributedRegionMXBean.java | 11 - .../management/DistributedSystemMXBean.java | 8 - .../gemfire/management/MemberMXBean.java | 7 - .../gemfire/management/RegionMXBean.java | 10 - .../internal/beans/DistributedRegionBridge.java | 5 - .../internal/beans/DistributedRegionMBean.java | 5 - .../internal/beans/DistributedSystemBridge.java | 19 - .../internal/beans/DistributedSystemMBean.java | 7 - .../internal/beans/HDFSRegionBridge.java | 173 - .../management/internal/beans/MemberMBean.java | 5 - .../internal/beans/MemberMBeanBridge.java | 27 - .../internal/beans/PartitionedRegionBridge.java | 13 +- .../management/internal/beans/RegionMBean.java | 5 - .../internal/beans/RegionMBeanBridge.java | 5 - .../beans/stats/RegionClusterStatsMonitor.java | 7 - .../cli/domain/RegionAttributesInfo.java | 21 +- .../functions/DescribeHDFSStoreFunction.java | 86 - .../cli/util/HDFSStoreNotFoundException.java | 47 - .../cli/util/RegionAttributesNames.java | 4 +- .../support/MemberMXBeanAdapter.java | 5 - .../geode.apache.org/schema/cache/cache-1.0.xsd | 31 - .../SignalledFlushObserverJUnitTest.java | 97 - .../SortedListForAsyncQueueJUnitTest.java | 564 --- .../gemfire/cache30/Bug38741DUnitTest.java | 2 +- .../ParallelGatewaySenderQueueJUnitTest.java | 2 +- .../domain/CacheElementJUnitTest.java | 1 - .../internal/JUnit4DistributedTestCase.java | 3 - .../sanctionedDataSerializables.txt | 92 +- .../codeAnalysis/sanctionedSerializables.txt | 27 +- geode-lucene/build.gradle | 4 - geode-rebalancer/build.gradle | 7 - .../cache/wan/GatewaySenderFactoryImpl.java | 4 - .../internal/cache/UpdateVersionDUnitTest.java | 6 +- 187 files changed, 422 insertions(+), 24778 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/build.gradle ---------------------------------------------------------------------- diff --git a/geode-core/build.gradle b/geode-core/build.gradle index 2206018..fedd63e 100755 --- a/geode-core/build.gradle +++ b/geode-core/build.gradle @@ -62,27 +62,6 @@ dependencies { ext.optional = true; } compile ('net.java.dev.jna:jna:' + project.'jna.version') - provided ('org.apache.hadoop:hadoop-common:' + project.'hadoop.version') { - transitive=false - } - provided ('org.apache.hadoop:hadoop-annotations:' + project.'hadoop.version') { - transitive=false - } - provided ('org.apache.hadoop:hadoop-hdfs:' + project.'hadoop.version') { - transitive=false - } - provided ('org.apache.hadoop:hadoop-mapreduce-client-core:' + project.'hadoop.version') { - transitive=false - } - provided ('org.apache.hbase:hbase:' + project.'hbase.version') { - transitive=false - } - - compile ('com.google.guava:guava:' + project.'guava.version') { - ext.optional = true - } - //jsr305 is included only to prevent javadoc warnings about missing annotations in the guava jar - provided 'com.google.code.findbugs:jsr305:' + project.'jsr305.version' compile 'org.apache.logging.log4j:log4j-api:' + project.'log4j.version' compile 'org.apache.logging.log4j:log4j-core:' + project.'log4j.version' @@ -131,7 +110,6 @@ dependencies { // External testCompile 'org.apache.bcel:bcel:' + project.'bcel.version' testRuntime 'org.apache.derby:derby:' + project.'derby.version' - testRuntime 'org.apache.hadoop:hadoop-auth:' + project.'hadoop.version' testCompile 'org.mockito:mockito-core:' + project.'mockito-core.version' testRuntime 'commons-collections:commons-collections:' + project.'commons-collections.version' testRuntime 'commons-configuration:commons-configuration:' + project.'commons-configuration.version' http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java index 201c1aa..34eafb9 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesFactory.java @@ -31,7 +31,6 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut; import com.gemstone.gemfire.cache.client.PoolManager; import com.gemstone.gemfire.compression.Compressor; import com.gemstone.gemfire.internal.cache.AbstractRegion; -import com.gemstone.gemfire.internal.cache.CustomEvictionAttributesImpl; import com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl; import com.gemstone.gemfire.internal.cache.DiskWriteAttributesImpl; import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl; @@ -448,8 +447,6 @@ public class AttributesFactory { .getPartitionAttributes(); this.regionAttributes.evictionAttributes = (EvictionAttributesImpl)regionAttributes .getEvictionAttributes(); - this.regionAttributes.customEvictionAttributes = regionAttributes - .getCustomEvictionAttributes(); this.regionAttributes.membershipAttributes = regionAttributes.getMembershipAttributes(); this.regionAttributes.subscriptionAttributes = regionAttributes.getSubscriptionAttributes(); @@ -723,32 +720,6 @@ public class AttributesFactory { this.regionAttributes.setHasEvictionAttributes(true); } - /** - * Set custom {@link EvictionCriteria} for the region with start time and - * frequency of evictor task to be run in milliseconds, or evict incoming rows - * in case both start and frequency are specified as zero. - * - * @param criteria - * an {@link EvictionCriteria} to be used for eviction for HDFS - * persistent regions - * @param start - * the start time at which periodic evictor task should be first - * fired to apply the provided {@link EvictionCriteria}; if this is - * zero then current time is used for the first invocation of evictor - * @param interval - * the periodic frequency at which to run the evictor task after the - * initial start; if this is if both start and frequency are zero - * then {@link EvictionCriteria} is applied on incoming insert/update - * to determine whether it is to be retained - */ - public void setCustomEvictionAttributes(EvictionCriteria criteria, - long start, long interval) { - this.regionAttributes.customEvictionAttributes = - new CustomEvictionAttributesImpl(criteria, start, interval, - start == 0 && interval == 0); - this.regionAttributes.setHasCustomEviction(true); - } - /** Sets the mirror type for the next RegionAttributes created. * @param mirrorType The type of mirroring to use for the region * @throws IllegalArgumentException if mirrorType is null @@ -1465,12 +1436,6 @@ public class AttributesFactory { } } - if (attrs.getHDFSStoreName() != null) { - if (!attrs.getDataPolicy().withHDFS() && (attrs.getPartitionAttributes() == null || attrs.getPartitionAttributes().getLocalMaxMemory() != 0)) { - throw new IllegalStateException(LocalizedStrings.HDFSSTORE_IS_USED_IN_NONHDFS_REGION.toLocalizedString()); - } - } - if (!attrs.getStatisticsEnabled() && (attrs.getRegionTimeToLive().getTimeout() != 0 || attrs.getRegionIdleTimeout().getTimeout() != 0 || @@ -1633,11 +1598,8 @@ public class AttributesFactory { SubscriptionAttributes subscriptionAttributes = new SubscriptionAttributes(); boolean multicastEnabled = false; EvictionAttributesImpl evictionAttributes = new EvictionAttributesImpl(); // TODO need to determine the constructor - transient CustomEvictionAttributes customEvictionAttributes; String poolName = null; String diskStoreName = null; - String hdfsStoreName = null; - private boolean hdfsWriteOnly = false; boolean diskSynchronous = DEFAULT_DISK_SYNCHRONOUS; protected boolean isBucketRegion = false; private boolean isCloningEnabled = false; @@ -1696,8 +1658,6 @@ public class AttributesFactory { } else { buf.append("; diskStoreName=").append(diskStoreName); } - buf.append("; hdfsStoreName=").append(hdfsStoreName); - buf.append("; hdfsWriteOnly=").append(hdfsWriteOnly); buf.append("; GatewaySenderIds=").append(gatewaySenderIds); buf.append("; AsyncEventQueueIds=").append(asyncEventQueueIds); buf.append("; compressor=").append(compressor == null ? null : compressor.getClass().getName()); @@ -1972,14 +1932,6 @@ public class AttributesFactory { } /** - * {@inheritDoc} - */ - @Override - public CustomEvictionAttributes getCustomEvictionAttributes() { - return this.customEvictionAttributes; - } - - /** * @deprecated this API is scheduled to be removed */ public MembershipAttributes getMembershipAttributes() { @@ -2037,16 +1989,6 @@ public class AttributesFactory { } @Override - public String getHDFSStoreName() { - return hdfsStoreName; - } - - @Override - public boolean getHDFSWriteOnly() { - return hdfsWriteOnly; - } - - @Override public Compressor getCompressor() { return this.compressor; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java index eb46433..0a69437 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/AttributesMutator.java @@ -166,20 +166,6 @@ public interface AttributesMutator { public EvictionAttributesMutator getEvictionAttributesMutator(); /** - * Changes the evictor frequency for custom eviction attributes. - * - * @param newStart - * the new start time in millis since epoch for the evictor task - * - * @param newInterval - * the new interval between evictor task invocations in millis - * - * @return the updated {@link CustomEvictionAttributes} - */ - public CustomEvictionAttributes setCustomEvictionAttributes(long newStart, - long newInterval); - - /** * Sets cloning on region * @param cloningEnable * @since 6.1 http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/CustomEvictionAttributes.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/CustomEvictionAttributes.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/CustomEvictionAttributes.java deleted file mode 100644 index c2bc41b..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/CustomEvictionAttributes.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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. - */ -package com.gemstone.gemfire.cache; - -/** - * Custom eviction attributes including {@link EvictionCriteria} and evictor - * start time and frequency, if any. - * - * @since gfxd 1.0 - */ -public abstract class CustomEvictionAttributes { - - private final EvictionCriteria criteria; - - private final long evictorStartTime; - private final long evictorInterval; - - private final boolean evictIncoming; - - protected CustomEvictionAttributes(EvictionCriteria criteria, - long startTime, long interval, boolean evictIncoming) { - this.criteria = criteria; - this.evictorStartTime = startTime; - this.evictorInterval = interval; - this.evictIncoming = evictIncoming; - } - - /** - * Get the {@link EvictionCriteria} for this custom eviction. The criteria - * will be applied to the region entries either periodically as per - * {@link #getEvictorStartTime()} and {@link #getEvictorInterval()}, or on - * incoming puts if {@link #isEvictIncoming()} is true. - */ - @SuppressWarnings({ "rawtypes", "unchecked" }) - public EvictionCriteria getCriteria() { - return (EvictionCriteria)this.criteria; - } - - /** - * The absolute start time in milliseconds (as returned by - * {@link System#currentTimeMillis()}) when the evictor will be first fired. - * Thereafter the evictor will be fired periodically every - * {@link #getEvictorInterval()} milliseconds. - */ - public final long getEvictorStartTime() { - return this.evictorStartTime; - } - - /** - * The intervals at which the periodic evictor task is fired and - * {@link EvictionCriteria} evaluated to evict entries. - */ - public final long getEvictorInterval() { - return this.evictorInterval; - } - - /** - * If this returns true, then the criteria should always be applied to - * incoming entries and never as a periodic task. - */ - public final boolean isEvictIncoming() { - return this.evictIncoming; - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java index 1e87c0f..80918d9 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/DataPolicy.java @@ -31,7 +31,6 @@ import java.io.*; *
  • PERSISTENT_PARTITION in addition to PARTITION also causes data to be stored to disk. The region initialization uses the data stored on disk. *
  • REPLICATE causes data that this region is interested in to be stored in local memory. A distributed region will be initialized with the data from other caches. On distributed region operations that would cause the contents to differ with other caches are not allowed. This policy is allowed on local scope region but it behaves the same as NORMAL. *
  • PERSISTENT_REPLICATE in addition to REPLICATE also causes data to be stored to disk. The region initialization uses the data stored on disk. Note that the persistence applies to both local scope and distributed scope. - *
  • HDFS_PARTITION in addition to PARTITION also causes data to be stored to HDFS. The region initialization may use the data stored on HDFS. * * * @@ -245,16 +244,6 @@ public class DataPolicy implements java.io.Serializable { return this == PARTITION; } - /** Return whether this policy does persistence on HDFS. - * @return true if this policy does persistence on HDFS. - */ - public boolean withHDFS() { -// return this == HDFS_PARTITION || this == HDFS_PERSISTENT_PARTITION; - return false; - } - - - /** Returns a string representation for this data policy. * @return the name of this data policy. */ http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/EvictionCriteria.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/EvictionCriteria.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/EvictionCriteria.java deleted file mode 100644 index 8df201c..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/EvictionCriteria.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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. - */ -package com.gemstone.gemfire.cache; - -import java.util.Iterator; -import java.util.Map; - -/** - * Interface implemented by an EVICTION BY CRITERIA of - * {@link CustomEvictionAttributes}. This will be invoked by periodic evictor - * task that will get the keys to be evicted using this and then destroy from - * the region to which this is attached. - * - * @since gfxd 1.0 - */ -public interface EvictionCriteria { - - /** - * Get the (key, routing object) of the entries to be evicted from region - * satisfying EVICTION BY CRITERIA at this point of time. - *

    - * The returned Map.Entry object by the Iterator may be reused internally so - * caller must extract the key, routing object from the entry on each - * iteration. - */ - Iterator> getKeysToBeEvicted(long currentMillis, - Region region); - - /** - * Last moment check if an entry should be evicted or not applying the - * EVICTION BY CRITERIA again under the region entry lock in case the entry - * has changed after the check in {@link #getKeysToBeEvicted}. - */ - boolean doEvict(EntryEvent event); - - /** - * Return true if this eviction criteria is equivalent to the other one. This - * is used to ensure that custom eviction is configured identically on all the - * nodes of a cluster hosting the region to which this eviction criteria has - * been attached. - */ - boolean isEquivalent(EvictionCriteria other); -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/Operation.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/Operation.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/Operation.java index 7a63855..a104751 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/Operation.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/Operation.java @@ -672,19 +672,6 @@ public final class Operation implements java.io.Serializable { OP_DETAILS_REMOVEALL ); - /** - * An entry local destroy caused by an eviction. - * @see Region#localDestroy(Object) - */ - public static final Operation CUSTOM_EVICT_DESTROY - = new Operation("EVICT_DESTROY", - false, // isLocal - false, // isRegion - OP_TYPE_DESTROY, - OP_DETAILS_EVICT - ); - - /** The name of this mirror type. */ private final transient String name; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionAttributes.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionAttributes.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionAttributes.java index dd5c0e0..94cc11a 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionAttributes.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionAttributes.java @@ -20,7 +20,6 @@ import java.io.File; import java.util.Set; import com.gemstone.gemfire.cache.client.Pool; -import com.gemstone.gemfire.cache.hdfs.HDFSStore; import com.gemstone.gemfire.compression.Compressor; /** Defines attributes for configuring a region. @@ -148,11 +147,6 @@ public interface RegionAttributes { */ public EvictionAttributes getEvictionAttributes(); - /** - * Return the {@link CustomEvictionAttributes}, if any, set for the region. - */ - public CustomEvictionAttributes getCustomEvictionAttributes(); - /** Returns the cache listener for the region. * @throws IllegalStateException if more than one cache listener exists on this attributes * @return the region's CacheListener @@ -453,23 +447,6 @@ public interface RegionAttributes { public boolean getConcurrencyChecksEnabled(); /** - * Returns the name of the {@link HDFSStore} that this region belongs - * to, if any. - * @return the name of the {@link HDFSStore} of this region; - * null is returned if this region has no - * {@link HDFSStore}. - * @since 9.0 - */ - public String getHDFSStoreName(); - - /** - * Returns true if this region is configured to - * be write-only to HDFS. - * @since 9.0 - */ - public boolean getHDFSWriteOnly(); - - /** * Returns the compressor used by this region's entry values. * @since 8.0 * @return null if the region does not have compression enabled. http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java index 729374e..b919cc0 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/RegionFactory.java @@ -401,30 +401,6 @@ public class RegionFactory } /** - * Set custom {@link EvictionCriteria} for the region with start time and - * interval of evictor task to be run in milliseconds, or evict incoming rows - * in case both start and frequency are specified as zero. - * - * @param criteria - * an {@link EvictionCriteria} to be used for eviction for HDFS - * persistent regions - * @param start - * the start time at which periodic evictor task should be first - * fired to apply the provided {@link EvictionCriteria}; if this is - * zero then current time is used for the first invocation of evictor - * @param interval - * the periodic frequency at which to run the evictor task after the - * initial start; if this is if both start and frequency are zero - * then {@link EvictionCriteria} is applied on incoming insert/update - * to determine whether it is to be retained - */ - public RegionFactory setCustomEvictionAttributes( - EvictionCriteria criteria, long start, long interval) { - this.attrsFactory.setCustomEvictionAttributes(criteria, start, interval); - return this; - } - - /** * Sets the scope for the next RegionAttributes created. * * @param scopeType http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java index d15222b..312e880 100644 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java +++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/asyncqueue/internal/AsyncEventQueueFactoryImpl.java @@ -272,7 +272,6 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory { this.attrs.maximumQueueMemory = asyncQueueCreation.getMaximumQueueMemory(); this.attrs.isParallel = asyncQueueCreation.isParallel(); this.attrs.isBucketSorted = ((AsyncEventQueueCreation)asyncQueueCreation).isBucketSorted(); - this.attrs.isHDFSQueue = ((AsyncEventQueueCreation)asyncQueueCreation).isHDFSQueue(); this.attrs.dispatcherThreads = asyncQueueCreation.getDispatcherThreads(); this.attrs.policy = asyncQueueCreation.getOrderPolicy(); this.attrs.eventFilters = asyncQueueCreation.getGatewayEventFilters(); @@ -289,10 +288,6 @@ public class AsyncEventQueueFactoryImpl implements AsyncEventQueueFactory { this.attrs.isBucketSorted = isbucketSorted; return this; } - public AsyncEventQueueFactory setIsHDFSQueue(boolean isHDFSQueue) { - this.attrs.isHDFSQueue = isHDFSQueue; - return this; - } public AsyncEventQueueFactory setIsMetaQueue(boolean isMetaQueue) { this.attrs.isMetaQueue = isMetaQueue; return this; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSIOException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSIOException.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSIOException.java deleted file mode 100644 index d9b6179..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSIOException.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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. - */ -/** - * - */ -package com.gemstone.gemfire.cache.hdfs; - -import com.gemstone.gemfire.GemFireIOException; - -/** - * Thrown when an error has occurred while attempted to use - * the HDFS file system. This error may indicate a failure of the HDFS - * system. - * - * - * @since 7.5 - * - */ -public class HDFSIOException extends GemFireIOException { - - /** - * @param message - * @param cause - */ - public HDFSIOException(String message, Throwable cause) { - super(message, cause); - // TODO Auto-generated constructor stub - } - - /** - * @param message - */ - public HDFSIOException(String message) { - super(message); - // TODO Auto-generated constructor stub - } - -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStore.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStore.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStore.java deleted file mode 100644 index 45ba370..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStore.java +++ /dev/null @@ -1,341 +0,0 @@ -/* - * 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. - */ - -package com.gemstone.gemfire.cache.hdfs; - -import com.gemstone.gemfire.cache.wan.GatewaySender; - -/** - * HDFS stores provide a means of persisting data on HDFS. There can be multiple - * instance of HDFS stores in a cluster. The regions connected using a HDFS - * store will share the same HDFS persistence attributes. A user will normally - * perform the following steps to enable HDFS persistence for a region: - *

      - *
    1. [Optional] Creates a DiskStore for HDFS buffer reliability (HDFS buffers - * will be persisted locally till data lands on HDFS) - *
    2. Creates a HDFS Store (connects to DiskStore created earlier) - *
    3. Creates a Region connected to HDFS Store - *
    4. Uses region API to create and query data - *
    - *

    - * Instances of this interface are created using {@link HDFSStoreFactory#create} - * - */ - -public interface HDFSStore { - public static final String DEFAULT_HOME_DIR = "gemfire"; - public static final float DEFAULT_BLOCK_CACHE_SIZE = 10f; - public static final int DEFAULT_WRITE_ONLY_FILE_SIZE_LIMIT = 256; - public static final int DEFAULT_WRITE_ONLY_FILE_ROLLOVER_INTERVAL = 3600; - - public static final int DEFAULT_BATCH_SIZE_MB = 32; - public static final int DEFAULT_BATCH_INTERVAL_MILLIS = 60000; - public static final boolean DEFAULT_WRITEONLY_HDFSSTORE = false; - public static final boolean DEFAULT_BUFFER_PERSISTANCE = GatewaySender.DEFAULT_PERSISTENCE_ENABLED; - public static final boolean DEFAULT_DISK_SYNCHRONOUS = GatewaySender.DEFAULT_DISK_SYNCHRONOUS; - public static final int DEFAULT_MAX_BUFFER_MEMORY = GatewaySender.DEFAULT_MAXIMUM_QUEUE_MEMORY; - public static final int DEFAULT_DISPATCHER_THREADS = GatewaySender.DEFAULT_HDFS_DISPATCHER_THREADS; - - public static final boolean DEFAULT_MINOR_COMPACTION = true; - public static final int DEFAULT_MINOR_COMPACTION_THREADS = 10; - public static final boolean DEFAULT_MAJOR_COMPACTION = true; - public static final int DEFAULT_MAJOR_COMPACTION_THREADS = 2; - public static final int DEFAULT_INPUT_FILE_SIZE_MAX_MB = 512; - public static final int DEFAULT_INPUT_FILE_COUNT_MAX = 10; - public static final int DEFAULT_INPUT_FILE_COUNT_MIN = 4; - - public static final int DEFAULT_MAJOR_COMPACTION_INTERVAL_MINS = 720; - public static final int DEFAULT_OLD_FILE_CLEANUP_INTERVAL_MINS = 30; - - /** - * @return A unique identifier for the HDFSStore - */ - public String getName(); - - /** - * HDFSStore persists data on a HDFS cluster identified by cluster's NameNode - * URL or NameNode Service URL. NameNode URL can also be provided via - * hdfs-site.xml (see HDFSClientConfigFile). If the NameNode url is missing - * HDFSStore creation will fail. HDFS client can also load hdfs configuration - * files in the classpath. The following precedence order is applied - *

      - *
    1. URL explicitly configured in the HdfsStore - *
    2. URL provided in client configuration file: - * {@link #getHDFSClientConfigFile()} - *
    3. URL provided in default configuration files loaded by hdfs-client - *
    - * - * HDFSStore will use the selected URL only. It will fail if the selected URL - * is not reachable. - * - * @return Namenode url explicitly configured by user - */ - public String getNameNodeURL(); - - /** - * HomeDir is the HDFS directory path in which HDFSStore stores files. The - * value must not contain the NameNode URL. The owner of this node's JVM - * process must have read and write access to this directory. The path could - * be absolute or relative. If a relative path for HomeDir is provided, then - * the HomeDir is created relative to /user/JVM_owner_name or, if specified, - * relative to directory specified by the hdfs-root-dir property. As a best - * practice, HDFS store directories should be created relative to a single - * HDFS root directory. As an alternative, an absolute path beginning with the - * "/" character to override the default root location can be provided. - * - * @return path - */ - public String getHomeDir(); - - /** - * The full path to the HDFS client configuration file, for e.g. hdfs-site.xml - * or core-site.xml. This file must be accessible to any node where an - * instance of this HDFSStore will be created. If each node has a local copy - * of this configuration file, it is important for all the copies to be - * "identical". Alternatively, by default HDFS client can also load some HDFS - * configuration files if added in the classpath. - * - * @return path - */ - public String getHDFSClientConfigFile(); - - /** - * The maximum amount of memory in megabytes to be used by HDFSStore. - * HDFSStore buffers data in memory to optimize HDFS IO operations. Once the - * configured memory is utilized, data may overflow to disk. - * - * @return max memory in MB - */ - public int getMaxMemory(); - - /** - * @return the percentage of the heap to use for the block cache in the range - * 0 ... 100 - */ - public float getBlockCacheSize(); - - /** - * HDFSStore buffer data is persisted on HDFS in batches. The BatchSize - * defines the maximum size (in megabytes) of each batch that is written to - * HDFS. This parameter, along with BatchInterval determines the rate at which - * data is persisted on HDFS. A higher value causes fewer and bigger batches - * to be persisted to HDFS and hence big files are created on HDFS. But, - * bigger batches consume more memory. - * - * @return batch size in MB - */ - public int getBatchSize(); - - /** - * HDFSStore buffer data is persisted on HDFS in batches, and the - * BatchInterval defines the number of milliseconds that can elapse between - * writing batches to HDFS. This parameter, along with BatchSize determines - * the rate at which data is persisted on HDFS. - * - * @return batch interval in milliseconds - */ - public int getBatchInterval(); - - /** - * The maximum number of threads (per region) used to write batches to HDFS. - * If you have a large number of clients that add or update data in a region, - * then you may need to increase the number of dispatcher threads to avoid - * bottlenecks when writing data to HDFS. - * - * @return The maximum number of threads - */ - public int getDispatcherThreads(); - - /** - * Configure if HDFSStore in-memory buffer data, that has not been persisted - * on HDFS yet, should be persisted to a local disk to prevent buffer data - * loss. Persisting buffer data may impact write performance. If performance - * is critical and buffer data loss is acceptable, disable persistence. - * - * @return true if buffer is persisted locally - */ - public boolean getBufferPersistent(); - - /** - * The named DiskStore to use for any local disk persistence needs of - * HDFSStore, for e.g. store's buffer persistence and buffer overflow. If you - * specify a value, the named DiskStore must exist. If you specify a null - * value or you omit this option, default DiskStore is used. - * - * @return disk store name - */ - public String getDiskStoreName(); - - /** - * HDFS buffers can be persisted on local disk. Each region update record is - * written to the disk synchronously if synchronous disk write is enabled. - * Enable this option if the data being persisted is critical and no record - * should be lost in case of a crash. This high reliability mode may increase - * write latency. If synchronous mode is disabled, data is persisted in - * batches which usually results in better performance. - * - * @return true if enabled - */ - public boolean getSynchronousDiskWrite(); - - /** - * For HDFS write-only regions, this defines the maximum size (in megabytes) - * that an HDFS log file can reach before HDFSStore closes the file and begins - * writing to a new file. This option is ignored for HDFS read/write regions. - * Keep in mind that the files are not available for MapReduce processing - * until the file is closed; you can also set WriteOnlyFileRolloverInterval to - * specify the maximum amount of time an HDFS log file remains open. - * - * @return max file size in MB. - */ - public int getWriteOnlyFileRolloverSize(); - - /** - * For HDFS write-only regions, this defines the number of seconds that can - * elapse before HDFSStore closes an HDFS file and begins writing to a new - * file. This configuration is ignored for HDFS read/write regions. - * - * @return interval in seconds - */ - public int getWriteOnlyFileRolloverInterval(); - - /** - * Minor compaction reorganizes data in files to optimize read performance and - * reduce number of files created on HDFS. Minor compaction process can be - * I/O-intensive, tune the performance of minor compaction using - * MinorCompactionThreads. Minor compaction is not applicable to write-only - * regions. - * - * @return true if auto minor compaction is enabled - */ - public boolean getMinorCompaction(); - - /** - * The maximum number of threads that HDFSStore uses to perform minor - * compaction. You can increase the number of threads used for compaction as - * necessary in order to fully utilize the performance of your HDFS cluster. - * Minor compaction is not applicable to write-only regions. - * - * @return maximum number of threads executing minor compaction - */ - public int getMinorCompactionThreads(); - - /** - * Major compaction removes old values of a key and deleted records from the - * HDFS files, which can save space in HDFS and improve performance when - * reading from HDFS. As major compaction process can be long-running and - * I/O-intensive, tune the performance of major compaction using - * MajorCompactionInterval and MajorCompactionThreads. Major compaction is not - * applicable to write-only regions. - * - * @return true if auto major compaction is enabled - */ - public boolean getMajorCompaction(); - - /** - * The number of minutes after which HDFSStore performs the next major - * compaction cycle. Major compaction is not applicable to write-only regions. - * - * @return interval in minutes - */ - public int getMajorCompactionInterval(); - - /** - * The maximum number of threads that HDFSStore uses to perform major - * compaction. You can increase the number of threads used for compaction as - * necessary in order to fully utilize the performance of your HDFS cluster. - * Major compaction is not applicable to write-only regions. - * - * @return maximum number of threads executing major compaction - */ - public int getMajorCompactionThreads(); - - /** - * HDFSStore may create new files as part of periodic maintenance activity. It - * deletes old files asynchronously. PurgeInterval defines the number of - * minutes for which old files will remain available to be consumed - * externally, e.g. read by MR jobs. After this interval, old files are - * deleted. This configuration is not applicable to write-only regions - * - * @return old file purge interval in minutes - */ - public int getPurgeInterval(); - - /** - * Permanently deletes all HDFS files associated with this {@link HDFSStore}. - * This operation will fail if any region is still using this store for - * persistence. - * - * @exception IllegalStateException - * if any region using this hdfsStore still exists - */ - public void destroy(); - - /** - * @return new instance of mutator object that can be used to alter properties - * of this store - */ - public HDFSStoreMutator createHdfsStoreMutator(); - - /** - * Identifies attributes configured in {@link HDFSStoreMutator} and applies - * the new attribute values to this instance of {@link HDFSStore} dynamically. - * Any property which is not set in {@link HDFSStoreMutator} remains - * unaltered. In most cases altering the attributes does not cause existing - * operations to terminate. The altered attributes are used in the next cycle - * of the operation they impact. - * - * @return hdfsStore reference representing the old {@link HDFSStore} - */ - public HDFSStore alter(HDFSStoreMutator mutator); - - /** - * A file larger than this size, in megabytes, will not be compacted by minor - * compactor. Increasing this value will result in compaction of bigger files. - * This will lower the number of files on HDFS at the cost of increased IO. - * This option is for advanced users and will need tuning in special cases - * only. This option is not applicable to write-only regions. - * - * @return size threshold (in MB) - */ - public int getInputFileSizeMax(); - - /** - * A minimum number of files must exist in a bucket directory on HDFS before - * minor compaction will start compaction. Keeping a higher value for this - * option will reduce the frequency of minor compaction, which in turn may - * result in reduced IO overhead. However it may result in increased pressure - * on HDFS NameNode. This option is for advanced users and will need tuning in - * special cases only. This option is not applicable to write-only regions. - * - * @return minimum number of files for minor compaction to get triggered - */ - public int getInputFileCountMin(); - - /** - * The maximum number of files compacted by Minor compactor in a cycle. - * Keeping a higher value for this option will reduce the frequency of minor - * compaction, which in turn may result in reduced IO overhead. However it may - * result in large number of concurrent IO operations which in-turn may - * degrade the performance. This option is for advanced users and will need - * tuning in special cases only. This option is not applicable to write-only - * regions. - * - * @return maximum number of files minor compacted in one cycle - */ - public int getInputFileCountMax(); -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreFactory.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreFactory.java deleted file mode 100644 index 0d80a67..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreFactory.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * 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. - */ - -package com.gemstone.gemfire.cache.hdfs; - -import com.gemstone.gemfire.GemFireConfigException; -import com.gemstone.gemfire.cache.Cache; - -/** - * Factory for creating instances of {@link HDFSStore}. To get an instance of - * this factory call Cache#createHDFSStoreFactory. - *

    - * Usage - *

      - *
    1. configure factory using set methods - *
    2. call {@link #create} to produce a HDFSStore instance. - *
    - * - */ -public interface HDFSStoreFactory { - - /** - * @see HDFSStore#getName() - */ - public HDFSStoreFactory setName(String name); - - /** - * @see HDFSStore#getNameNodeURL() - */ - public HDFSStoreFactory setNameNodeURL(String url); - - /** - * @see HDFSStore#getHomeDir() - */ - public HDFSStoreFactory setHomeDir(String dir); - - /** - * @see HDFSStore#getHDFSClientConfigFile() - */ - public HDFSStoreFactory setHDFSClientConfigFile(String filePath); - - /** - * @see HDFSStore#getHDFSClientConfigFile() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 or more than 100 - */ - public HDFSStoreFactory setBlockCacheSize(float value); - - /** - * Default value {@link HDFSStore#DEFAULT_WRITE_ONLY_FILE_SIZE_LIMIT} - * @see HDFSStore#getWriteOnlyFileRolloverSize() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setWriteOnlyFileRolloverSize(int maxFileSize); - - /** - * Default value {@link HDFSStore#DEFAULT_WRITE_ONLY_FILE_ROLLOVER_INTERVAL} - * @see HDFSStore#getWriteOnlyFileRolloverInterval() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setWriteOnlyFileRolloverInterval(int interval); - - /** - * Default value {@link HDFSStore#DEFAULT_MINOR_COMPACTION} - * @see HDFSStore#getMinorCompaction() - */ - public HDFSStoreFactory setMinorCompaction(boolean auto); - - /** - * Default value {@link HDFSStore#DEFAULT_MINOR_COMPACTION_THREADS} - * @see HDFSStore#getMinorCompactionThreads() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setMinorCompactionThreads(int count); - - /** - * Default value {@link HDFSStore#DEFAULT_MAJOR_COMPACTION} - * @see HDFSStore#getMajorCompaction() - */ - public HDFSStoreFactory setMajorCompaction(boolean auto); - - /** - * Default value {@link HDFSStore#DEFAULT_MAJOR_COMPACTION_INTERVAL_MINS} - * @see HDFSStore#getMajorCompactionInterval() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setMajorCompactionInterval(int interval); - - /** - * Default value {@link HDFSStore#DEFAULT_MAJOR_COMPACTION_THREADS} - * @see HDFSStore#getMajorCompactionThreads() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setMajorCompactionThreads(int count); - - /** - * Default value {@link HDFSStore#DEFAULT_INPUT_FILE_SIZE_MAX_MB} - * @see HDFSStore#getInputFileSizeMax() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setInputFileSizeMax(int size); - - /** - * Default value {@link HDFSStore#DEFAULT_INPUT_FILE_COUNT_MIN} - * @see HDFSStore#getInputFileCountMin() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setInputFileCountMin(int count); - - /** - * Default value {@link HDFSStore#DEFAULT_INPUT_FILE_COUNT_MAX} - * @see HDFSStore#getInputFileCountMax() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setInputFileCountMax(int count); - - /** - * @see HDFSStore#getPurgeInterval() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setPurgeInterval(int interval); - - /** - * @see HDFSStore#getDiskStoreName() - */ - public HDFSStoreFactory setDiskStoreName(String name); - - /** - * @see HDFSStore#getMaxMemory() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setMaxMemory(int memory); - - /** - * @see HDFSStore#getBatchInterval() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setBatchInterval(int interval); - - /** - * @see HDFSStore#getBatchSize() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setBatchSize(int size); - - /** - * @see HDFSStore#getBufferPersistent() - */ - public HDFSStoreFactory setBufferPersistent(boolean isPersistent); - - /** - * @see HDFSStore#getSynchronousDiskWrite() - */ - public HDFSStoreFactory setSynchronousDiskWrite(boolean isSynchronous); - - /** - * @see HDFSStore#getDispatcherThreads() - * @exception IllegalArgumentException - * if the {@code value} is less than 0 - */ - public HDFSStoreFactory setDispatcherThreads(int dispatcherThreads); - - /** - * Validates all attribute values and assigns defaults where applicable. - * Creates a new instance of {@link HDFSStore} based on the current attribute - * values configured in this factory. - * - * @param name - * the name of the HDFSStore - * @return the newly created HDFSStore. - * @throws GemFireConfigException - * if the configuration is invalid - * @throws StoreExistsException - * if a {@link HDFSStore} with the same name exists - */ - public HDFSStore create(String name) throws GemFireConfigException, StoreExistsException; -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreMutator.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreMutator.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreMutator.java deleted file mode 100644 index d98c9cd..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/HDFSStoreMutator.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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. - */ - -package com.gemstone.gemfire.cache.hdfs; - -/** - * HDFSStoreMutator provides a means to dynamically alter {@link HDFSStore}'s - * behavior. Instances of this interface are created using - * {@link HDFSStore#createHdfsStoreMutator} and applied using - * {@link HDFSStore#alter} - * - */ -public interface HDFSStoreMutator { - /** - * {@link HDFSStoreFactory#setWriteOnlyFileRolloverSize(int)} - */ - public HDFSStoreMutator setWriteOnlyFileRolloverSize(int maxFileSize); - - /** - * {@link HDFSStore#getWriteOnlyFileRolloverSize()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getWriteOnlyFileRolloverSize(); - - /** - * {@link HDFSStoreFactory#setWriteOnlyFileRolloverInterval(int)} - */ - public HDFSStoreMutator setWriteOnlyFileRolloverInterval(int interval); - - /** - * {@link HDFSStore#getWriteOnlyFileRolloverInterval()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getWriteOnlyFileRolloverInterval(); - - /** - * {@link HDFSStore#getMinorCompaction()} - * - * @return value to be used when mutator is executed on hdfsStore. null if not - * set - */ - public Boolean getMinorCompaction(); - - /** - * {@link HDFSStoreFactory#setMinorCompaction(boolean)} - */ - public HDFSStoreMutator setMinorCompaction(boolean auto); - - /** - * {@link HDFSStoreFactory#setMinorCompactionThreads(int)} - */ - public HDFSStoreMutator setMinorCompactionThreads(int count); - - /** - * {@link HDFSStore#getMinorCompactionThreads()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getMinorCompactionThreads(); - - /** - * {@link HDFSStoreFactory#setMajorCompaction(boolean)} - */ - public HDFSStoreMutator setMajorCompaction(boolean auto); - - /** - * {@link HDFSStore#getMajorCompaction()} - * - * @return value to be used when mutator is executed on hdfsStore. null if not - * set - */ - public Boolean getMajorCompaction(); - - /** - * {@link HDFSStoreFactory#setMajorCompactionInterval(int)} - */ - public HDFSStoreMutator setMajorCompactionInterval(int interval); - - /** - * {@link HDFSStore#getMajorCompactionInterval()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getMajorCompactionInterval(); - - /** - * {@link HDFSStoreFactory#setMajorCompactionThreads(int)} - */ - public HDFSStoreMutator setMajorCompactionThreads(int count); - - /** - * {@link HDFSStore#getMajorCompactionThreads()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getMajorCompactionThreads(); - - /** - * {@link HDFSStoreFactory#setInputFileSizeMax(int)} - */ - public HDFSStoreMutator setInputFileSizeMax(int size); - - /** - * {@link HDFSStore#getInputFileSizeMax()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getInputFileSizeMax(); - - /** - * {@link HDFSStoreFactory#setInputFileCountMin(int)} - */ - public HDFSStoreMutator setInputFileCountMin(int count); - - /** - * {@link HDFSStore#getInputFileCountMin()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getInputFileCountMin(); - - /** - * {@link HDFSStoreFactory#setInputFileCountMax(int)} - */ - public HDFSStoreMutator setInputFileCountMax(int count); - - /** - * {@link HDFSStore#getInputFileCountMax()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getInputFileCountMax(); - - /** - * {@link HDFSStoreFactory#setPurgeInterval(int)} - */ - public HDFSStoreMutator setPurgeInterval(int interval); - - /** - * {@link HDFSStore#getPurgeInterval()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getPurgeInterval(); - - /** - * {@link HDFSStore#getBatchSize()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getBatchSize(); - - /** - * {@link HDFSStoreFactory#setBatchSize(int)} - */ - public HDFSStoreMutator setBatchSize(int size); - - /** - * {@link HDFSStore#getBatchInterval()} - * - * @return value to be used when mutator is executed on hdfsStore. -1 if not - * set - */ - public int getBatchInterval(); - - /** - * {@link HDFSStoreFactory#setBatchInterval(int)} - */ - public HDFSStoreMutator setBatchInterval(int interval); -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/StoreExistsException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/StoreExistsException.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/StoreExistsException.java deleted file mode 100644 index de21b23..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/StoreExistsException.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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. - */ - -package com.gemstone.gemfire.cache.hdfs; - -import com.gemstone.gemfire.cache.CacheException; - -/** - * Thrown when attempting to create a {@link HDFSStore} if one already exists. - * - */ -public class StoreExistsException extends CacheException { - private static final long serialVersionUID = 1L; - - public StoreExistsException(String storeName) { - super(storeName); - } -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FailureTracker.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FailureTracker.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FailureTracker.java deleted file mode 100644 index 789d497..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FailureTracker.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ -/** - * - */ -package com.gemstone.gemfire.cache.hdfs.internal; - -import org.apache.commons.lang.mutable.MutableInt; -import org.apache.commons.lang.mutable.MutableLong; - -/** - * Class for tracking failures and backing off if necessary. - * - */ -public class FailureTracker extends ThreadLocal { - private final long minTime; - private final long maxTime; - private final float rate; - private final FailureCount waitTime = new FailureCount(); - - - /** - * @param minTime the minimum wait time after a failure in ms. - * @param maxTime the maximum wait tim after a failure, in ms. - * @param rate the rate of growth of the failures - */ - public FailureTracker(long minTime, long maxTime, float rate) { - this.minTime = minTime; - this.maxTime = maxTime; - this.rate = rate; - } - - /** - * Wait for the current wait time. - */ - public void sleepIfRetry() throws InterruptedException { - Thread.sleep(waitTime()); - } - - /** - * @return the wait time = rate^(num_failures) * minTime - */ - public long waitTime() { - return waitTime.get().longValue(); - } - - public void record(boolean success) { - if(success) { - success(); - } else { - failure(); - } - - } - - public void success() { - waitTime.get().setValue(0); - - } - public void failure() { - long current = waitTime.get().intValue(); - if(current == 0) { - current=minTime; - } - else if(current < maxTime) { - current = (long) (current * rate); - } - waitTime.get().setValue(Math.min(current, maxTime)); - } - - - private static class FailureCount extends ThreadLocal { - - @Override - protected MutableLong initialValue() { - return new MutableLong(); - } - } - - - -} http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f0a8a55b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FlushObserver.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FlushObserver.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FlushObserver.java deleted file mode 100644 index f69b3dc..0000000 --- a/geode-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/FlushObserver.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ -package com.gemstone.gemfire.cache.hdfs.internal; - -import java.util.concurrent.TimeUnit; - -/** - * Observes and reacts to flush events. - * - */ -public interface FlushObserver { - public interface AsyncFlushResult { - /** - * Waits for the most recently enqueued batch to completely flush. - * - * @param time the time to wait - * @param unit the time unit - * @return true if flushed before the timeout - * @throws InterruptedException interrupted while waiting - */ - public boolean waitForFlush(long time, TimeUnit unit) throws InterruptedException; - } - - /** - * Returns true when the queued events should be drained from the queue - * immediately. - * - * @return true if draining - */ - boolean shouldDrainImmediately(); - - /** - * Begins the flushing the queued events. - * - * @return the async result - */ - public AsyncFlushResult flush(); -} -