You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2008/12/21 04:52:12 UTC
svn commit: r728384 - in /hadoop/hbase/trunk/src:
java/org/apache/hadoop/hbase/client/HTable.java
java/org/apache/hadoop/hbase/io/BlockFSInputStream.java
webapps/master/master.jsp webapps/regionserver/regionserver.jsp
Author: stack
Date: Sat Dec 20 19:52:11 2008
New Revision: 728384
URL: http://svn.apache.org/viewvc?rev=728384&view=rev
Log:
HBASE-1074 New thread introduced by hbase-900 part 4 is not daemon so can cause JVM to stick around on abort
Modified:
hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java
hadoop/hbase/trunk/src/webapps/master/master.jsp
hadoop/hbase/trunk/src/webapps/regionserver/regionserver.jsp
Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java?rev=728384&r1=728383&r2=728384&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/client/HTable.java Sat Dec 20 19:52:11 2008
@@ -1524,7 +1524,6 @@
} catch (IOException e) {
if (e instanceof UnknownScannerException &&
lastNext + scannerTimeout < System.currentTimeMillis()) {
-
ScannerTimeoutException ex = new ScannerTimeoutException();
ex.initCause(e);
throw ex;
@@ -1538,7 +1537,6 @@
countdown--;
}
}
-
} while (countdown > 0 && nextScanner(countdown));
}
Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java?rev=728384&r1=728383&r2=728384&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/io/BlockFSInputStream.java Sat Dec 20 19:52:11 2008
@@ -24,6 +24,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log;
@@ -48,7 +49,15 @@
* also want BlockFSInputStream to be self-contained.
*/
private static final ScheduledExecutorService EXECUTOR =
- Executors.newSingleThreadScheduledExecutor();
+ Executors.newSingleThreadScheduledExecutor(new ThreadFactory() {
+ public Thread newThread(Runnable r) {
+ Thread t = new Thread(r);
+ t.setDaemon(true);
+ t.setName("BlockFSInputStream referenceQueue Checker");
+ return t;
+ }
+
+ });
/*
* The registration of this object in EXECUTOR.
@@ -101,11 +110,12 @@
}
};
// Register a Runnable that runs checkReferences on a period.
+ final int hashcode = hashCode();
this.registration = EXECUTOR.scheduleAtFixedRate(new Runnable() {
public void run() {
int cleared = checkReferences();
if (LOG.isDebugEnabled() && cleared > 0) {
- LOG.debug("Cleared " + cleared);
+ LOG.debug("Cleared " + cleared + " in " + hashcode);
}
}
}, 10, 10, TimeUnit.SECONDS);
Modified: hadoop/hbase/trunk/src/webapps/master/master.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/webapps/master/master.jsp?rev=728384&r1=728383&r2=728384&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/webapps/master/master.jsp (original)
+++ hadoop/hbase/trunk/src/webapps/master/master.jsp Sat Dec 20 19:52:11 2008
@@ -25,7 +25,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
- <meta http-equiv="refresh" content="30"/>
+ <meta http-equiv="refresh" content="300"/>
<title>HBase Master: <%= master.getMasterAddress().getHostname()%>:<%= master.getMasterAddress().getPort() %></title>
<link rel="stylesheet" type="text/css" href="/static/hbase.css" />
</head>
Modified: hadoop/hbase/trunk/src/webapps/regionserver/regionserver.jsp
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/webapps/regionserver/regionserver.jsp?rev=728384&r1=728383&r2=728384&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/webapps/regionserver/regionserver.jsp (original)
+++ hadoop/hbase/trunk/src/webapps/regionserver/regionserver.jsp Sat Dec 20 19:52:11 2008
@@ -20,7 +20,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
- <meta http-equiv="refresh" content="30"/>
+ <meta http-equiv="refresh" content="300"/>
<title>HBase Region Server: <%= serverInfo.getServerAddress().getHostname() %>:<%= serverInfo.getServerAddress().getPort() %></title>
<link rel="stylesheet" type="text/css" href="/static/hbase.css" />
</head>