• 场景
    (1):spark程序中使用java.sql.Timestamp插入phoenix表结构为register_time(Timestamp)。
    (2):squirrel-sql中使用此种方式查询select register_time,register_date from user where register_time= to_timestamp(‘2016-01-21 12:15:34’)
    (3):使用phoenix非thin版本,而是使用phoenix-*-client.jar
  • 方案
    (1):phoenix-*-client.jar中添加hbase-site.xml文件
    (2):hbase-site.xml文件配置如下:
    <configuration>
      <property>
        <name>phoenix.schema.isNamespaceMappingEnabled</name>
        <value>true</value>
      </property>
    
      <property>
        <name>phoenix.queryserver.serialization</name>
        <value>JSON</value>
      </property>
      <property>
        <name>phoenix.query.dateFormatTimeZone</name>
        <value>GMT+08:00</value>
      </property>
    </configuration>
    
  • 展示
    phoenix与squirrel-sql结合或phoenix-sqlline.py启动后展示查询时区Timezone差8个小时问题
    更多大数据相关问题、或者互联网金融相关问题可以咨询我,免费解答,或者添加我的微信号18310801089
    phoenix与squirrel-sql结合或phoenix-sqlline.py启动后展示查询时区Timezone差8个小时问题

相关文章:

  • 2021-04-29
  • 2021-10-19
  • 2022-12-23
  • 2021-05-18
  • 2022-02-20
  • 2021-09-15
  • 2021-11-21
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2021-10-28
  • 2022-01-22
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
相关资源
相似解决方案