# Cannot handle type TimestampWritableV2 Exception when creating index with ES Hadoop connector

**URL:** https://discuss.elastic.co/t/cannot-handle-type-timestampwritablev2-exception-when-creating-index-with-es-hadoop-connector/158220
**Category:** Elasticsearch
**Tags:** es-hadoop
**Created:** [November 26, 2018, 4:43pm UTC](https://discuss.elastic.co/t/cannot-handle-type-timestampwritablev2-exception-when-creating-index-with-es-hadoop-connector/158220 "2018-11-26T16:43:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Muj33b](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Muj33b](https://discuss.elastic.co/u/Muj33b)
#### Post date: [November 26, 2018, 4:43pm UTC](https://discuss.elastic.co/t/cannot-handle-type-timestampwritablev2-exception-when-creating-index-with-es-hadoop-connector/158220/1 "2018-11-26T16:43:12Z")

</div>

I am using 6.2.2 and getting the following exception when trying to create an index from Hive table with ES Hadoop connector

I am using elasticsearch-hadoop-6.2.4.jar  
I can't What is the work around?

```
ERROR : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask. Vertex failed, vertexName=Map 1, vertexId=vertex_1543081145832_0094_2_00, diagnostics=[Task failed, taskId=task_1543081145832_0094_2_00_000004, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_1543081145832_0094_2_00_000004_0:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
        at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:296)
        at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:250)
        at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
        at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73)
        at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1730)
        at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61)
        at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37)
        at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36)
        at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:108)
        at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:41)
        at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:77)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
        at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:101)
        at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.pushRecord(MapRecordSource.java:76)
        at org.apache.hadoop.hive.ql.exec.tez.MapRecordProcessor.run(MapRecordProcessor.java:419)
        at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:267)
        ... 16 more
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row
        at org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.process(VectorMapOperator.java:973)
        at org.apache.hadoop.hive.ql.exec.tez.MapRecordSource.processRow(MapRecordSource.java:92)
        ... 19 more
Caused by: org.elasticsearch.hadoop.serialization.EsHadoopSerializationException: Cannot handle type [class org.apache.hadoop.hive.serde2.io.TimestampWritableV2] within type [class org.elasticsearch.hadoop.hive.HiveType], instance [2017-01-09 00:00:00] within instance [org.elasticsearch.hadoop.hive.HiveType@1d054054] using writer [org.elasticsearch.hadoop.hive.HiveValueWriter@1de171d0]
        at org.elasticsearch.hadoop.serialization.builder.ContentBuilder.value(ContentBuilder.java:63)
        at org.elasticsearch.hadoop.serialization.bulk.TemplatedBulk.doWriteObject(TemplatedBulk.java:71)
        at org.elasticsearch.hadoop.serialization.bulk.TemplatedBulk.write(TemplatedBulk.java:58)
        at org.elasticsearch.hadoop.hive.EsSerDe.serialize(EsSerDe.java:163)
        at org.apache.hadoop.hive.ql.exec.FileSinkOperator.process(FileSinkOperator.java:957)
        at org.apache.hadoop.hive.ql.exec.vector.VectorFileSinkOperator.process(VectorFileSinkOperator.java:106)
        at org.apache.hadoop.hive.ql.exec.Operator.vectorForward(Operator.java:965)
        at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:938)
        at org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:158)
        at org.apache.hadoop.hive.ql.exec.Operator.vectorForward(Operator.java:965)
        at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:938)
        at org.apache.hadoop.hive.ql.exec.vector.VectorFilterOperator.process(VectorFilterOperator.java:136)
        at org.apache.hadoop.hive.ql.exec.Operator.vectorForward(Operator.java:965)
        at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:938)
        at org.apache.hadoop.hive.ql.exec.TableScanOperator.process(TableScanOperator.java:125)
        at org.apache.hadoop.hive.ql.exec.vector.VectorMapOperator.process(VectorMapOperator.java:889)
        ... 20 more
```

---

<div class="post-metadata">

### Author: ![james.baiera](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/james.baiera/32/10209_2.png) [@james.baiera](https://discuss.elastic.co/u/james.baiera)
#### Post date: [December 12, 2018, 7:42pm UTC](https://discuss.elastic.co/t/cannot-handle-type-timestampwritablev2-exception-when-creating-index-with-es-hadoop-connector/158220/2 "2018-12-12T19:42:21Z")

</div>

This must be using a more recent version of Hive than what ES-Hadoop currently supports. ES-Hadoop supports up to Hive 1.2.2 at the moment. We have plans to get this on a more recent version of Hive now that more recent versions are being packaged with major distributions.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 9, 2019, 7:42pm UTC](https://discuss.elastic.co/t/cannot-handle-type-timestampwritablev2-exception-when-creating-index-with-es-hadoop-connector/158220/3 "2019-01-09T19:42:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
