Return-Path: X-Original-To: apmail-hama-commits-archive@www.apache.org Delivered-To: apmail-hama-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 0A7B7DBD8 for ; Tue, 11 Dec 2012 07:55:08 +0000 (UTC) Received: (qmail 68649 invoked by uid 500); 11 Dec 2012 07:55:07 -0000 Delivered-To: apmail-hama-commits-archive@hama.apache.org Received: (qmail 68595 invoked by uid 500); 11 Dec 2012 07:55:07 -0000 Mailing-List: contact commits-help@hama.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hama.apache.org Delivered-To: mailing list commits@hama.apache.org Received: (qmail 68457 invoked by uid 99); 11 Dec 2012 07:55:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Dec 2012 07:55:04 +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, 11 Dec 2012 07:55:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9F361238897F; Tue, 11 Dec 2012 07:54:42 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1420024 - /hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java Date: Tue, 11 Dec 2012 07:54:42 -0000 To: commits@hama.apache.org From: edwardyoon@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121211075442.9F361238897F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: edwardyoon Date: Tue Dec 11 07:54:41 2012 New Revision: 1420024 URL: http://svn.apache.org/viewvc?rev=1420024&view=rev Log: replace deprecated method to alternative. Modified: hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java Modified: hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java URL: http://svn.apache.org/viewvc/hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java?rev=1420024&r1=1420023&r2=1420024&view=diff ============================================================================== --- hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java (original) +++ hama/trunk/core/src/main/java/org/apache/hama/pipes/Submitter.java Tue Dec 11 07:54:41 2012 @@ -225,14 +225,14 @@ public class Submitter implements Tool { job.setJarByClass(PipesBSP.class); String textClassname = Text.class.getName(); - setIfUnset(job.getConf(), "bsp.input.key.class", textClassname); - setIfUnset(job.getConf(), "bsp.input.value.class", textClassname); - setIfUnset(job.getConf(), "bsp.output.key.class", textClassname); - setIfUnset(job.getConf(), "bsp.output.value.class", textClassname); + setIfUnset(job.getConfiguration(), "bsp.input.key.class", textClassname); + setIfUnset(job.getConfiguration(), "bsp.input.value.class", textClassname); + setIfUnset(job.getConfiguration(), "bsp.output.key.class", textClassname); + setIfUnset(job.getConfiguration(), "bsp.output.value.class", textClassname); - setIfUnset(job.getConf(), "bsp.job.name", "Hama Pipes Job"); + setIfUnset(job.getConfiguration(), "bsp.job.name", "Hama Pipes Job"); - LOG.debug("isJavaRecordReader: " + getIsJavaRecordReader(job.getConf())); + LOG.debug("isJavaRecordReader: " + getIsJavaRecordReader(job.getConfiguration())); LOG.debug("BspClass: " + job.getBspClass().getName()); // conf.setInputFormat(NLineInputFormat.class); LOG.debug("InputFormat: " + job.getInputFormat()); @@ -246,18 +246,18 @@ public class Submitter implements Tool { throw new IllegalArgumentException( "Hama Pipes does only support Text as Key/Value output!"); - LOG.debug("bsp.master.address: " + job.getConf().get("bsp.master.address")); + LOG.debug("bsp.master.address: " + job.getConfiguration().get("bsp.master.address")); LOG.debug("bsp.local.tasks.maximum: " - + job.getConf().get("bsp.local.tasks.maximum")); + + job.getConfiguration().get("bsp.local.tasks.maximum")); LOG.debug("NumBspTask: " + job.getNumBspTask()); - LOG.debug("fs.default.name: " + job.getConf().get("fs.default.name")); + LOG.debug("fs.default.name: " + job.getConfiguration().get("fs.default.name")); - String exec = getExecutable(job.getConf()); + String exec = getExecutable(job.getConfiguration()); if (exec == null) { throw new IllegalArgumentException("No application defined."); } - URI[] fileCache = DistributedCache.getCacheFiles(job.getConf()); + URI[] fileCache = DistributedCache.getCacheFiles(job.getConfiguration()); if (fileCache == null) { fileCache = new URI[1]; } else { @@ -273,7 +273,7 @@ public class Submitter implements Tool { ie.initCause(e); throw ie; } - DistributedCache.setCacheFiles(fileCache, job.getConf()); + DistributedCache.setCacheFiles(fileCache, job.getConfiguration()); } /** @@ -412,7 +412,7 @@ public class Submitter implements Tool { } if (results.hasOption("inputformat")) { - setIsJavaRecordReader(job.getConf(), true); + setIsJavaRecordReader(job.getConfiguration(), true); job.setInputFormat(getClass(results, "inputformat", conf, InputFormat.class)); } @@ -423,7 +423,7 @@ public class Submitter implements Tool { } if (results.hasOption("outputformat")) { - setIsJavaRecordWriter(job.getConf(), true); + setIsJavaRecordWriter(job.getConfiguration(), true); job.setOutputFormat(getClass(results, "outputformat", conf, OutputFormat.class)); } @@ -452,19 +452,19 @@ public class Submitter implements Tool { if (results.hasOption("program")) { String executablePath = results.getOptionValue("program"); - setExecutable(job.getConf(), executablePath); + setExecutable(job.getConfiguration(), executablePath); DistributedCache.addCacheFile(new Path(executablePath).toUri(), conf); } if (results.hasOption("interpreter")) { - job.getConf().set("hama.pipes.executable.interpretor", + job.getConfiguration().set("hama.pipes.executable.interpretor", results.getOptionValue("interpreter")); } if (results.hasOption("programArgs")) { - job.getConf().set("hama.pipes.executable.args", + job.getConfiguration().set("hama.pipes.executable.args", Joiner.on(" ").join(results.getOptionValues("programArgs"))); - // job.getConf().set("hama.pipes.resolve.executable.args", "true"); + // job.getConfiguration().set("hama.pipes.resolve.executable.args", "true"); } if (results.hasOption("cachefiles")) { @@ -475,7 +475,7 @@ public class Submitter implements Tool { FileStatus[] globStatus = fs.globStatus(path); for (FileStatus f : globStatus) { if (!f.isDir()) { - DistributedCache.addCacheFile(f.getPath().toUri(), job.getConf()); + DistributedCache.addCacheFile(f.getPath().toUri(), job.getConfiguration()); } else { LOG.info("Ignoring directory " + f.getPath() + " while globbing."); }