Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16646

flink read orc file throw a NullPointerException

    XMLWordPrintableJSON

    Details

      Description

      When I use OrcRowInputFormat to read multiple orc files, the system throws one NullPointerException .

      the code like this

       

      StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnvironment();
      environment.setParallelism(1);
      String path = "file://tmp/dir";
      String schema = ..... ;
      OrcRowInputFormat orcRowInputFormat = new OrcRowInputFormat(
         path,
         schema,
         new org.apache.hadoop.conf.Configuration());
      DataStream dataStream  =environment.createInput(orcRowInputFormat);
      dataStream.writeAsText("file:///tmp/aaa", FileSystem.WriteMode.OVERWRITE);
      environment.execute();
      

       

      the exception is 

       

      Caused by: java.lang.NullPointerExceptionCaused by: java.lang.NullPointerException at org.apache.flink.orc.shim.OrcShimV200.computeProjectionMask(OrcShimV200.java:188) at org.apache.flink.orc.shim.OrcShimV200.createRecordReader(OrcShimV200.java:120) at org.apache.flink.orc.OrcSplitReader.<init>(OrcSplitReader.java:73) at org.apache.flink.orc.OrcRowSplitReader.<init>(OrcRowSplitReader.java:50) at org.apache.flink.orc.OrcRowInputFormat.open(OrcRowInputFormat.java:102) at org.apache.flink.streaming.api.functions.source.ContinuousFileReaderOperator$SplitReader.run(ContinuousFileReaderOperator.java:315)
      

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zhangjun Jun Zhang
                Reporter:
                zhangjun Jun Zhang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m