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 9279BE9EB for ; Mon, 28 Jan 2013 18:03:00 +0000 (UTC) Received: (qmail 78284 invoked by uid 500); 28 Jan 2013 18:03:00 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 78230 invoked by uid 500); 28 Jan 2013 18:03:00 -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 78140 invoked by uid 99); 28 Jan 2013 18:03:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jan 2013 18:03:00 +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; Mon, 28 Jan 2013 18:02:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AC4E823888E7; Mon, 28 Jan 2013 18:02:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1439534 - in /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase: HConstants.java regionserver/Store.java Date: Mon, 28 Jan 2013 18:02:39 -0000 To: commits@hbase.apache.org From: larsh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130128180239.AC4E823888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: larsh Date: Mon Jan 28 18:02:39 2013 New Revision: 1439534 URL: http://svn.apache.org/viewvc?rev=1439534&view=rev Log: HBASE-7507 Revert, due to 0.94 test stability issues Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1439534&r1=1439533&r2=1439534&view=diff ============================================================================== --- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java (original) +++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java Mon Jan 28 18:02:39 2013 @@ -478,17 +478,6 @@ public final class HConstants { public static long DEFAULT_HBASE_CLIENT_PAUSE = 1000; /** - * Parameter name for server pause value, used mostly as value to wait before - * running a retry of a failed operation. - */ - public static String HBASE_SERVER_PAUSE = "hbase.server.pause"; - - /** - * Default value of {@link #HBASE_SERVER_PAUSE}. - */ - public static int DEFAULT_HBASE_SERVER_PAUSE = 1000; - - /** * Parameter name for maximum retries, used as maximum for all retryable * operations such as fetching of the root region from root region server, * getting a cell's value, starting a row update, etc. Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1439534&r1=1439533&r2=1439534&view=diff ============================================================================== --- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original) +++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Mon Jan 28 18:02:39 2013 @@ -166,10 +166,6 @@ public class Store extends SchemaConfigu private final Compactor compactor; - private static final int DEFAULT_FLUSH_RETRIES_NUMBER = 10; - private static int flush_retries_number; - private static int pauseTime; - /** * Constructor * @param basedir qualified path under which the region directory lives; @@ -249,17 +245,6 @@ public class Store extends SchemaConfigu this.bytesPerChecksum = getBytesPerChecksum(conf); // Create a compaction tool instance this.compactor = new Compactor(this.conf); - if (Store.flush_retries_number == 0) { - Store.flush_retries_number = conf.getInt( - "hbase.hstore.flush.retries.number", DEFAULT_FLUSH_RETRIES_NUMBER); - Store.pauseTime = conf.getInt(HConstants.HBASE_SERVER_PAUSE, - HConstants.DEFAULT_HBASE_SERVER_PAUSE); - if (Store.flush_retries_number <= 0) { - throw new IllegalArgumentException( - "hbase.hstore.flush.retries.number must be > 0, not " - + Store.flush_retries_number); - } - } } /** @@ -737,43 +722,8 @@ public class Store extends SchemaConfigu // If an exception happens flushing, we let it out without clearing // the memstore snapshot. The old snapshot will be returned when we say // 'snapshot', the next time flush comes around. - // Retry after catching exception when flushing, otherwise server will abort - // itself - IOException lastException = null; - for (int i = 0; i < Store.flush_retries_number; i++) { - try { - Path pathName = internalFlushCache(snapshot, logCacheFlushId, - snapshotTimeRangeTracker, flushedSize, status); - try { - // Path name is null if there is no entry to flush - if (pathName != null) { - validateStoreFile(pathName); - } - return pathName; - } catch (Exception e) { - LOG.warn("Failed validating store file " + pathName - + ", retring num=" + i, e); - if (e instanceof IOException) { - lastException = (IOException) e; - } else { - lastException = new IOException(e); - } - } - } catch (IOException e) { - LOG.warn("Failed flushing store file, retring num=" + i, e); - lastException = e; - } - if (lastException != null) { - try { - Thread.sleep(pauseTime); - } catch (InterruptedException e) { - IOException iie = new InterruptedIOException(); - iie.initCause(e); - throw iie; - } - } - } - throw lastException; + return internalFlushCache( + snapshot, logCacheFlushId, snapshotTimeRangeTracker, flushedSize, status); } /* @@ -892,6 +842,7 @@ public class Store extends SchemaConfigu // Write-out finished successfully, move into the right spot String fileName = path.getName(); Path dstPath = new Path(homedir, fileName); + validateStoreFile(path); String msg = "Renaming flushed file at " + path + " to " + dstPath; LOG.debug(msg); status.setStatus("Flushing " + this + ": " + msg);