Return-Path: X-Original-To: apmail-flume-commits-archive@www.apache.org Delivered-To: apmail-flume-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 7D55EDBE2 for ; Thu, 30 Aug 2012 21:51:14 +0000 (UTC) Received: (qmail 99653 invoked by uid 500); 30 Aug 2012 21:51:14 -0000 Delivered-To: apmail-flume-commits-archive@flume.apache.org Received: (qmail 99634 invoked by uid 500); 30 Aug 2012 21:51:14 -0000 Mailing-List: contact commits-help@flume.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flume.apache.org Delivered-To: mailing list commits@flume.apache.org Received: (qmail 99625 invoked by uid 99); 30 Aug 2012 21:51:14 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 21:51:14 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 1FB1622908; Thu, 30 Aug 2012 21:51:14 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hshreedharan@apache.org To: commits@flume.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: FLUME-1527. Seed TransactionID/WriteOrderID in the case no logs need to be replayed. Message-Id: <20120830215114.1FB1622908@tyr.zones.apache.org> Date: Thu, 30 Aug 2012 21:51:14 +0000 (UTC) Updated Branches: refs/heads/trunk 82aa5fc16 -> 63e0f43c5 FLUME-1527. Seed TransactionID/WriteOrderID in the case no logs need to be replayed. (Brock Noland via Hari Shreedharan) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/63e0f43c Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/63e0f43c Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/63e0f43c Branch: refs/heads/trunk Commit: 63e0f43c5281a643af5709d4b09c15d03c142c77 Parents: 82aa5fc Author: Hari Shreedharan Authored: Thu Aug 30 14:48:58 2012 -0700 Committer: Hari Shreedharan Committed: Thu Aug 30 14:48:58 2012 -0700 ---------------------------------------------------------------------- .../apache/flume/channel/file/ReplayHandler.java | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/63e0f43c/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java index 14e2ff7..6f8af09 100644 --- a/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java +++ b/flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/ReplayHandler.java @@ -212,7 +212,8 @@ class ReplayHandler { void replayLog(List logs) throws IOException { int count = 0; MultiMap transactionMap = new MultiValueMap(); - long transactionIDSeed = 0, writeOrderIDSeed = 0; + // seed both with the highest known sequence of either the tnxid or woid + long transactionIDSeed = lastCheckpoint, writeOrderIDSeed = lastCheckpoint; LOG.info("Starting replay of " + logs); //Load the inflight puts into the transaction map to see if they were //committed in one of the logs.