Return-Path: X-Original-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-accumulo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6856A9977 for ; Tue, 24 Jan 2012 20:13:46 +0000 (UTC) Received: (qmail 28786 invoked by uid 500); 24 Jan 2012 20:13:46 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 28551 invoked by uid 500); 24 Jan 2012 20:13:45 -0000 Mailing-List: contact accumulo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: accumulo-dev@incubator.apache.org Delivered-To: mailing list accumulo-commits@incubator.apache.org Received: (qmail 28452 invoked by uid 99); 24 Jan 2012 20:13:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2012 20:13:45 +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; Tue, 24 Jan 2012 20:13:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 14CEA2388860; Tue, 24 Jan 2012 20:13:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1235464 - in /incubator/accumulo/trunk: ./ conf/generic_logger.xml src/core/ src/core/src/main/java/org/apache/accumulo/core/conf/Property.java src/server/ src/server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java Date: Tue, 24 Jan 2012 20:13:23 -0000 To: accumulo-commits@incubator.apache.org From: kturner@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120124201324.14CEA2388860@eris.apache.org> Author: kturner Date: Tue Jan 24 20:13:23 2012 New Revision: 1235464 URL: http://svn.apache.org/viewvc?rev=1235464&view=rev Log: ACCUMULO-326 ACCUMULO-336 merged from 1.4 Modified: incubator/accumulo/trunk/ (props changed) incubator/accumulo/trunk/conf/generic_logger.xml incubator/accumulo/trunk/src/core/ (props changed) incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java incubator/accumulo/trunk/src/server/ (props changed) incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java Propchange: incubator/accumulo/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jan 24 20:13:23 2012 @@ -1,3 +1,3 @@ /incubator/accumulo/branches/1.3:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043 /incubator/accumulo/branches/1.3.5rc:1209938 -/incubator/accumulo/branches/1.4:1201902-1234951 +/incubator/accumulo/branches/1.4:1201902-1235463 Modified: incubator/accumulo/trunk/conf/generic_logger.xml URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/conf/generic_logger.xml?rev=1235464&r1=1235463&r2=1235464&view=diff ============================================================================== --- incubator/accumulo/trunk/conf/generic_logger.xml (original) +++ incubator/accumulo/trunk/conf/generic_logger.xml Tue Jan 24 20:13:23 2012 @@ -21,7 +21,7 @@ - + @@ -32,7 +32,7 @@ - + Propchange: incubator/accumulo/trunk/src/core/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jan 24 20:13:23 2012 @@ -1,3 +1,3 @@ -/incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215 /incubator/accumulo/branches/1.3.5rc/src/core:1209938 -/incubator/accumulo/branches/1.4/src/core:1201902-1234951 +/incubator/accumulo/branches/1.3/src/core:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215 +/incubator/accumulo/branches/1.4/src/core:1201902-1235463 Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java?rev=1235464&r1=1235463&r2=1235464&view=diff ============================================================================== --- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java (original) +++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/conf/Property.java Tue Jan 24 20:13:23 2012 @@ -157,6 +157,8 @@ public enum Property { "The directory used to store write-ahead logs on the local filesystem. It is possible to specify a comma-separated list of directories."), LOGGER_PORTSEARCH("logger.port.search", "false", PropertyType.BOOLEAN, "if the port above is in use, search higher ports until one is available"), LOGGER_ARCHIVE("logger.archive", "false", PropertyType.BOOLEAN, "determines if logs are archived in hdfs"), + LOGGER_ARCHIVE_REPLICATION("logger.archive.replication", "0", PropertyType.COUNT, + "determines the replication factor for walogs archived in hdfs, set to zero to use default"), LOGGER_MONITOR_FS( "logger.monitor.fs", "true", Propchange: incubator/accumulo/trunk/src/server/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Jan 24 20:13:23 2012 @@ -1,3 +1,3 @@ -/incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611 /incubator/accumulo/branches/1.3.5rc/src/server:1209938 -/incubator/accumulo/branches/1.4/src/server:1201902-1234099 +/incubator/accumulo/branches/1.3/src/server:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611 +/incubator/accumulo/branches/1.4/src/server:1201902-1235463 Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java?rev=1235464&r1=1235463&r2=1235464&view=diff ============================================================================== --- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java (original) +++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/logger/LogArchiver.java Tue Jan 24 20:13:23 2012 @@ -43,6 +43,7 @@ public class LogArchiver { private FileSystem dest; private String destDir; private final boolean archive; + private short replication; static Path archiveName(String fullPath) { if (isArchive(fullPath)) @@ -82,7 +83,8 @@ public class LogArchiver { dest.delete(new Path(destDir, name + ".gz_tmp"), false); FSDataInputStream in = src.open(srcPath); - GZIPOutputStream out = new GZIPOutputStream(dest.create(new Path(destDir, name + ".gz_tmp"), false)); + GZIPOutputStream out = new GZIPOutputStream(dest.create(new Path(destDir, name + ".gz_tmp"), false, dest.getConf().getInt("io.file.buffer.size", 4096), + replication == 0 ? dest.getDefaultReplication() : replication, dest.getDefaultBlockSize())); byte buf[] = new byte[1 << 20]; int numRead; @@ -112,6 +114,7 @@ public class LogArchiver { this.threadPool = Executors.newSingleThreadExecutor(); this.destDir = conf.get(Property.INSTANCE_DFS_DIR) + "/walogArchive"; this.archive = archive; + this.replication = (short) conf.getCount(Property.LOGGER_ARCHIVE_REPLICATION); dest.mkdirs(new Path(destDir)); if (archive) {