title: From hive to elasticsearch :
body: <p>I'am working with Cloudera CDH5.3 with 1 Namenode (ip:...169) and 3 slaves.</p>
  
  <p>I have ElasticSearch 1.4.4 installed on my master machine (ip:...169).</p>
  
  <p>I have downloaded the ES-Hadoop jar and added it to the path.</p>
  
  <p>With that being said; I now want to load data from Hive to ES.</p>
  
  <p>1) First of all, I created a table via a CSV file under table metastore (with HUE)</p>
  
  <p>2) I defined an external table on top of ES in hive to write and load data in it later:  </p>
  
  <pre><code>  ADD JAR 
    /usr/elasticsearch-hadoop-2.0.2/dist/elasticsearch-hadoop-hive-2.0.2.jar;
  
   CREATE EXTERNAL TABLE es_cdr(
  
   id bigint,
  
   calling int,
  
   called int,
  
   duration int,
  
   location string,
  
   date string)
  
   ROW FORMAT SERDE 'org.elasticsearch.hadoop.hive.EsSerDe'
  
   STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
  
   TBLPROPERTIES(
  
   'es.nodes'='10.44.162.169',
  
  
   'es.resource' = 'indexOmar/typeOmar');
  </code></pre>
  
  <p>I've also added manually the serde snapshot jar via paramaters=> add file =>jar</p>
  
  <p>Now, I want to load data from my table in the new ES table : </p>
  
  <pre><code>INSERT OVERWRITE TABLE es_cdr 
  
  select NULL, h.appelant, h.called_number, 
  h.call_duration, h.location_number, h.date_heure_appel from hive_cdr h;
  </code></pre>
  
  <p>But an error is appearing saying that : </p>
  
  <pre><code>Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
  </code></pre>
  
  <p>And this is what's written in the log :</p>
  
  <pre><code>15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=compile from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=parse from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO parse.ParseDriver: Parsing command: INSERT OVERWRITE TABLE hive_es_cdr_10 
  SELECT NULL,h.appelant,h.called_number,h.call_dur,h.loc_number,h.h_appel FROM hive_cdr h limit 2
  15/03/05 14:36:34 INFO parse.ParseDriver: Parse Completed
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=parse start=1425562594378 end=1425562594381 duration=3 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=semanticAnalyze from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Starting Semantic Analysis
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Completed phase 1 of Semantic Analysis
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Get metadata for source tables
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Get metadata for subqueries
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Get metadata for destination tables
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Completed getting MetaData in Semantic Analysis
  15/03/05 14:36:34 INFO common.FileUtils: Creating directory if it doesn't exist: hdfs://master:8020/user/hive/warehouse/hive_es_cdr_10/.hive-staging_hive_2015-03-05_14-36-34_378_4527939627221909415-1
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Set stats collection dir : hdfs://master:8020/user/hive/warehouse/hive_es_cdr_10/.hive-staging_hive_2015-03-05_14-36-34_378_4527939627221909415-1/-ext-10000
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for FS(109)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for SEL(108)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for LIM(107)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for EX(106)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for RS(105)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for LIM(104)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for SEL(103)
  15/03/05 14:36:34 INFO ppd.OpProcFactory: Processing for TS(102)
  15/03/05 14:36:34 INFO optimizer.ColumnPrunerProcFactory: RS 105 oldColExprMap: {_col5=Column[_col5], _col4=Column[_col4], _col3=Column[_col3], _col2=Column[_col2], _col1=Column[_col1], _col0=Column[_col0]}
  15/03/05 14:36:34 INFO optimizer.ColumnPrunerProcFactory: RS 105 newColExprMap: {_col5=Column[_col5], _col4=Column[_col4], _col3=Column[_col3], _col2=Column[_col2], _col1=Column[_col1], _col0=Column[_col0]}
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=partition-retrieving from=org.apache.hadoop.hive.ql.optimizer.ppr.PartitionPruner&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=partition-retrieving start=1425562594461 end=1425562594461 duration=0 from=org.apache.hadoop.hive.ql.optimizer.ppr.PartitionPruner&gt;
  15/03/05 14:36:34 INFO physical.MetadataOnlyOptimizer: Looking for table scans where optimization is applicable
  15/03/05 14:36:34 INFO physical.MetadataOnlyOptimizer: Found 0 metadata only table scans
  15/03/05 14:36:34 INFO parse.SemanticAnalyzer: Completed plan generation
  15/03/05 14:36:34 INFO ql.Driver: Semantic Analysis Completed
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=semanticAnalyze start=1425562594381 end=1425562594463 duration=82 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO ql.Driver: Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:_col0, type:bigint, comment:null), FieldSchema(name:_col1, type:int, comment:null), FieldSchema(name:_col2, type:int, comment:null), FieldSchema(name:_col3, type:int, comment:null), FieldSchema(name:_col4, type:string, comment:null), FieldSchema(name:_col5, type:string, comment:null)], properties:null)
  15/03/05 14:36:34 INFO ql.Driver: EXPLAIN output for queryid hive_20150305143636_528f97d4-b670-40e2-ba80-7d7a7bd441ff : ABSTRACT SYNTAX TREE:
  
  TOK_QUERY
     TOK_FROM
        TOK_TABREF
           TOK_TABNAME
              hive_cdr
           h
     TOK_INSERT
        TOK_DESTINATION
           TOK_TAB
              TOK_TABNAME
                 hive_es_cdr_10
        TOK_SELECT
           TOK_SELEXPR
              TOK_NULL
           TOK_SELEXPR
              .
                 TOK_TABLE_OR_COL
                    h
                 appelant
           TOK_SELEXPR
              .
                 TOK_TABLE_OR_COL
                    h
                 called_number
           TOK_SELEXPR
              .
                 TOK_TABLE_OR_COL
                    h
                 call_dur
           TOK_SELEXPR
              .
                 TOK_TABLE_OR_COL
                    h
                 loc_number
           TOK_SELEXPR
              .
                 TOK_TABLE_OR_COL
                    h
                 h_appel
        TOK_LIMIT
           2
  
  
  STAGE DEPENDENCIES:
    Stage-0 is a root stage [MAPRED]
  
  STAGE PLANS:
    Stage: Stage-0
      Map Reduce
        Map Operator Tree:
            TableScan
              alias: h
              GatherStats: false
              Select Operator
                expressions: null (type: string), appelant (type: int), called_number (type: int), call_dur (type: int), loc_number (type: string), h_appel (type: string)
                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                Limit
                  Number of rows: 2
                  Reduce Output Operator
                    sort order: 
                    tag: -1
                    value expressions: _col0 (type: void), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: string), _col5 (type: string)
        Path -&gt; Alias:
          hdfs://master:8020/user/hive/warehouse/hive_cdr [h]
        Path -&gt; Partition:
          hdfs://master:8020/user/hive/warehouse/hive_cdr 
            Partition
              base file name: hive_cdr
              input format: org.apache.hadoop.mapred.TextInputFormat
              output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
              properties:
                COLUMN_STATS_ACCURATE true
                bucket_count -1
                columns traffic_type_id,appelant,called_number,call_dur,loc_number,h_appel
                columns.comments 
                columns.types int:int:int:int:string:string
                field.delim ;
                file.inputformat org.apache.hadoop.mapred.TextInputFormat
                file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                location hdfs://master:8020/user/hive/warehouse/hive_cdr
                name default.hive_cdr
                numFiles 1
                numRows 0
                rawDataSize 0
                serialization.ddl struct hive_cdr { i32 traffic_type_id, i32 appelant, i32 called_number, i32 call_dur, string loc_number, string h_appel}
                serialization.format ;
                serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                totalSize 56373362
                transient_lastDdlTime 1425459002
              serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
  
                input format: org.apache.hadoop.mapred.TextInputFormat
                output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                properties:
                  COLUMN_STATS_ACCURATE true
                  bucket_count -1
                  columns traffic_type_id,appelant,called_number,call_dur,loc_number,h_appel
                  columns.comments 
                  columns.types int:int:int:int:string:string
                  field.delim ;
                  file.inputformat org.apache.hadoop.mapred.TextInputFormat
                  file.outputformat org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
                  location hdfs://master:8020/user/hive/warehouse/hive_cdr
                  name default.hive_cdr
                  numFiles 1
                  numRows 0
                  rawDataSize 0
                  serialization.ddl struct hive_cdr { i32 traffic_type_id, i32 appelant, i32 called_number, i32 call_dur, string loc_number, string h_appel}
                  serialization.format ;
                  serialization.lib org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                  totalSize 56373362
                  transient_lastDdlTime 1425459002
                serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
                name: default.hive_cdr
              name: default.hive_cdr
        Truncated Path -&gt; Alias:
          /hive_cdr [h]
        Needs Tagging: false
        Reduce Operator Tree:
          Extract
            Limit
              Number of rows: 2
              Select Operator
                expressions: UDFToLong(_col0) (type: bigint), _col1 (type: int), _col2 (type: int), _col3 (type: int), _col4 (type: string), _col5 (type: string)
                outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5
                File Output Operator
                  compressed: false
                  GlobalTableId: 1
                  directory: hdfs://master:8020/user/hive/warehouse/hive_es_cdr_10
                  NumFilesPerFileSink: 1
                  Stats Publishing Key Prefix: hdfs://master:8020/user/hive/warehouse/hive_es_cdr_10/
                  table:
                      input format: org.elasticsearch.hadoop.hive.EsHiveInputFormat
                      jobProperties:
                        EXTERNAL TRUE
                        bucket_count -1
                        columns id_traffic,caller,called,call_dur,caller_location,call_date
                        columns.comments 
                        columns.types bigint:int:int:int:string:string
                        es.nodes 10.44.162.169
                        es.port 9200
                        es.resource myindex/mytype
                        file.inputformat org.apache.hadoop.mapred.SequenceFileInputFormat
                        file.outputformat org.apache.hadoop.mapred.SequenceFileOutputFormat
                        location hdfs://master:8020/user/hive/warehouse/hive_es_cdr_10
                        name default.hive_es_cdr_10
                        serialization.ddl struct hive_es_cdr_10 { i64 id_traffic, i32 caller, i32 called, i32 call_dur, string caller_location, string call_date}
                        serialization.format 1
                        serialization.lib org.elasticsearch.hadoop.hive.EsSerDe
                        storage_handler org.elasticsearch.hadoop.hive.EsStorageHandler
                        transient_lastDdlTime 1425561441
                      output format: org.elasticsearch.hadoop.hive.EsHiveOutputFormat
                      properties:
                        EXTERNAL TRUE
                        bucket_count -1
                        columns id_traffic,caller,called,call_dur,caller_location,call_date
                        columns.comments 
                        columns.types bigint:int:int:int:string:string
                        es.nodes 10.44.162.169
                        es.port 9200
                        es.resource myindex/mytype
                        file.inputformat org.apache.hadoop.mapred.SequenceFileInputFormat
                        file.outputformat org.apache.hadoop.mapred.SequenceFileOutputFormat
                        location hdfs://master:8020/user/hive/warehouse/hive_es_cdr_10
                        name default.hive_es_cdr_10
                        serialization.ddl struct hive_es_cdr_10 { i64 id_traffic, i32 caller, i32 called, i32 call_dur, string caller_location, string call_date}
                        serialization.format 1
                        serialization.lib org.elasticsearch.hadoop.hive.EsSerDe
                        storage_handler org.elasticsearch.hadoop.hive.EsStorageHandler
                        transient_lastDdlTime 1425561441
                      serde: org.elasticsearch.hadoop.hive.EsSerDe
                      name: default.hive_es_cdr_10
                  TotalFiles: 1
                  GatherStats: false
                  MultiFileSpray: false
  
  
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=compile start=1425562594378 end=1425562594484 duration=106 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=Driver.run from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=TimeToSubmit from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=acquireReadWriteLocks from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO lockmgr.DummyTxnManager: Creating lock manager of type org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager
  15/03/05 14:36:34 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=master:2181 sessionTimeout=600000 watcher=org.apache.hadoop.hive.ql.lockmgr.zookeeper.ZooKeeperHiveLockManager$DummyWatcher@70e69669
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=acquireReadWriteLocks start=1425562594502 end=1425562594523 duration=21 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=Driver.execute from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO ql.Driver: Starting command: INSERT OVERWRITE TABLE hive_es_cdr_10 
  SELECT NULL,h.appelant,h.called_number,h.call_dur,h.loc_number,h.h_appel FROM hive_cdr h limit 2
  15/03/05 14:36:34 INFO ql.Driver: Total jobs = 1
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=TimeToSubmit start=1425562594500 end=1425562594526 duration=26 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=runTasks from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=task.MAPRED.Stage-0 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:34 INFO ql.Driver: Launching Job 1 out of 1
  15/03/05 14:36:34 INFO exec.Task: Number of reduce tasks determined at compile time: 1
  15/03/05 14:36:34 INFO exec.Task: In order to change the average load for a reducer (in bytes):
  15/03/05 14:36:34 INFO exec.Task:   set hive.exec.reducers.bytes.per.reducer=&lt;number&gt;
  15/03/05 14:36:34 INFO exec.Task: In order to limit the maximum number of reducers:
  15/03/05 14:36:34 INFO exec.Task:   set hive.exec.reducers.max=&lt;number&gt;
  15/03/05 14:36:34 INFO exec.Task: In order to set a constant number of reducers:
  15/03/05 14:36:34 INFO exec.Task:   set mapreduce.job.reduces=&lt;number&gt;
  15/03/05 14:36:34 INFO ql.Context: New scratch dir is hdfs://master:8020/tmp/hive-hive/hive_2015-03-05_14-36-34_378_4527939627221909415-7
  15/03/05 14:36:34 INFO mr.ExecDriver: Using org.apache.hadoop.hive.ql.io.CombineHiveInputFormat
  15/03/05 14:36:34 INFO mr.ExecDriver: adding libjars: file:///tmp/d39b23a8-98d2-4bc3-9008-3eff080dd20c_resources/hive-serdes-1.0-SNAPSHOT.jar,file:///usr/elasticsearch-hadoop-2.0.2/dist/elasticsearch-hadoop-hive-2.0.2.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hive/lib/hive-hbase-handler-0.13.1-cdh5.3.1.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/hbase-server.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/lib/htrace-core.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/lib/htrace-core-2.04.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/hbase-common.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/hbase-client.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/hbase-protocol.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/hbase-hadoop2-compat.jar,file:///opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hbase/hbase-hadoop-compat.jar
  15/03/05 14:36:34 INFO exec.Utilities: Processing alias h
  15/03/05 14:36:34 INFO exec.Utilities: Adding input file hdfs://master:8020/user/hive/warehouse/hive_cdr
  15/03/05 14:36:34 INFO exec.Utilities: Content Summary not cached for hdfs://master:8020/user/hive/warehouse/hive_cdr
  15/03/05 14:36:34 INFO ql.Context: New scratch dir is hdfs://master:8020/tmp/hive-hive/hive_2015-03-05_14-36-34_378_4527939627221909415-7
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=serializePlan from=org.apache.hadoop.hive.ql.exec.Utilities&gt;
  15/03/05 14:36:34 INFO exec.Utilities: Serializing MapWork via kryo
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=serializePlan start=1425562594554 end=1425562594638 duration=84 from=org.apache.hadoop.hive.ql.exec.Utilities&gt;
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;PERFLOG method=serializePlan from=org.apache.hadoop.hive.ql.exec.Utilities&gt;
  15/03/05 14:36:34 INFO exec.Utilities: Serializing ReduceWork via kryo
  15/03/05 14:36:34 INFO log.PerfLogger: &lt;/PERFLOG method=serializePlan start=1425562594653 end=1425562594708 duration=55 from=org.apache.hadoop.hive.ql.exec.Utilities&gt;
  15/03/05 14:36:34 INFO client.RMProxy: Connecting to ResourceManager at master/10.44.162.169:8032
  15/03/05 14:36:34 INFO client.RMProxy: Connecting to ResourceManager at master/10.44.162.169:8032
  15/03/05 14:36:34 WARN mr.EsOutputFormat: Speculative execution enabled for reducer - consider disabling it to prevent data corruption
  15/03/05 14:36:34 INFO mr.EsOutputFormat: Writing to [myindex/mytype]
  15/03/05 14:36:34 WARN mapreduce.JobSubmitter: Hadoop command-line option parsing not performed. Implement the Tool interface and execute your application with ToolRunner to remedy this.
  15/03/05 14:36:35 INFO log.PerfLogger: &lt;PERFLOG method=getSplits from=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat&gt;
  15/03/05 14:36:35 INFO io.CombineHiveInputFormat: CombineHiveInputSplit creating pool for hdfs://master:8020/user/hive/warehouse/hive_cdr; using filter path hdfs://master:8020/user/hive/warehouse/hive_cdr
  15/03/05 14:36:35 INFO input.FileInputFormat: Total input paths to process : 1
  15/03/05 14:36:35 INFO input.CombineFileInputFormat: DEBUG: Terminated node allocation with : CompletedNodes: 3, size left: 0
  15/03/05 14:36:35 INFO io.CombineHiveInputFormat: number of splits 1
  15/03/05 14:36:35 INFO log.PerfLogger: &lt;/PERFLOG method=getSplits start=1425562595867 end=1425562595896 duration=29 from=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat&gt;
  15/03/05 14:36:35 INFO mapreduce.JobSubmitter: number of splits:1
  15/03/05 14:36:36 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1425457357655_0006
  15/03/05 14:36:36 INFO impl.YarnClientImpl: Submitted application application_1425457357655_0006
  15/03/05 14:36:36 INFO mapreduce.Job: The url to track the job: http://master:8088/proxy/application_1425457357655_0006/
  15/03/05 14:36:36 INFO exec.Task: Starting Job = job_1425457357655_0006, Tracking URL = http://master:8088/proxy/application_1425457357655_0006/
  15/03/05 14:36:36 INFO exec.Task: Kill Command = /opt/cloudera/parcels/CDH-5.3.1-1.cdh5.3.1.p0.5/lib/hadoop/bin/hadoop job  -kill job_1425457357655_0006
  15/03/05 14:36:58 INFO exec.Task: Hadoop job information for Stage-0: number of mappers: 0; number of reducers: 0
  15/03/05 14:36:58 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
  15/03/05 14:36:58 INFO exec.Task: 2015-03-05 14:36:58,687 Stage-0 map = 0%,  reduce = 0%
  15/03/05 14:36:58 WARN mapreduce.Counters: Group org.apache.hadoop.mapred.Task$Counter is deprecated. Use org.apache.hadoop.mapreduce.TaskCounter instead
  15/03/05 14:36:58 ERROR exec.Task: Ended Job = job_1425457357655_0006 with errors
  15/03/05 14:36:58 INFO impl.YarnClientImpl: Killed application application_1425457357655_0006
  15/03/05 14:36:58 ERROR ql.Driver: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
  15/03/05 14:36:58 INFO log.PerfLogger: &lt;/PERFLOG method=Driver.execute start=1425562594523 end=1425562618754 duration=24231 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:58 INFO ql.Driver: MapReduce Jobs Launched: 
  15/03/05 14:36:58 WARN mapreduce.Counters: Group FileSystemCounters is deprecated. Use org.apache.hadoop.mapreduce.FileSystemCounter instead
  15/03/05 14:36:58 INFO ql.Driver: Stage-Stage-0:  HDFS Read: 0 HDFS Write: 0 FAIL
  15/03/05 14:36:58 INFO ql.Driver: Total MapReduce CPU Time Spent: 0 msec
  15/03/05 14:36:58 INFO log.PerfLogger: &lt;PERFLOG method=releaseLocks from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:58 INFO ZooKeeperHiveLockManager:  about to release lock for default/hive_es_cdr_10
  15/03/05 14:36:58 INFO ZooKeeperHiveLockManager:  about to release lock for default/hive_cdr
  15/03/05 14:36:58 INFO ZooKeeperHiveLockManager:  about to release lock for default
  15/03/05 14:36:58 INFO log.PerfLogger: &lt;/PERFLOG method=releaseLocks start=1425562618768 end=1425562618780 duration=12 from=org.apache.hadoop.hive.ql.Driver&gt;
  15/03/05 14:36:58 ERROR operation.Operation: Error running hive query: 
  org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
      at org.apache.hive.service.cli.operation.SQLOperation.runInternal(SQLOperation.java:147)
      at org.apache.hive.service.cli.operation.SQLOperation.access$000(SQLOperation.java:69)
      at org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
      at org.apache.hadoop.hive.shims.HadoopShimsSecure.doAs(HadoopShimsSecure.java:502)
      at org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:213)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run
  </code></pre>