Return-Path: X-Original-To: apmail-accumulo-commits-archive@www.apache.org Delivered-To: apmail-accumulo-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 182249A9A for ; Wed, 16 May 2012 19:06:56 +0000 (UTC) Received: (qmail 39083 invoked by uid 500); 16 May 2012 19:06:56 -0000 Delivered-To: apmail-accumulo-commits-archive@accumulo.apache.org Received: (qmail 39063 invoked by uid 500); 16 May 2012 19:06:56 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 39056 invoked by uid 99); 16 May 2012 19:06:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 19:06:56 +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; Wed, 16 May 2012 19:06:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 95B482388847 for ; Wed, 16 May 2012 19:06:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1339311 - in /accumulo/trunk: ./ core/ core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java server/ src/ Date: Wed, 16 May 2012 19:06:31 -0000 To: commits@accumulo.apache.org From: vines@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120516190631.95B482388847@eris.apache.org> Author: vines Date: Wed May 16 19:06:30 2012 New Revision: 1339311 URL: http://svn.apache.org/viewvc?rev=1339311&view=rev Log: Merging ACCUMULO-489 Modified: accumulo/trunk/ (props changed) accumulo/trunk/core/ (props changed) accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java accumulo/trunk/server/ (props changed) accumulo/trunk/src/ (props changed) Propchange: accumulo/trunk/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.4/src:r1339224-1339308 Merged /accumulo/branches/1.4:r1339224-1339308 Propchange: accumulo/trunk/core/ ------------------------------------------------------------------------------ Merged /accumulo/branches/1.4/core:r1339224-1339308 Merged /accumulo/branches/1.4/src/core:r1339224-1339308 Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java?rev=1339311&r1=1339310&r2=1339311&view=diff ============================================================================== --- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java (original) +++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java Wed May 16 19:06:30 2012 @@ -108,10 +108,8 @@ public class AccumuloOutputFormat extend * the output format will create new tables as necessary. Table names can only be alpha-numeric and underscores. * @param defaultTable * the table to use when the tablename is null in the write call - * @throws IOException - * Thrown when there are issues creating the file distributed with the users info */ - public static void setOutputInfo(Configuration conf, String user, byte[] passwd, boolean createTables, String defaultTable) throws IOException { + public static void setOutputInfo(Configuration conf, String user, byte[] passwd, boolean createTables, String defaultTable) { if (conf.getBoolean(OUTPUT_INFO_HAS_BEEN_SET, false)) throw new IllegalStateException("Output info can only be set once per job"); conf.setBoolean(OUTPUT_INFO_HAS_BEEN_SET, true); @@ -122,19 +120,23 @@ public class AccumuloOutputFormat extend if (defaultTable != null) conf.set(DEFAULT_TABLE_NAME, defaultTable); - FileSystem fs = FileSystem.get(conf); - Path file = new Path(fs.getWorkingDirectory(), conf.get("mapred.job.name") + System.currentTimeMillis() + ".pw"); - conf.set(PASSWORD_PATH, file.toString()); - FSDataOutputStream fos = fs.create(file, false); - fs.setPermission(file, new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE)); - fs.deleteOnExit(file); - - byte[] encodedPw = Base64.encodeBase64(passwd); - fos.writeInt(encodedPw.length); - fos.write(encodedPw); - fos.close(); - - DistributedCache.addCacheFile(file.toUri(), conf); + try { + FileSystem fs = FileSystem.get(conf); + Path file = new Path(fs.getWorkingDirectory(), conf.get("mapred.job.name") + System.currentTimeMillis() + ".pw"); + conf.set(PASSWORD_PATH, file.toString()); + FSDataOutputStream fos = fs.create(file, false); + fs.setPermission(file, new FsPermission(FsAction.ALL, FsAction.NONE, FsAction.NONE)); + fs.deleteOnExit(file); + + byte[] encodedPw = Base64.encodeBase64(passwd); + fos.writeInt(encodedPw.length); + fos.write(encodedPw); + fos.close(); + + DistributedCache.addCacheFile(file.toUri(), conf); + } catch (IOException ioe) { + throw new RuntimeException(ioe); + } } Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java?rev=1339311&r1=1339310&r2=1339311&view=diff ============================================================================== --- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java (original) +++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/client/mapreduce/InputFormatBase.java Wed May 16 19:06:30 2012 @@ -184,9 +184,8 @@ public abstract class InputFormatBase