Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-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 ED6AE9763 for ; Wed, 18 Jul 2012 06:36:50 +0000 (UTC) Received: (qmail 38343 invoked by uid 500); 18 Jul 2012 06:36:50 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 38119 invoked by uid 500); 18 Jul 2012 06:36:45 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 38069 invoked by uid 99); 18 Jul 2012 06:36:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 06:36:43 +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, 18 Jul 2012 06:36:40 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B41262388860 for ; Wed, 18 Jul 2012 06:36:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1362782 - in /hive/trunk: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java conf/hive-default.xml.template ql/src/java/org/apache/hadoop/hive/ql/exec/HadoopJobExecHelper.java Date: Wed, 18 Jul 2012 06:36:19 -0000 To: commits@hive.apache.org From: namit@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120718063619.B41262388860@eris.apache.org> Author: namit Date: Wed Jul 18 06:36:19 2012 New Revision: 1362782 URL: http://svn.apache.org/viewvc?rev=1362782&view=rev Log: HIVE-3230 Make logging of plan progress in HadoopJobExecHelper configurable (Kevin Wilfong via namit) Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java hive/trunk/conf/hive-default.xml.template hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/HadoopJobExecHelper.java Modified: hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java URL: http://svn.apache.org/viewvc/hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=1362782&r1=1362781&r2=1362782&view=diff ============================================================================== --- hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original) +++ hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Wed Jul 18 06:36:19 2012 @@ -387,6 +387,12 @@ public class HiveConf extends Configurat //Location of Hive run time structured log file HIVEHISTORYFILELOC("hive.querylog.location", "/tmp/" + System.getProperty("user.name")), + // Whether to log the plan's progress every time a job's progress is checked + HIVE_LOG_INCREMENTAL_PLAN_PROGRESS("hive.querylog.enable.plan.progress", true), + + // The interval between logging the plan's progress in milliseconds + HIVE_LOG_INCREMENTAL_PLAN_PROGRESS_INTERVAL("hive.querylog.plan.progress.interval", 60000L), + // Default serde and record reader for user scripts HIVESCRIPTSERDE("hive.script.serde", "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe"), HIVESCRIPTRECORDREADER("hive.script.recordreader", Modified: hive/trunk/conf/hive-default.xml.template URL: http://svn.apache.org/viewvc/hive/trunk/conf/hive-default.xml.template?rev=1362782&r1=1362781&r2=1362782&view=diff ============================================================================== --- hive/trunk/conf/hive-default.xml.template (original) +++ hive/trunk/conf/hive-default.xml.template Wed Jul 18 06:36:19 2012 @@ -708,6 +708,38 @@ + hive.querylog.location + /tmp/${user.name} + + Location of Hive run time structured log file + + + + + hive.querylog.enable.plan.progress + true + + Whether to log the plan's progress every time a job's progress is checked. + These logs are written to the location specified by hive.querylog.location + + + + + hive.querylog.plan.progress.interval + 60000 + + The interval to wait between logging the plan's progress in milliseconds. + If there is a whole number percentage change in the progress of the mappers or the reducers, + the progress is logged regardless of this value. + The actual interval will be the ceiling of (this value divided by the value of + hive.exec.counters.pull.interval) multiplied by the value of hive.exec.counters.pull.interval + I.e. if it is not divide evenly by the value of hive.exec.counters.pull.interval it will be + logged less frequently than specified. + This only has an effect if hive.querylog.enable.plan.progress is set to true. + + + + hive.enforce.bucketing false Whether bucketing is enforced. If true, while inserting into the table, bucketing is enforced. Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/HadoopJobExecHelper.java URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/HadoopJobExecHelper.java?rev=1362782&r1=1362781&r2=1362782&view=diff ============================================================================== --- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/HadoopJobExecHelper.java (original) +++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/HadoopJobExecHelper.java Wed Jul 18 06:36:19 2012 @@ -221,7 +221,8 @@ public class HadoopJobExecHelper { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS"); //DecimalFormat longFormatter = new DecimalFormat("###,###"); long reportTime = System.currentTimeMillis(); - long maxReportInterval = 60 * 1000; // One minute + long maxReportInterval = + HiveConf.getLongVar(job, HiveConf.ConfVars.HIVE_LOG_INCREMENTAL_PLAN_PROGRESS_INTERVAL); boolean fatal = false; StringBuilder errMsg = new StringBuilder(); long pullInterval = HiveConf.getLongVar(job, HiveConf.ConfVars.HIVECOUNTERSPULLINTERVAL); @@ -355,8 +356,10 @@ public class HadoopJobExecHelper { ss.getHiveHistory().setTaskCounters(SessionState.get().getQueryId(), getId(), ctrs); ss.getHiveHistory().setTaskProperty(SessionState.get().getQueryId(), getId(), Keys.TASK_HADOOP_PROGRESS, output); - ss.getHiveHistory().progressTask(SessionState.get().getQueryId(), this.task); - this.callBackObj.logPlanProgress(ss); + if (ss.getConf().getBoolVar(HiveConf.ConfVars.HIVE_LOG_INCREMENTAL_PLAN_PROGRESS)) { + ss.getHiveHistory().progressTask(SessionState.get().getQueryId(), this.task); + this.callBackObj.logPlanProgress(ss); + } } console.printInfo(output); lastReport = report;