Hi Jagadeesh
"time" is a keyword in Drill SQL. I'm not sure that this is connected to
the problem you're hitting but please try your query with `time` (and
any other names that coincide with keywords) enclosed in backticks.
Regards
James
On 2022/10/05 15:01, jagadeesh maddi wrote:
Hi Team,
we are using Apache Drill to connect to Druid and pull the data
we are facing a issue when we did "order by"
Query: select time,XXX,YYY from XXXXX order by time desc
Exception:
2022-10-05 13:46:44,594 [1cc2834a-c555-f719-ae42-4a6e85b69d80:frag:3:0]
INFO o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:3:0: State change requested
AWAITING_ALLOCATION --> FAILED
2022-10-05 13:46:44,594 [1cc2834a-c555-f719-ae42-4a6e85b69d80:frag:3:0]
INFO o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:3:0: State change requested FAILED
--> FINISHED
2022-10-05 13:46:44,594 [1cc2834a-c555-f719-ae42-4a6e85b69d80:frag:3:0]
ERROR o.a.d.e.w.fragment.FragmentExecutor - SYSTEM ERROR:
NullPointerException
Fragment: 3:0
Please, refer to logs for more information.
[Error Id: 9a7171d4-8789-412d-84c4-87b46040fe1b on xxxxxxxxxx:31010]
org.apache.drill.common.exceptions.UserException: SYSTEM ERROR:
NullPointerException
Fragment: 3:0
Please, refer to logs for more information.
[Error Id: 9a7171d4-8789-412d-84c4-87b46040fe1b on xxxxxxxxxx:31010]
at
org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:657)
at
org.apache.drill.exec.work.fragment.FragmentExecutor.sendFinalState(FragmentExecutor.java:392)
at
org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:244)
at
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:359)
at
org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by:
com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot
construct instance of `org.apache.drill.exec.store.druid.DruidSubScan`,
problem: `java.lang.NullPointerException`
at [Source: (String)"{
"pop" : "hash-partition-sender",
"@id" : 0,
"receiver-major-fragment" : 2,
"child" : {
"pop" : "druid-datasource-scan",
"@id" : 1,
"columns" : [ "`__time`", "`xxx_ID`", "`xxx_C_1`", "`xxx_C_10`",
"`xxx_C_11`", "`xxx_C_12`", "`xxx_C_13`", "`xxx_C_14`", "`xxx_C_15`",
"`xxx_C_16`", "`xxx_C_17`", "`xxx_C_18`", "`xxx_C_19`", "`xxx_C_2`",
"`xxx_C_20`", "`xxx_C_21`", "`xxx_C_22`", "`xxx_C_23`", "`xxx_C_24`",
"`xxx_C_25`", "`xxx_C_26`", "`xxx_C_27`", "`xxx_C_28`",
"`xxx_C"[truncated 3449 chars]; line: 16, column: 3] (through reference
chain: org.apache.drill.exec.physical.config.HashPartitionSender["child"])
at
com.fasterxml.jackson.databind.exc.ValueInstantiationException.from(ValueInstantiationException.java:47)
at
com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:2047)
at
com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapAsJsonMappingException(StdValueInstantiator.java:587)
at
com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.rewrapCtorProblem(StdValueInstantiator.java:610)
at
com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:293)
at
com.fasterxml.jackson.databind.deser.ValueInstantiator.createFromObjectWith(ValueInstantiator.java:288)
at
com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:202)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:518)
at
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
at
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeWithObjectId(BeanDeserializerBase.java:1371)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:217)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:186)
at
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:144)
at
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:110)
at
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:263)
at
com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:539)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:563)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:438)
at
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1405)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:351)
at
com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeWithObjectId(BeanDeserializerBase.java:1371)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:217)
at
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:186)
at
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:144)
at
com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:110)
at
com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:263)
at
com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:74)
at
com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
at
com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:2051)
at
com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1492)
at
org.apache.drill.exec.planner.PhysicalPlanReader.readFragmentRoot(PhysicalPlanReader.java:103)
at
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:288)
... 4 common frames omitted
Caused by: java.lang.NullPointerException: null
at
org.apache.drill.shaded.guava.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:878)
at
org.apache.drill.shaded.guava.com.google.common.cache.LocalCache.get(LocalCache.java:3950)
at
org.apache.drill.shaded.guava.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974)
at
org.apache.drill.shaded.guava.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4958)
at
org.apache.drill.exec.store.StoragePluginRegistryImpl.getPluginByConfig(StoragePluginRegistryImpl.java:670)
at
org.apache.drill.exec.store.StoragePluginRegistryImpl.resolve(StoragePluginRegistryImpl.java:918)
at
org.apache.drill.exec.store.druid.DruidSubScan.<init>(DruidSubScan.java:64)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at
com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:128)
at
com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291)
... 32 common frames omitted
2022-10-05 13:46:44,595 [1cc2834a-c555-f719-ae42-4a6e85b69d80:frag:3:0]
DEBUG o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@55a64148
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:1:0: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:1:0: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:1:0: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:1:0: State to report: CANCELLED
2022-10-05 13:46:44,601 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@58bc8bec
2022-10-05 13:46:44,601 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:1:0 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@71ce5324 from
the work bus.
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:0: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:0: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,601 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:0: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:0: State to report: CANCELLED
2022-10-05 13:46:44,602 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@57871915
2022-10-05 13:46:44,602 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:0 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@33815de1 from
the work bus.
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:1: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:1: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:1: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:1: State to report: CANCELLED
2022-10-05 13:46:44,602 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@274e160d
2022-10-05 13:46:44,602 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:1 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@53aea3f7 from
the work bus.
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:2: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:2: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:2: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,602 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:2: State to report: CANCELLED
2022-10-05 13:46:44,603 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@494bd466
2022-10-05 13:46:44,603 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:2 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@67728ff4 from
the work bus.
2022-10-05 13:46:44,603 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:3: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,603 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:3: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,603 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:3: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,603 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:3: State to report: CANCELLED
2022-10-05 13:46:44,603 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@7514c548
2022-10-05 13:46:44,603 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:3 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@45f6d750 from
the work bus.
2022-10-05 13:46:44,603 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:4: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:4: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:4: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:4: State to report: CANCELLED
2022-10-05 13:46:44,604 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@1ab4354e
2022-10-05 13:46:44,604 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:4 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@45223df5 from
the work bus.
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:5: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:5: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:5: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:5: State to report: CANCELLED
2022-10-05 13:46:44,604 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@4d1da66b
2022-10-05 13:46:44,604 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:5 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@5e1a35c3 from
the work bus.
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:6: State change requested
AWAITING_ALLOCATION --> CANCELLATION_REQUESTED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:6: State to report:
CANCELLATION_REQUESTED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.fragment.FragmentExecutor -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:6: State change requested
CANCELLATION_REQUESTED --> FINISHED
2022-10-05 13:46:44,604 [BitServer-9] INFO
o.a.d.e.w.f.FragmentStatusReporter -
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:6: State to report: CANCELLED
2022-10-05 13:46:44,605 [BitServer-9] DEBUG
o.a.d.e.w.f.FragmentStatusReporter - Closing
org.apache.drill.exec.work.fragment.FragmentStatusReporter@5a62b34a
2022-10-05 13:46:44,605 [BitServer-9] DEBUG
o.a.d.exec.rpc.control.WorkEventBus - Cancel and removed fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:2:6 manager
org.apache.drill.exec.work.fragment.NonRootFragmentManager@5c4655af from
the work bus.
2022-10-05 13:46:44,605 [BitServer-9] WARN
o.a.d.exec.rpc.control.WorkEventBus - Fragment
1cc2834a-c555-f719-ae42-4a6e85b69d80:3:0 manager is not found in the
work bus.
2022-10-05 13:46:44,605 [BitServer-9] WARN
o.a.d.e.w.b.ControlMessageHandler - Dropping request to cancel
fragment. 1cc2834a-c555-f719-ae42-4a6e85b69d80:3:0 does not exist.
i request to please help me with the issue
Thanks and regards
Jagadeesh Maddi