carbondata timestamp has a bug

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

carbondata timestamp has a bug

Jocean shi
Hi:

The method buildCarbonLoadModelForStream  of class StreamSinkFactory.
The carbonLoadModel only add some CarbonProperties but don't
has CarbonCommonConstants.CARBON_TIMESTAMP.
so CarbonCommonConstants.CARBON_TIMESTAMP. don't has effect.

Best
Jocean.shi
Reply | Threaded
Open this post in threaded view
|

Re: carbondata timestamp has a bug

xm_zzc
Do you mean that you  want to define the format of timestamp? You can use
'CARBON_TIMESTAMP_FORMAT' parameter.



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: carbondata timestamp has a bug

Jocean shi
Hi:

I have used  'CARBON_TIMESTAMP_FORMAT' parameter.But it don't have effect
in Streaming table.
I have created a issue

Best
Jocean.shi

xm_zzc <[hidden email]> 于2019年3月23日周六 下午12:59写道:

> Do you mean that you  want to define the format of timestamp? You can use
> 'CARBON_TIMESTAMP_FORMAT' parameter.
>
>
>
> --
> Sent from:
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: carbondata timestamp has a bug

xm_zzc
Do you add below code before creating CarbonSession:

CarbonProperties.getInstance()
.addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/MM/dd
HH:mm:ss")
.addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy/MM/dd")

val spark = SparkSession
      .builder()
      .master("local[4]")
      .appName("Carbon1_5")
      .getOrCreateCarbonSession(storeLocation)





--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: carbondata timestamp has a bug

Jocean shi
yes.I do

xm_zzc <[hidden email]> 于2019年3月23日周六 下午1:14写道:

> Do you add below code before creating CarbonSession:
>
> CarbonProperties.getInstance()
> .addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/MM/dd
> HH:mm:ss")
> .addProperty(CarbonCommonConstants.CARBON_DATE_FORMAT, "yyyy/MM/dd")
>
> val spark = SparkSession
>       .builder()
>       .master("local[4]")
>       .appName("Carbon1_5")
>       .getOrCreateCarbonSession(storeLocation)
>
>
>
>
>
> --
> Sent from:
> http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: carbondata timestamp has a bug

xm_zzc
You can try to use this way:

spark.readStream
   .format("socket")
   .option("host", "localhost")
   .option("port", 9099)
   .option("timestampformat", "yyyy-MM-dd HH:mm:ss")
   .option("dateformat", "yyyy-MM-dd HH:mm:ss")



--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: carbondata timestamp has a bug

ManishNalla
In reply to this post by Jocean shi
Hi Jocean,

The timestamp format which you specify by doing this:  
CarbonProperties.getInstance()
.addProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT, "yyyy/MM/dd
HH:mm:ss")  is only for taking the input in this format. The output
displayed when you query will always be in the default format which is
'yyyy/MM/dd HH:mm:ss.ms'. I checked with both, normal load and streaming and
this behaviour comes out to be same.

Thank you.




--
Sent from: http://apache-carbondata-dev-mailing-list-archive.1130556.n5.nabble.com/