HBASE-854 hbase-841 broke build on hudson? - makes sure that proxies are closed. (Andrew Purtell via Jim Kellerman)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@690437 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-08-30 01:32:09 +00:00
parent 1371c33e8d
commit bc577ede4a
4 changed files with 29 additions and 3 deletions

View File

@ -47,6 +47,8 @@ Release 0.18.0 - Unreleased
one time (Billy Pearson via Stack)
HBASE-836 Update thrift examples to work with changed IDL (HBASE-697)
(Toby White via Stack)
HBASE-854 hbase-841 broke build on hudson? - makes sure that proxies are
closed. (Andrew Purtell via Jim Kellerman)
IMPROVEMENTS
HBASE-801 When a table haven't disable, shell could response in a "user

View File

@ -98,7 +98,10 @@ public class HConnectionManager implements HConstants {
*/
public static void deleteConnectionInfo(HBaseConfiguration conf) {
synchronized (HBASE_INSTANCES) {
HBASE_INSTANCES.remove(conf.get(HBASE_DIR));
TableServers t = HBASE_INSTANCES.remove(conf.get(HBASE_DIR));
if (t != null) {
t.close();
}
}
}
@ -107,6 +110,9 @@ public class HConnectionManager implements HConstants {
*/
public static void deleteConnectionInfo() {
synchronized (HBASE_INSTANCES) {
for (TableServers t: HBASE_INSTANCES.values()) {
t.close();
}
HBASE_INSTANCES.clear();
}
}
@ -887,5 +893,19 @@ public class HConnectionManager implements HConstants {
}
return null;
}
void close() {
if (master != null) {
HbaseRPC.stopProxy(master);
master = null;
masterChecked = false;
}
synchronized (servers) {
for (HRegionInterface i: servers.values()) {
HbaseRPC.stopProxy(i);
}
}
}
}
}

View File

@ -36,9 +36,9 @@ import org.apache.hadoop.hbase.NotServingRegionException;
public interface HRegionInterface extends VersionedProtocol {
/**
* Protocol version.
* Upped to 3 when we went from Text to byte arrays for row and column names.
* Upped to 4 when we removed overloaded methods from the protocol.
*/
public static final long versionID = 3L;
public static final long versionID = 4L;
/**
* Get metainfo about an HRegion

View File

@ -484,6 +484,10 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
LOG.info("stopping server at: " +
serverInfo.getServerAddress().toString());
}
if (this.hbaseMaster != null) {
HbaseRPC.stopProxy(this.hbaseMaster);
this.hbaseMaster = null;
}
join();
LOG.info(Thread.currentThread().getName() + " exiting");
}