You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by kt...@apache.org on 2011/10/14 17:49:53 UTC
svn commit: r1183394 - in /incubator/accumulo: branches/1.3/docs/
branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/
trunk/docs/
trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/
Author: kturner
Date: Fri Oct 14 15:49:52 2011
New Revision: 1183394
URL: http://svn.apache.org/viewvc?rev=1183394&view=rev
Log:
ACCUMULO-28 Applied timeout to batch scans, removed timeout from getting scan results, updated config doc for new property
Modified:
incubator/accumulo/branches/1.3/docs/config.html
incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
incubator/accumulo/trunk/docs/config.html
incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Modified: incubator/accumulo/branches/1.3/docs/config.html
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/docs/config.html?rev=1183394&r1=1183393&r2=1183394&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/docs/config.html (original)
+++ incubator/accumulo/branches/1.3/docs/config.html Fri Oct 14 15:49:52 2011
@@ -233,174 +233,181 @@ $HADOOP_HOME/lib/[^.].*.jar,
<td>Specifies the size of the cache for file indices.</td>
</tr>
<tr >
+ <td>tserver.client.timeout</td>
+ <td><b><a href='#TIMEDURATION'>duration</a></b></td>
+ <td>yes</td>
+ <td><pre>3s</pre></td>
+ <td>Time to wait for clients to continue scans before closing a session.</td>
+ </tr>
+ <tr class='highlight'>
<td>tserver.compaction.major.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>3</pre></td>
<td>The maximum number of concurrent major compactions for a tablet server</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.compaction.major.delay</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>30s</pre></td>
<td>Time a tablet server will sleep between checking which tablets need compaction.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.compaction.major.files.open.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>90</pre></td>
<td>Max number of files a major compaction can open at once. At runtime this number is divided by the concurrent number of compactors.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.compaction.minor.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>4</pre></td>
<td>The maximum number of concurrent minor compactions for a tablet server</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.default.blocksize</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
<td><pre>1M</pre></td>
<td>Specifies a default blocksize for the tserver caches</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.dir.memdump</td>
<td><b><a href='#PATH'>path</a></b></td>
<td>yes</td>
<td><pre>/tmp</pre></td>
<td>A long running scan could possibly hold memory that has been minor compacted. To prevent this, the in memory map is dumped to a local file and the scan is switched to that local file. We can not switch to the minor compacted file because it may have been modified by iterators. The file dumped to the local dir is an exact copy of what was in memory.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.files.open.idle</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>1m</pre></td>
<td>Tablet servers leave previously used map files open for future queries. This setting determines how much time an unused map file should be kept open until it is closed.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.files.open.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>150</pre></td>
<td>Maximum total map files that all tablets in a tablet server can open. This includes major compactions. So the number of map files that can be opened for searches is: <code>tserver.files.open.max - tserver.compaction.major.files.open.max</code></td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.logger.count</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>2</pre></td>
<td>The number of loggers that each tablet server should use.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.logger.strategy</td>
<td><b><a href='#STRING'>string</a></b></td>
<td>yes</td>
<td><pre>org.apache.accumulo.server.tabletserver.log.RoundRobinLoggerStrategy</pre></td>
<td>The classname used to decide which loggers to use.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.logger.timeout</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>30s</pre></td>
<td>The time to wait for a logger to respond to a write-ahead request</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.memory.lock</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes</td>
<td><pre>false</pre></td>
<td>The tablet server must communicate with zookeeper frequently to maintain its locks. If the tablet server's memory is swapped out the java garbage collector can stop all processing for long periods. Change this property to true and the tablet server will attempt to lock all of its memory to RAM, which may reduce delays during java garbage collection. You will have to modify the system limit for "max locked memory". This feature is only available when running on Linux. Alternatively you may also want to set /proc/sys/vm/swappiness to zero (again, this is Linux-specific).</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.memory.manager</td>
<td><b><a href='#CLASSNAME'>java class</a></b></td>
<td>yes</td>
<td><pre>org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager</pre></td>
<td>An implementation of MemoryManger that accumulo will use.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.memory.maps.max</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
<td><pre>1G</pre></td>
<td>Maximum amount of memory all tablets in memory maps can use.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.memory.maps.native.enabled</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes but requires restart</td>
<td><pre>true</pre></td>
<td>An in-memory data store for accumulo implemented in c++ that increases the amount of data accumulo can hold in memory and avoids Java GC pauses.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.metadata.readahead.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>8</pre></td>
<td>The maximum number of concurrent metadata read ahead that will execute.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.migrations.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>1</pre></td>
<td>The maximum number of concurrent tablet migrations for a tablet server</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.monitor.fs</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes</td>
<td><pre>true</pre></td>
<td>When enabled the tserver will monitor file systems and kill itself when one switches from rw to ro. This is usually and indication that Linux has detected a bad disk.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.mutation.queue.max</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
<td><pre>256K</pre></td>
<td>The amount of memory to use to store write-ahead-log mutations-per-session before flushing them.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.port.client</td>
<td><b><a href='#PORT'>port</a></b></td>
<td>yes but requires restart</td>
<td><pre>9997</pre></td>
<td>The port used for handling client connections on the tablet servers</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.port.search</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes</td>
<td><pre>false</pre></td>
<td>if the ports above are in use, search higher ports until one is available</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.readahead.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>16</pre></td>
<td>The maximum number of concurrent read ahead that will execute. This effectivelylimits the number of long running scans that can run concurrently per tserver.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.session.idle.max</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>1m</pre></td>
<td>maximum idle time for a session</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.tablet.split.midpoint.files.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>30</pre></td>
<td>To find a tablets split points, all index files are opened. This setting determines how many index files can be opened at once. When there are more index files than this setting multiple passes must be made, which is slower. However opening too many files at once can cause problems.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.walog.max.size</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
Modified: incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1183394&r1=1183393&r2=1183394&view=diff
==============================================================================
--- incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java (original)
+++ incubator/accumulo/branches/1.3/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java Fri Oct 14 15:49:52 2011
@@ -216,6 +216,8 @@ public class TabletServer extends Abstra
private static AtomicLong scanCount = new AtomicLong();
private static final Class<? extends LoggerStrategy> DEFAULT_LOGGER_STRATEGY = RoundRobinLoggerStrategy.class;
+ private static final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 1000;
+
private TabletServerLogger logger;
private LoggerStrategy loggerStrategy;
@@ -1040,9 +1042,6 @@ public class TabletServer extends Abstra
private ScanResult continueScan(TInfo tinfo, long scanID, ScanSession scanSession) throws NoSuchScanIDException, NotServingTabletException, org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException {
- long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
-
-
if(scanSession.nextBatchTask == null){
scanSession.nextBatchTask = new NextBatchTask(scanID, scanSession.interruptFlag);
resourceManager.executeReadAhead(scanSession.extent, scanSession.nextBatchTask);
@@ -1050,7 +1049,7 @@ public class TabletServer extends Abstra
ScanBatch bresult;
try {
- bresult = scanSession.nextBatchTask.get(timeout, TimeUnit.MILLISECONDS);
+ bresult = scanSession.nextBatchTask.get(MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS, TimeUnit.MILLISECONDS);
scanSession.nextBatchTask = null;
} catch (ExecutionException e) {
sessionManager.removeSession(scanID);
@@ -1068,6 +1067,7 @@ public class TabletServer extends Abstra
else
throw new NoSuchScanIDException();
} catch (TimeoutException e) {
+ long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
List<TKeyValue> param = Collections.emptyList();
sessionManager.removeIfNotAccessed(scanID, timeout);
return new ScanResult(param,true);
@@ -1218,11 +1218,12 @@ public class TabletServer extends Abstra
}
try {
- MultiScanResult scanResult = session.lookupTask.get(3, TimeUnit.SECONDS);
+ MultiScanResult scanResult = session.lookupTask.get(MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS, TimeUnit.MILLISECONDS);
session.lookupTask = null;
return scanResult;
} catch (TimeoutException e1) {
- sessionManager.removeIfNotAccessed(scanID, 3000);
+ long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
+ sessionManager.removeIfNotAccessed(scanID, timeout);
List<TKeyValue> results = Collections.emptyList();
Map<TKeyExtent, List<TRange>> failures = Collections.emptyMap();
List<TKeyExtent> fullScans = Collections.emptyList();
Modified: incubator/accumulo/trunk/docs/config.html
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/docs/config.html?rev=1183394&r1=1183393&r2=1183394&view=diff
==============================================================================
--- incubator/accumulo/trunk/docs/config.html (original)
+++ incubator/accumulo/trunk/docs/config.html Fri Oct 14 15:49:52 2011
@@ -292,195 +292,202 @@ $HADOOP_HOME/lib/[^.].*.jar,
<td>Specifies the size of the cache for file indices.</td>
</tr>
<tr class='highlight'>
+ <td>tserver.client.timeout</td>
+ <td><b><a href='#TIMEDURATION'>duration</a></b></td>
+ <td>yes</td>
+ <td><pre>3s</pre></td>
+ <td>Time to wait for clients to continue scans before closing a session.</td>
+ </tr>
+ <tr >
<td>tserver.compaction.major.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>3</pre></td>
<td>The maximum number of concurrent major compactions for a tablet server</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.compaction.major.delay</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>30s</pre></td>
<td>Time a tablet server will sleep between checking which tablets need compaction.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.compaction.major.thread.files.open.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>10</pre></td>
<td>Max number of files a major compaction thread can open at once. </td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.compaction.minor.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>4</pre></td>
<td>The maximum number of concurrent minor compactions for a tablet server</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.default.blocksize</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
<td><pre>1M</pre></td>
<td>Specifies a default blocksize for the tserver caches</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.dir.memdump</td>
<td><b><a href='#PATH'>path</a></b></td>
<td>yes</td>
<td><pre>/tmp</pre></td>
<td>A long running scan could possibly hold memory that has been minor compacted. To prevent this, the in memory map is dumped to a local file and the scan is switched to that local file. We can not switch to the minor compacted file because it may have been modified by iterators. The file dumped to the local dir is an exact copy of what was in memory.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.files.open.idle</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>1m</pre></td>
<td>Tablet servers leave previously used map files open for future queries. This setting determines how much time an unused map file should be kept open until it is closed.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.hold.time.max</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>5m</pre></td>
<td>The maximum time for a tablet server to be in the "memory full" state. If the tablet server cannot write out memory in this much time, it will assume there is some failure local to its node, and quit. A value of zero is equivalent to forever.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.logger.count</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>2</pre></td>
<td>The number of loggers that each tablet server should use.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.logger.strategy</td>
<td><b><a href='#STRING'>string</a></b></td>
<td>yes</td>
<td><pre>org.apache.accumulo.server.tabletserver.log.RoundRobinLoggerStrategy</pre></td>
<td>The classname used to decide which loggers to use.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.logger.timeout</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>30s</pre></td>
<td>The time to wait for a logger to respond to a write-ahead request</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.memory.lock</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes</td>
<td><pre>false</pre></td>
<td>The tablet server must communicate with zookeeper frequently to maintain its locks. If the tablet server's memory is swapped out the java garbage collector can stop all processing for long periods. Change this property to true and the tablet server will attempt to lock all of its memory to RAM, which may reduce delays during java garbage collection. You will have to modify the system limit for "max locked memory". This feature is only available when running on Linux. Alternatively you may also want to set /proc/sys/vm/swappiness to zero (again, this is Linux-specific).</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.memory.manager</td>
<td><b><a href='#CLASSNAME'>java class</a></b></td>
<td>yes</td>
<td><pre>org.apache.accumulo.server.tabletserver.LargestFirstMemoryManager</pre></td>
<td>An implementation of MemoryManger that accumulo will use.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.memory.maps.max</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
<td><pre>1G</pre></td>
<td>Maximum amount of memory all tablets in memory maps can use.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.memory.maps.native.enabled</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes but requires restart</td>
<td><pre>true</pre></td>
<td>An in-memory data store for accumulo implemented in c++ that increases the amount of data accumulo can hold in memory and avoids Java GC pauses.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.metadata.readahead.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>8</pre></td>
<td>The maximum number of concurrent metadata read ahead that will execute.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.migrations.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>1</pre></td>
<td>The maximum number of concurrent tablet migrations for a tablet server</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.monitor.fs</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes</td>
<td><pre>true</pre></td>
<td>When enabled the tserver will monitor file systems and kill itself when one switches from rw to ro. This is usually and indication that Linux has detected a bad disk.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.mutation.queue.max</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
<td><pre>256K</pre></td>
<td>The amount of memory to use to store write-ahead-log mutations-per-session before flushing them.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.port.client</td>
<td><b><a href='#PORT'>port</a></b></td>
<td>yes but requires restart</td>
<td><pre>9997</pre></td>
<td>The port used for handling client connections on the tablet servers</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.port.search</td>
<td><b><a href='#BOOLEAN'>boolean</a></b></td>
<td>yes</td>
<td><pre>false</pre></td>
<td>if the ports above are in use, search higher ports until one is available</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.readahead.concurrent.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>16</pre></td>
<td>The maximum number of concurrent read ahead that will execute. This effectivelylimits the number of long running scans that can run concurrently per tserver.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.scan.files.open.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes but requires restart</td>
<td><pre>100</pre></td>
<td>Maximum total map files that all tablets in a tablet server can open for scans. </td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.server.threadcheck.time</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>1s</pre></td>
<td>The time between adjustments of the server thread pool.</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.server.threads.minimum</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>2</pre></td>
<td>The miniumum number of threads to use to handle incoming requests.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.session.idle.max</td>
<td><b><a href='#TIMEDURATION'>duration</a></b></td>
<td>yes</td>
<td><pre>1m</pre></td>
<td>maximum idle time for a session</td>
</tr>
- <tr class='highlight'>
+ <tr >
<td>tserver.tablet.split.midpoint.files.max</td>
<td><b><a href='#COUNT'>count</a></b></td>
<td>yes</td>
<td><pre>30</pre></td>
<td>To find a tablets split points, all index files are opened. This setting determines how many index files can be opened at once. When there are more index files than this setting multiple passes must be made, which is slower. However opening too many files at once can cause problems.</td>
</tr>
- <tr >
+ <tr class='highlight'>
<td>tserver.walog.max.size</td>
<td><b><a href='#MEMORY'>memory</a></b></td>
<td>yes</td>
Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1183394&r1=1183393&r2=1183394&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java Fri Oct 14 15:49:52 2011
@@ -198,6 +198,8 @@ public class TabletServer extends Abstra
private static AtomicLong scanCount = new AtomicLong();
private static final Class<? extends LoggerStrategy> DEFAULT_LOGGER_STRATEGY = RoundRobinLoggerStrategy.class;
+ private static final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 1000;
+
private TabletServerLogger logger;
private LoggerStrategy loggerStrategy;
@@ -1131,8 +1133,6 @@ public class TabletServer extends Abstra
throws NoSuchScanIDException, NotServingTabletException,
org.apache.accumulo.core.tabletserver.thrift.TooManyFilesException {
- long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
-
if (scanSession.nextBatchTask == null) {
scanSession.nextBatchTask = new NextBatchTask(scanID, scanSession.interruptFlag);
resourceManager.executeReadAhead(scanSession.extent, scanSession.nextBatchTask);
@@ -1140,7 +1140,7 @@ public class TabletServer extends Abstra
ScanBatch bresult;
try {
- bresult = scanSession.nextBatchTask.get(timeout, TimeUnit.MILLISECONDS);
+ bresult = scanSession.nextBatchTask.get(MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS, TimeUnit.MILLISECONDS);
scanSession.nextBatchTask = null;
} catch (ExecutionException e) {
sessionManager.removeSession(scanID);
@@ -1159,6 +1159,7 @@ public class TabletServer extends Abstra
throw new NoSuchScanIDException();
} catch (TimeoutException e) {
List<TKeyValue> param = Collections.emptyList();
+ long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
sessionManager.removeIfNotAccessed(scanID, timeout);
return new ScanResult(param, true);
} catch (Throwable t) {
@@ -1306,11 +1307,12 @@ public class TabletServer extends Abstra
}
try {
- MultiScanResult scanResult = session.lookupTask.get(3, TimeUnit.SECONDS);
+ MultiScanResult scanResult = session.lookupTask.get(MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS, TimeUnit.MILLISECONDS);
session.lookupTask = null;
return scanResult;
} catch (TimeoutException e1) {
- sessionManager.removeIfNotAccessed(scanID, 3000);
+ long timeout = acuConf.getTimeInMillis(Property.TSERV_CLIENT_TIMEOUT);
+ sessionManager.removeIfNotAccessed(scanID, timeout);
List<TKeyValue> results = Collections.emptyList();
Map<TKeyExtent, List<TRange>> failures = Collections.emptyMap();
List<TKeyExtent> fullScans = Collections.emptyList();