Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A9EC1030B for ; Thu, 29 Aug 2013 00:36:44 +0000 (UTC) Received: (qmail 16531 invoked by uid 500); 29 Aug 2013 00:36:44 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 16507 invoked by uid 500); 29 Aug 2013 00:36:44 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 16500 invoked by uid 99); 29 Aug 2013 00:36:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 00:36:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 00:36:42 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id C735723888A6; Thu, 29 Aug 2013 00:36:22 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1518429 - in /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase: fs/HFileSystem.java master/HMaster.java regionserver/wal/ProtobufLogReader.java Date: Thu, 29 Aug 2013 00:36:22 -0000 To: commits@hbase.apache.org From: jdcryans@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130829003622.C735723888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdcryans Date: Thu Aug 29 00:36:22 2013 New Revision: 1518429 URL: http://svn.apache.org/r1518429 Log: HBASE-9371 Eliminate log spam when tailing files HBASE-9326 ServerName is created using getLocalSocketAddress, breaks binding to the wildcard address. Revert HBASE-8640 Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java?rev=1518429&r1=1518428&r2=1518429&view=diff ============================================================================== --- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java (original) +++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java Thu Aug 29 00:36:22 2013 @@ -324,7 +324,10 @@ public class HFileSystem extends FilterF // Ok, so it's an HLog 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 for (LocatedBlock lb : lbs.getLocatedBlocks()) { Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java?rev=1518429&r1=1518428&r2=1518429&view=diff ============================================================================== --- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java (original) +++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java Thu Aug 29 00:36:22 2013 @@ -399,16 +399,23 @@ MasterServices, Server { // Disable the block cache on the master this.conf.setFloat(HConstants.HFILE_BLOCK_CACHE_SIZE_KEY, 0.0f); // Server to handle client requests. - String hostname = conf.get("hbase.master.ipc.address", - Strings.domainNamePointerToHostName(DNS.getDefaultHost( - conf.get("hbase.master.dns.interface", "default"), - conf.get("hbase.master.dns.nameserver", "default")))); + String hostname = Strings.domainNamePointerToHostName(DNS.getDefaultHost( + conf.get("hbase.master.dns.interface", "default"), + conf.get("hbase.master.dns.nameserver", "default"))); int port = conf.getInt(HConstants.MASTER_PORT, HConstants.DEFAULT_MASTER_PORT); // Test that the hostname is reachable InetSocketAddress initialIsa = new InetSocketAddress(hostname, port); if (initialIsa.getAddress() == null) { 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(); // Set how many times to retry talking to another server over HConnection. HConnectionManager.setServerSideHConnectionRetries(this.conf, name, LOG); @@ -422,8 +429,8 @@ MasterServices, Server { 0); // this is a DNC w/o high priority handlers // Set our address. this.isa = this.rpcServer.getListenerAddress(); - this.serverName = - new ServerName(this.isa.getHostName(), this.isa.getPort(), System.currentTimeMillis()); + // We don't want to pass isa's hostname here since it could be 0.0.0.0 + this.serverName = new ServerName(hostname, this.isa.getPort(), System.currentTimeMillis()); this.rsFatals = new MemoryBoundedLogMessageBuffer( conf.getLong("hbase.master.buffer.for.rs.fatals", 1*1024*1024)); Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java?rev=1518429&r1=1518428&r2=1518429&view=diff ============================================================================== --- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java (original) +++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/ProtobufLogReader.java Thu Aug 29 00:36:22 2013 @@ -114,8 +114,8 @@ public class ProtobufLogReader extends R long currentPosition = stream.getPos(); trailerPresent = setTrailerIfPresent(); this.seekOnFs(currentPosition); - if (LOG.isDebugEnabled()) { - LOG.debug("After reading the trailer: walEditsStopOffset: " + this.walEditsStopOffset + if (LOG.isTraceEnabled()) { + LOG.trace("After reading the trailer: walEditsStopOffset: " + this.walEditsStopOffset + ", fileLength: " + this.fileLength + ", " + "trailerPresent: " + trailerPresent); } }