[jira] [Created] (FLINK-22400) NPE problem when call HiveInspectors.toFlinkObject for hive-exec 2.0.0

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-22400) NPE problem when call HiveInspectors.toFlinkObject for hive-exec 2.0.0

Shang Yuanchun (Jira)
hehuiyuan created FLINK-22400:
---------------------------------

             Summary: NPE problem when call HiveInspectors.toFlinkObject for hive-exec 2.0.0
                 Key: FLINK-22400
                 URL: https://issues.apache.org/jira/browse/FLINK-22400
             Project: Flink
          Issue Type: Bug
          Components: Connectors / Hive
            Reporter: hehuiyuan
         Attachments: image-2021-04-21-23-18-56-107.png

ENV:

flink 1.12   hive 2.0.0

ERROR LOG:
{code:java}
Caused by: java.lang.RuntimeException: One or more fetchers have encountered exception
    at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcherManager.checkErrors(SplitFetcherManager.java:199)
    at org.apache.flink.connector.base.source.reader.SourceReaderBase.getNextFetch(SourceReaderBase.java:154)
    at org.apache.flink.connector.base.source.reader.SourceReaderBase.pollNext(SourceReaderBase.java:116)
    at org.apache.flink.streaming.api.operators.SourceOperator.emitNext(SourceOperator.java:275)
    at org.apache.flink.streaming.runtime.io.StreamTaskSourceInput.emitNext(StreamTaskSourceInput.java:67)
    at org.apache.flink.streaming.runtime.io.StreamOneInputProcessor.processInput(StreamOneInputProcessor.java:65)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.processInput(StreamTask.java:399)
    at org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:191)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:620)
    at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:584)
    at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:844)
    at org.apache.flink.runtime.taskmanager.Task.run(Task.java:636)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: SplitFetcher thread 0 received unexpected exception while polling the records
    at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:146)
    at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.run(SplitFetcher.java:101)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    ... 1 more
Caused by: org.apache.flink.connectors.hive.FlinkHiveException: java.lang.NullPointerException
    at org.apache.flink.connectors.hive.read.HiveMapredSplitReader.nextRecord(HiveMapredSplitReader.java:190)
    at org.apache.flink.connectors.hive.read.HiveBulkFormatAdapter$HiveReader.nextRecord(HiveBulkFormatAdapter.java:336)
    at org.apache.flink.connectors.hive.read.HiveBulkFormatAdapter$HiveReader.readBatch(HiveBulkFormatAdapter.java:319)
    at org.apache.flink.connector.file.src.impl.FileSourceSplitReader.fetch(FileSourceSplitReader.java:67)
    at org.apache.flink.connector.base.source.reader.fetcher.FetchTask.run(FetchTask.java:56)
    at org.apache.flink.connector.base.source.reader.fetcher.SplitFetcher.runOnce(SplitFetcher.java:138)
    ... 6 more
Caused by: java.lang.NullPointerException
    at org.apache.flink.table.functions.hive.conversion.HiveInspectors.toFlinkObject(HiveInspectors.java:335)
    at org.apache.flink.connectors.hive.read.HiveMapredSplitReader.nextRecord(HiveMapredSplitReader.java:180)
    ... 11 more

{code}
{code:java}
Map<?, ?> map = mapInspector.getMap(data);

hive-exec 2.0.0

{code}
 

!image-2021-04-21-23-18-56-107.png|width=372,height=191!

 

Null may be returned here,then throw NPE when  call `map.size`

(map == null)

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)