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 436A0BA0A for ; Thu, 12 Jan 2012 19:05:01 +0000 (UTC) Received: (qmail 73374 invoked by uid 500); 12 Jan 2012 19:05:01 -0000 Delivered-To: apmail-incubator-accumulo-commits-archive@incubator.apache.org Received: (qmail 73340 invoked by uid 500); 12 Jan 2012 19:05:00 -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 73333 invoked by uid 99); 12 Jan 2012 19:05:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jan 2012 19:05: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; Thu, 12 Jan 2012 19:04:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 43BDA238890D; Thu, 12 Jan 2012 19:04:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1230707 - in /incubator/accumulo/trunk: ./ src/core/ src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java src/server/ Date: Thu, 12 Jan 2012 19:04:39 -0000 To: accumulo-commits@incubator.apache.org From: vines@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120112190439.43BDA238890D@eris.apache.org> Author: vines Date: Thu Jan 12 19:04:38 2012 New Revision: 1230707 URL: http://svn.apache.org/viewvc?rev=1230707&view=rev Log: Accumulo-310 - merging Modified: incubator/accumulo/trunk/ (props changed) incubator/accumulo/trunk/src/core/ (props changed) incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java incubator/accumulo/trunk/src/server/ (props changed) Propchange: incubator/accumulo/trunk/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 12 19:04:38 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 /incubator/accumulo/branches/1.3.5rc:1209938 -/incubator/accumulo/branches/1.4:1201902-1230701 +/incubator/accumulo/branches/1.4:1201902-1230701,1230706 Propchange: incubator/accumulo/trunk/src/core/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 12 19:04:38 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-1230701 +/incubator/accumulo/branches/1.4/src/core:1201902-1230701,1230706 Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java?rev=1230707&r1=1230706&r2=1230707&view=diff ============================================================================== --- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java (original) +++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java Thu Jan 12 19:04:38 2012 @@ -87,28 +87,48 @@ public class AccumuloFileOutputFormat ex }; } + /** + * @deprecated Use {@link #handleBlockSize(Configuration)} instead + */ protected static void handleBlockSize(JobContext job) { - Configuration conf = job.getConfiguration(); + handleBlockSize(job.getConfiguration()); + } + + protected static void handleBlockSize(Configuration conf) { int blockSize; if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) { - blockSize = (int) getInstance(job).getConfiguration().getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE); + blockSize = (int) getInstance(conf).getConfiguration().getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE); } else { - blockSize = getBlockSize(job); + blockSize = getBlockSize(conf); } conf.setInt("io.seqfile.compress.blocksize", blockSize); } + /** + * @deprecated Use {@link #setFileType(Configuration,String)} instead + */ public static void setFileType(JobContext job, String type) { - job.getConfiguration().set(FILE_TYPE, type); + setFileType(job.getConfiguration(), type); + } + + public static void setFileType(Configuration conf, String type) { + conf.set(FILE_TYPE, type); } + /** + * @deprecated Use {@link #setBlockSize(Configuration,int)} instead + */ public static void setBlockSize(JobContext job, int blockSize) { - job.getConfiguration().setInt(BLOCK_SIZE, blockSize); + setBlockSize(job.getConfiguration(), blockSize); + } + + public static void setBlockSize(Configuration conf, int blockSize) { + conf.setInt(BLOCK_SIZE, blockSize); } - private static int getBlockSize(JobContext job) { - return job.getConfiguration().getInt(BLOCK_SIZE, + private static int getBlockSize(Configuration conf) { + return conf.getInt(BLOCK_SIZE, (int) AccumuloConfiguration.getDefaultConfiguration().getMemoryInBytes(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE)); } @@ -117,10 +137,20 @@ public class AccumuloFileOutputFormat ex * @param job * @param instanceName * @param zooKeepers - * @deprecated since 1.4, use {@link #setBlockSize(JobContext, int)} to set block size no other configurations are used by OutputFormat + * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} to set block size no other configurations are used by OutputFormat */ public static void setZooKeeperInstance(JobContext job, String instanceName, String zooKeepers) { - Configuration conf = job.getConfiguration(); + setZooKeeperInstance(job.getConfiguration(), instanceName, zooKeepers); + } + + /** + * + * @param conf + * @param instanceName + * @param zooKeepers + * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} to set block size no other configurations are used by OutputFormat + */ + public static void setZooKeeperInstance(Configuration conf, String instanceName, String zooKeepers) { if (conf.getBoolean(INSTANCE_HAS_BEEN_SET, false)) throw new IllegalStateException("Instance info can only be set once per job"); conf.setBoolean(INSTANCE_HAS_BEEN_SET, true); @@ -135,10 +165,20 @@ public class AccumuloFileOutputFormat ex * @param job * @return * - * @deprecated since 1.4, use {@link #setBlockSize(JobContext, int)} no other configurations are used by OutputFormat + * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} no other configurations are used by OutputFormat */ protected static Instance getInstance(JobContext job) { - Configuration conf = job.getConfiguration(); + return getInstance(job.getConfiguration()); + } + + /** + * + * @param conf + * @return + * + * @deprecated since 1.4, use {@link #setBlockSize(Configuration, int)} no other configurations are used by OutputFormat + */ + protected static Instance getInstance(Configuration conf) { return new ZooKeeperInstance(conf.get(INSTANCE_NAME), conf.get(ZOOKEEPERS)); } } Propchange: incubator/accumulo/trunk/src/server/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Jan 12 19:04:38 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-1230701 +/incubator/accumulo/branches/1.4/src/server:1201902-1230701,1230706