HBASE-9371 Eliminate log spam when tailing files
HBASE-9326 ServerName is created using getLocalSocketAddress, breaks binding to the wildcard address. Revert HBASE-8640 git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1518430 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
950a552f77
commit
fa40ff3566
@ -324,7 +324,10 @@ public class HFileSystem extends FilterFileSystem {
|
|||||||
|
|
||||||
// Ok, so it's an HLog
|
// Ok, so it's an HLog
|
||||||
String hostName = sn.getHostname();
|
String hostName = sn.getHostname();
|
||||||
LOG.debug(src + " is an HLog file, so reordering blocks, last hostname will be:" + hostName);
|
if (LOG.isTraceEnabled()) {
|
||||||
|
LOG.trace(src +
|
||||||
|
" is an HLog file, so reordering blocks, last hostname will be:" + hostName);
|
||||||
|
}
|
||||||
|
|
||||||
// Just check for all blocks
|
// Just check for all blocks
|
||||||
for (LocatedBlock lb : lbs.getLocatedBlocks()) {
|
for (LocatedBlock lb : lbs.getLocatedBlocks()) {
|
||||||
|
@ -400,16 +400,23 @@ MasterServices, Server {
|
|||||||
// Disable the block cache on the master
|
// Disable the block cache on the master
|
||||||
this.conf.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0.0f);
|
this.conf.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0.0f);
|
||||||
// Server to handle client requests.
|
// Server to handle client requests.
|
||||||
String hostname = conf.get("hbase.master.ipc.address",
|
String hostname = Strings.domainNamePointerToHostName(DNS.getDefaultHost(
|
||||||
Strings.domainNamePointerToHostName(DNS.getDefaultHost(
|
conf.get("hbase.master.dns.interface", "default"),
|
||||||
conf.get("hbase.master.dns.interface", "default"),
|
conf.get("hbase.master.dns.nameserver", "default")));
|
||||||
conf.get("hbase.master.dns.nameserver", "default"))));
|
|
||||||
int port = conf.getInt(HConstants.MASTER_PORT, HConstants.DEFAULT_MASTER_PORT);
|
int port = conf.getInt(HConstants.MASTER_PORT, HConstants.DEFAULT_MASTER_PORT);
|
||||||
// Test that the hostname is reachable
|
// Test that the hostname is reachable
|
||||||
InetSocketAddress initialIsa = new InetSocketAddress(hostname, port);
|
InetSocketAddress initialIsa = new InetSocketAddress(hostname, port);
|
||||||
if (initialIsa.getAddress() == null) {
|
if (initialIsa.getAddress() == null) {
|
||||||
throw new IllegalArgumentException("Failed resolve of hostname " + initialIsa);
|
throw new IllegalArgumentException("Failed resolve of hostname " + initialIsa);
|
||||||
}
|
}
|
||||||
|
// Verify that the bind address is reachable if set
|
||||||
|
String bindAddress = conf.get("hbase.master.ipc.address");
|
||||||
|
if (bindAddress != null) {
|
||||||
|
initialIsa = new InetSocketAddress(bindAddress, port);
|
||||||
|
if (initialIsa.getAddress() == null) {
|
||||||
|
throw new IllegalArgumentException("Failed resolve of bind address " + initialIsa);
|
||||||
|
}
|
||||||
|
}
|
||||||
String name = "master/" + initialIsa.toString();
|
String name = "master/" + initialIsa.toString();
|
||||||
// Set how many times to retry talking to another server over HConnection.
|
// Set how many times to retry talking to another server over HConnection.
|
||||||
HConnectionManager.setServerSideHConnectionRetries(this.conf, name, LOG);
|
HConnectionManager.setServerSideHConnectionRetries(this.conf, name, LOG);
|
||||||
@ -428,8 +435,8 @@ MasterServices, Server {
|
|||||||
scheduler);
|
scheduler);
|
||||||
// Set our address.
|
// Set our address.
|
||||||
this.isa = this.rpcServer.getListenerAddress();
|
this.isa = this.rpcServer.getListenerAddress();
|
||||||
this.serverName =
|
// We don't want to pass isa's hostname here since it could be 0.0.0.0
|
||||||
new ServerName(this.isa.getHostName(), this.isa.getPort(), System.currentTimeMillis());
|
this.serverName = new ServerName(hostname, this.isa.getPort(), System.currentTimeMillis());
|
||||||
this.rsFatals = new MemoryBoundedLogMessageBuffer(
|
this.rsFatals = new MemoryBoundedLogMessageBuffer(
|
||||||
conf.getLong("hbase.master.buffer.for.rs.fatals", 1*1024*1024));
|
conf.getLong("hbase.master.buffer.for.rs.fatals", 1*1024*1024));
|
||||||
|
|
||||||
|
@ -114,8 +114,8 @@ public class ProtobufLogReader extends ReaderBase {
|
|||||||
long currentPosition = stream.getPos();
|
long currentPosition = stream.getPos();
|
||||||
trailerPresent = setTrailerIfPresent();
|
trailerPresent = setTrailerIfPresent();
|
||||||
this.seekOnFs(currentPosition);
|
this.seekOnFs(currentPosition);
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isTraceEnabled()) {
|
||||||
LOG.debug("After reading the trailer: walEditsStopOffset: " + this.walEditsStopOffset
|
LOG.trace("After reading the trailer: walEditsStopOffset: " + this.walEditsStopOffset
|
||||||
+ ", fileLength: " + this.fileLength + ", " + "trailerPresent: " + trailerPresent);
|
+ ", fileLength: " + this.fileLength + ", " + "trailerPresent: " + trailerPresent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user