[jira] [Commented] (CARBONDATA-989) decompressing error while load 'gz' and 'bz2' data into table

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

[jira] [Commented] (CARBONDATA-989) decompressing error while load 'gz' and 'bz2' data into table

Akash R Nilugal (Jira)

    [ https://issues.apache.org/jira/browse/CARBONDATA-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15984384#comment-15984384 ]

Ran Mingxuan commented on CARBONDATA-989:
-----------------------------------------

I fixed it and will make a pr later.

> decompressing error while load 'gz' and 'bz2' data into table
> -------------------------------------------------------------
>
>                 Key: CARBONDATA-989
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-989
>             Project: CarbonData
>          Issue Type: Bug
>         Environment: spark 2.1.0
> hadoop 2.6.0 - CDH 5.5.2
>            Reporter: Ran Mingxuan
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Run command in spark shell:
> import org.apache.spark.sql.SparkSession
> import org.apache.spark.sql.CarbonSession._
> val carbon = SparkSession.builder().config(sc.getConf).getOrCreateCarbonSession("hdfs://nsha/user/ranmx/test/carbon")
> carbon.sql("CREATE TABLE IF NOT EXISTS test_table(id string, name string, city string, age Int) STORED BY 'carbondata'")
> carbon.sql("LOAD DATA inpath '/ranmx/test/sh.csv.bz2' INTO TABLE test_table")
> get error:
> 17/04/26 11:11:26 ERROR LoadTable: main
> java.lang.NullPointerException
> at org.apache.hadoop.io.compress.bzip2.Bzip2Factory.isNativeBzip2Loaded(Bzip2Factory.java:54)
> at org.apache.hadoop.io.compress.bzip2.Bzip2Factory.getBzip2DecompressorType(Bzip2Factory.java:120)
> at org.apache.hadoop.io.compress.BZip2Codec.getDecompressorType(BZip2Codec.java:242)
> at org.apache.hadoop.io.compress.CodecPool.getDecompressor(CodecPool.java:176)
> at org.apache.hadoop.io.compress.CompressionCodec$Util.createInputStreamWithCodecPool(CompressionCodec.java:157)
> at org.apache.hadoop.io.compress.BZip2Codec.createInputStream(BZip2Codec.java:157)
> at org.apache.carbondata.core.datastore.impl.FileFactory.getDataInputStream(FileFactory.java:139)
> at org.apache.carbondata.core.datastore.impl.FileFactory.getDataInputStream(FileFactory.java:104)
> at org.apache.carbondata.core.util.CarbonUtil.readHeader(CarbonUtil.java:1273)
> at org.apache.carbondata.spark.util.CommonUtil$.getCsvHeaderColumns(CommonUtil.scala:319)
> at org.apache.spark.sql.execution.command.LoadTable.run(carbonTableSchema.scala:474)
> ...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)