Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-1358

Hive metastore driver should support Timestamp and Date types

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Catalog, Data Type
    • Labels:
      None

      Description

      Currently, Hive metastore driver in catalog does not support Timestamp and Date types. Queries which use Timestamp or Date types will cause following errors:

      2015-02-19 15:26:55,314 INFO org.apache.tajo.master.GlobalEngine: =============================================
      2015-02-19 15:26:55,330 INFO org.apache.tajo.master.TajoMasterClientService: Send result to client for d749cf43-0e67-4763-b4a1-11db7bdd642c,q_1424318601214_0004, 0 rows
      2015-02-19 15:27:58,828 INFO org.apache.tajo.master.GlobalEngine: Query: select * from onlytime
      2015-02-19 15:27:58,877 ERROR org.apache.tajo.catalog.CatalogServer: java.lang.TypeNotPresentException: Type timestamp not present
      2015-02-19 15:27:58,877 ERROR org.apache.tajo.catalog.AbstractCatalogClient: com.google.protobuf.ServiceException: java.lang.TypeNotPresentException: Type timestamp not present
      com.google.protobuf.ServiceException: com.google.protobuf.ServiceException: java.lang.TypeNotPresentException: Type timestamp not present
              at org.apache.tajo.rpc.ServerCallable.withRetries(ServerCallable.java:105)
              at org.apache.tajo.catalog.AbstractCatalogClient.getTableDesc(AbstractCatalogClient.java:243)
              at org.apache.tajo.catalog.AbstractCatalogClient.getTableDesc(AbstractCatalogClient.java:262)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitRelation(LogicalPlanPreprocessor.java:372)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitRelation(LogicalPlanPreprocessor.java:40)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:94)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitRelationList(BaseAlgebraVisitor.java:409)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:91)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitProjection(LogicalPlanPreprocessor.java:185)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitProjection(LogicalPlanPreprocessor.java:40)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:55)
              at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:129)
              at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:119)
              at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:501)
              at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:168)
              at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:265)
              at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:527)
              at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:103)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
              at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
              at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
              at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
              at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
              at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
              at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724)
      Caused by: com.google.protobuf.ServiceException: java.lang.TypeNotPresentException: Type timestamp not present
              at org.apache.tajo.catalog.CatalogServer$CatalogProtocolHandler.getTableDesc(CatalogServer.java:464)
              at org.apache.tajo.catalog.AbstractCatalogClient$11.call(AbstractCatalogClient.java:250)
              at org.apache.tajo.catalog.AbstractCatalogClient$11.call(AbstractCatalogClient.java:243)
              at org.apache.tajo.rpc.ServerCallable.withRetries(ServerCallable.java:95)
              ... 43 more
      Caused by: java.lang.TypeNotPresentException: Type timestamp not present
              at org.apache.hcatalog.data.schema.HCatSchemaUtils.getPrimitiveHType(HCatSchemaUtils.java:176)
              at org.apache.hcatalog.data.schema.HCatSchemaUtils.getHCatFieldSchema(HCatSchemaUtils.java:126)
              at org.apache.hcatalog.data.schema.HCatSchemaUtils.getHCatFieldSchema(HCatSchemaUtils.java:119)
              at org.apache.hcatalog.common.HCatUtil.getHCatFieldSchemaList(HCatUtil.java:165)
              at org.apache.hcatalog.common.HCatUtil.getTableSchemaWithPtnCols(HCatUtil.java:198)
              at org.apache.tajo.catalog.store.HCatalogStore.getTable(HCatalogStore.java:135)
              at org.apache.tajo.catalog.CatalogServer$CatalogProtocolHandler.getTableDesc(CatalogServer.java:455)
              ... 46 more
      2015-02-19 15:27:58,879 ERROR org.apache.tajo.master.GlobalEngine:
      Stack Trace:
      java.lang.NullPointerException
              at org.apache.tajo.engine.planner.logical.ScanNode.init(ScanNode.java:51)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitRelation(LogicalPlanPreprocessor.java:377)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitRelation(LogicalPlanPreprocessor.java:40)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:94)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visitRelationList(BaseAlgebraVisitor.java:409)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:91)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitProjection(LogicalPlanPreprocessor.java:185)
              at org.apache.tajo.engine.planner.LogicalPlanPreprocessor.visitProjection(LogicalPlanPreprocessor.java:40)
              at org.apache.tajo.engine.planner.BaseAlgebraVisitor.visit(BaseAlgebraVisitor.java:55)
              at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:129)
              at org.apache.tajo.engine.planner.LogicalPlanner.createPlan(LogicalPlanner.java:119)
              at org.apache.tajo.master.GlobalEngine.createLogicalPlan(GlobalEngine.java:501)
              at org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:168)
              at org.apache.tajo.master.TajoMasterClientService$TajoMasterClientProtocolServiceHandler.submitQuery(TajoMasterClientService.java:265)
              at org.apache.tajo.ipc.TajoMasterClientProtocol$TajoMasterClientProtocolService$2.callBlockingMethod(TajoMasterClientProtocol.java:527)
              at org.apache.tajo.rpc.BlockingRpcServer$ServerHandler.messageReceived(BlockingRpcServer.java:103)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
              at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)
              at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
              at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
              at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
              at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
              at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:109)
              at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:312)
              at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:90)
              at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
              at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
              at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
              at java.lang.Thread.run(Thread.java:724)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                blrunner Jaehwa Jung
                Reporter:
                hyunsik Hyunsik Choi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: