Getting java.lang.ClassCastException: When doing re-indexing for last value of a metric

Hi,

We need to get the last value for a metric at the re-indexing time. So we start re-indexing on a metric for last value on the latest druid release druid-0.10.rc1 version :

Error :

2017-03-06T06:47:12,983 ERROR [task-runner-0-priority-0] io.druid.indexing.overlord.ThreadPoolTaskRunner - Exception while running task[IndexTask{id=index_RAMBO_DAILY_TEST_FINAL2_2017-03-06T06:38:41.555Z, type=index, dataSource=RAMBO_DAILY_TEST_FINAL2}]

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.ClassCastException: io.druid.collections.SerializablePair cannot be cast to java.lang.Number

at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-16.0.1.jar:?]

at io.druid.segment.realtime.appenderator.FiniteAppenderatorDriver.persist(FiniteAppenderatorDriver.java:240) ~[druid-server-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.indexing.common.task.IndexTask.generateAndPublishSegments(IndexTask.java:453) ~[druid-indexing-service-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.indexing.common.task.IndexTask.run(IndexTask.java:207) ~[druid-indexing-service-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.indexing.overlord.ThreadPoolTaskRunner$ThreadPoolTaskRunnerCallable.call(ThreadPoolTaskRunner.java:436) [druid-indexing-service-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.indexing.overlord.ThreadPoolTaskRunner$ThreadPoolTaskRunnerCallable.call(ThreadPoolTaskRunner.java:408) [druid-indexing-service-0.10.0-rc1.jar:0.10.0-rc1]

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]

at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]

Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: io.druid.collections.SerializablePair cannot be cast to java.lang.Number

at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_91]

at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_91]

at io.druid.segment.realtime.appenderator.FiniteAppenderatorDriver.persist(FiniteAppenderatorDriver.java:232) ~[druid-server-0.10.0-rc1.jar:0.10.0-rc1]

… 8 more

Caused by: java.lang.ClassCastException: io.druid.collections.SerializablePair cannot be cast to java.lang.Number

at io.druid.segment.FloatColumnSerializer.serialize(FloatColumnSerializer.java:77) ~[druid-processing-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.IndexMergerV9.mergeIndexesAndWriteColumns(IndexMergerV9.java:460) ~[druid-processing-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.IndexMergerV9.makeIndexFiles(IndexMergerV9.java:207) ~[druid-processing-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.IndexMerger.merge(IndexMerger.java:437) ~[druid-processing-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.IndexMerger.persist(IndexMerger.java:185) ~[druid-processing-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.IndexMerger.persist(IndexMerger.java:151) ~[druid-processing-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.realtime.appenderator.AppenderatorImpl.persistHydrant(AppenderatorImpl.java:1001) ~[druid-server-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.realtime.appenderator.AppenderatorImpl.access$200(AppenderatorImpl.java:95) ~[druid-server-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.segment.realtime.appenderator.AppenderatorImpl$2.doCall(AppenderatorImpl.java:389) ~[druid-server-0.10.0-rc1.jar:0.10.0-rc1]

at io.druid.common.guava.ThreadRenamingCallable.call(ThreadRenamingCallable.java:44) ~[druid-common-0.10.0-rc1.jar:0.10.0-rc1]

… 4 more

2017-03-06T06:47:12,988 INFO [task-runner-0-priority-0] io.druid.indexing.overlord.TaskRunnerUtils - Task [index_RAMBO_DAILY_TEST_FINAL2_2017-03-06T06:38:41.555Z] status changed to [FAILED].

2017-03-06T06:47:12,991 INFO [task-runner-0-priority-0] io.druid.indexing.worker.executor.ExecutorLifecycle - Task completed with status: {

“id” : “index_RAMBO_DAILY_TEST_FINAL2_2017-03-06T06:38:41.555Z”,

“status” : “FAILED”,

“duration” : 502607

}

Specification :

{

“type”: “index”,

“spec”: {

“dataSchema”: {

“dataSource”: “RAMBO_DAILY_TEST_FINAL2”,

“parser”: {

“type”: “string”,

“parseSpec”: {

“format”: “json”,

“timestampSpec”: {

“column”: “CREATED_TIMESTAMP”,

“format”: “ddMMyyyyHHmmss”

},

“dimensionsSpec”: {

“dimensions”: ,

“dimensionExclusions”: ,

“spatialDimensions”:

}

}

},

“metricsSpec”: [

{

“name” : “PMP_DSL_OPR_MODE_LAST”,

“type” : “doubleLast”,

“fieldName” : “PMP_DSL_OPR_MODE”

}

],

“granularitySpec”: {

“type”: “uniform”,

“segmentGranularity”: “year”,

“queryGranularity”: “all”,

“intervals” : [“2017-03-01/2017-04-01”]

}

},

“ioConfig”: {

“type”: “index”,

“firehose”: {

“type” :
“ingestSegment”,

“dataSource” : “DSLAMMarch”,

“interval” : “2017-03-01/2017-03-02”,

“filter”: null,

“dimensions”: null,

“metrics”: null

},

“taskCount”: 4,

“replicas”: 1

}

}

}

Please let me suggest on this how can I come over this issue as it is major impact for our project.

Thanks in advance.

Hey Santosh,

Is this your issue too? https://github.com/druid-io/druid/issues/4011

If so let’s discuss it there.

Yes Gian.