How to stop a particular job while running Hive queries on Hadoop?
NickName:Bhavesh Shah Ask DateTime:2011-12-02T12:59:06

How to stop a particular job while running Hive queries on Hadoop?

Scenario:

When I run enter the query on Hive CLI, I get the errors as below:

Query:

**$ bin/hive -e "insert overwrite table pokes select a.* from invites a where a.ds='2008-08-15';"** 

Error is like this:

Total MapReduce jobs = 1 Launching Job 1 out of 1 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201111291547_0013, Tracking URL = http://localhost:50030/jobdetails.jsp?jobid=job_201111291547_0013 Kill Command = C:\cygwin\home\Bhavesh.Shah\hadoop-0.20.2/bin/hadoop job -Dmapred.job.tracker=localhost:9101 -kill job_201111291547_0013 2011-12-01 14:00:52,380 Stage-1 map = 0%, reduce = 0% 2011-12-01 14:01:19,518 Stage-1 map = 100%, reduce = 100% Ended Job = job_201111291547_0013 with errors FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask

Question:

So my question is that how to stop a job? In this case the job is : job_201111291547_0013 Pls help me out so that I can remove these errors and try for next. Thanks.

Copyright Notice:Content Author:「Bhavesh Shah」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/8351976/how-to-stop-a-particular-job-while-running-hive-queries-on-hadoop

Answers
alexlod 2011-12-04T18:11:23

You can stop a job by running hadoop job -kill <job_id>.",


Outlier 2015-09-29T09:24:44

hadoop job -kill is deprecated now. \nUse mapred job -kill instead.",


Sumukh 2017-09-12T10:39:18

The log traces of the job launched provide the command to kill the job as well.You can use that to kill the job. \nThat however gives a warning that hadoop job -kill is deprecated. You can also use instead\n\nmapred job -kill\n",


More about “How to stop a particular job while running Hive queries on Hadoop?” related questions

How to stop a particular job while running Hive queries on Hadoop?

Scenario: When I run enter the query on Hive CLI, I get the errors as below: Query: **$ bin/hive -e "insert overwrite table pokes select a.* from invites a where a.ds='2008-08-15';"** Error is...

Show Detail

errors while running hive queries

I am trying to run hive queries but I am getting errors as: hive&gt; FROM ( &gt; FROM t1 &gt; MAP t1.patient_mrn, t1.encounter_date &...

Show Detail

Hadoop - How to run another mapreduce job while one is running?

I already have a high time consuming map reduce job running on my cluster. When I am submitting another job, it is stuck at the below point which suggests that it is waiting for currently running j...

Show Detail

Run hive queries, and collect job information

I would like to run a list of generated HIVE queries. For each, I would like to retrieve the MR job_id (or ids, in case of multiple stages). And then, with this job_id, collect statistics from job

Show Detail

HIve query stops in between when running MapReduce job

I am running a single node cluster on Ubuntu 16.04. Hadoop version is 2.7.2 and Hive 1.2.1. When I run hive queries which involve map-reduce job like partitioning or bucketing etc. It shows progre...

Show Detail

always Hive Job running in-process local Hadoop

When I set this property in hive-site.xml &lt;property&gt; &lt;name&gt;hive.exec.mode.local.auto&lt;/name&gt; &lt;value&gt;false&lt;/value&gt; &lt;/property&gt; Hive always

Show Detail

Hive Job not running

Whenever I am running a hive query - select * from table. It is running fine. But when i m trying to run a MR job for query - select count(*) from table. It is failing with the following error - ...

Show Detail

Hive takes long time to launch hadoop job

I am a newbie to Hadoop and Hive. I am using Hive integration with Hadoop to execute the queries. When I submit any query, following log messages appear on console: Hive history file=/tmp/root/

Show Detail

error while running hive mapreduce job

when I trying to run hive commands which involve mapreduce, I am getting the following error, please help me solve this: hive (hiveclass)&gt; create table companies2 as select * from companies; WA...

Show Detail

Hive: java.lang.OutOfMemoryError: Java heap space and Job running in-process (local Hadoop)

My setup: 4 node cluster in Google Cloud Platform (1 master, 3 workers) running NixOS Linux. I have been using the TPC-DS toolkit to generate both data and queries are standard. On smaller dataset /

Show Detail