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

ASF GitHub Bot commented on TAJO-1206:
--------------------------------------

Github user babokim commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/268#discussion_r21415701
  
    --- Diff: 
tajo-thrift-server/src/main/java/org/apache/tajo/thrift/client/TajoThriftResultSet.java
 ---
    @@ -0,0 +1,126 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.tajo.thrift.client;
    +
    +import org.apache.tajo.TajoConstants;
    +import org.apache.tajo.jdbc.TajoResultSetBase;
    +import org.apache.tajo.storage.RowStoreUtil;
    +import org.apache.tajo.storage.Tuple;
    +import org.apache.tajo.thrift.TajoThriftUtil;
    +import org.apache.tajo.thrift.generated.TQueryResult;
    +import org.apache.tajo.thrift.generated.TTableDesc;
    +
    +import java.io.IOException;
    +import java.nio.ByteBuffer;
    +import java.sql.SQLException;
    +import java.util.Iterator;
    +import java.util.List;
    +
    +public class TajoThriftResultSet extends TajoResultSetBase {
    +  private TajoThriftClient tajoThriftClient;
    +  private String queryId;
    +  private TQueryResult queryResult;
    +  private List<ByteBuffer> rowDatas;
    +  private Iterator<ByteBuffer> rowIterator;
    +  private int fetchSize;
    +  private int maxRows;
    +  private long totalFetchRows;
    +  private RowStoreUtil.RowStoreDecoder rowDecoder;
    +  private TTableDesc tableDesc;
    +
    +  public TajoThriftResultSet(TajoThriftClient tajoThriftClient, String 
queryId, TQueryResult queryResult) {
    +    super();
    +
    +    this.tajoThriftClient = tajoThriftClient;
    +    this.queryId = queryId;
    +    this.queryResult = queryResult;
    +
    +    this.tableDesc = queryResult.getTableDesc();
    +    this.schema = TajoThriftUtil.convertSchema(tableDesc.getSchema());
    +
    +    this.totalRows = tableDesc.getStats() != null ? 
tableDesc.getStats().getNumRows() : Integer.MAX_VALUE;
    +    if (this.totalRows == TajoConstants.UNKNOWN_ROW_NUMBER) {
    +      //Case of select * from table
    --- End diff --
    
    This comment is not for debugging. It shows a example.


> Implements Thrift proxy server.
> -------------------------------
>
>                 Key: TAJO-1206
>                 URL: https://issues.apache.org/jira/browse/TAJO-1206
>             Project: Tajo
>          Issue Type: New Feature
>            Reporter: Hyoungjun Kim
>            Assignee: Hyoungjun Kim
>         Attachments: Tajo-ThriftServer.png
>
>
> Currently Tajo supports only Java client. To support multiple languages like 
> Python, Thrift is very useful tool. Hive also supports multiple languages 
> using Thrift server.
> Thrift Server may be useful to separate a user from Tajo cluster for security 
> issues.
> In this issue, The following functions will be implemented.
> - Thrift server for Tajo
> - Web UI for monitoring Thrift server
> - CLI for Thrift server



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to