phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Naor David <>
Subject Re: Configuring phoenix.query.dateFormatTimeZone
Date Sun, 16 Aug 2015 15:54:53 GMT
I'm upserting timestamps by setting a java.sql.TimeStamp object to it's
proper index in my PreparedStatement object, so it,s something like this:
By doing so I am not using the TO_DATE Phoenix function, nor am I parsing
the time samp as a String, so I think that setting the parameter at
hbase-site.xml wouldn't help..

For example, if I insert the timestamp corresponding to 1-1-2015 10:00:00,
the inserted timestamp column would be 1-1-2015 07:00:00 and so on.
FYI, I use the DateTimeFormatter class for converting the date (which comes
with GMT+3 suffix) to a TimeStamp object as above for inserting the date as
a TimeStamp.

- David
בתאריך 14 באוג׳ 2015 16:31,‏ "Gabriel Reid" <> כתב:

> Hi David,
> How are you upserting timestamps? The phoenix.query.dateFormatTimeZone
> config property only affects string parsing or the TO_DATE function (docs
> on this are at [1]). If you're using the TO_DATE function, it's also
> possible to supply a custom time zone in the function call (docs on this
> are at [2]).
> Regardless, if you want to use this setting, you need to update the
> hbase-site.xml on the client machine where you're connecting to
> HBase/Phoenix. This configuration file will typically be in
> /etc/hbase/conf, although if you're using Cloudera Manager (or probably
> some other cluster management software) the hbase-site is automatically
> overwritten by CM, so you'll need to configure this within Cloudera Manager
> itself (via configuration settings called "Gateway safety-valve", or
> something along those lines).
> In any case, there are often issues due to the odd way in which JDBC
> itself handles (or doesn't handle) timezones, so the best way to resolve
> this issue is probably for you to post some examples of the statements
> you're running, what output you're getting, and what you would expect
> instead of what you're getting.
> - Gabriel
> 1.
> 2.
> On Fri, Aug 14, 2015 at 1:59 PM Naor David <> wrote:
>> Hello,
>> I recently installed Apache Pheonix 4.3 at a Cloudera cluster via parcel
>> installation.
>> My problem is that while inserting a java.sql.TimeStamp object via jdbc,
>> the corresponding inserted timestamp column is converted to GMT+0 timezone.
>> (While my local time is GMT+3).
>> I understood that one can configure the Phoenix timezone by setting
>> phoenix.query.dateFormatTimeZone to the desired timezone.
>> My problem is that I don't know which hbase-site.xml should I edit (and
>> where can I find it).
>> Any help would be appreciated.
>> Regards,
>> David.

View raw message