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

Littlestar commented on SPARK-6049:
-----------------------------------

HiveThriftServer2.scala is can't call directly in other program becuase of 
privated constructor.
It's main has lot of scala code can't rewrite by java.

I request HiveThriftServer2.scala to be refactored to expose a more 
programmatic API.

My app:
  main() {
     JavaSQLContext sqlContex;
     registerTempTable("table_1");
     registerTempTable("table_2");
     I want to startup HiveThriftServer2(JDBC Server) here ....expose table_1 
and table_2
}

HiveThriftServer2.scala#startWithContext has DeveloperApi annotation, but 
startWithContext is not invokable by app.

 /**
   * :: DeveloperApi ::
   * Starts a new thrift server with the given context.
   */
  @DeveloperApi
  def startWithContext(sqlContext: HiveContext): Unit = {
    val server = new HiveThriftServer2(sqlContext)
    server.init(sqlContext.hiveconf)
    server.start()
  }

thanks.



> HiveThriftServer2 may expose Inheritable methods
> ------------------------------------------------
>
>                 Key: SPARK-6049
>                 URL: https://issues.apache.org/jira/browse/SPARK-6049
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 1.2.1
>            Reporter: Littlestar
>            Priority: Minor
>              Labels: HiveThriftServer2
>
> Does HiveThriftServer2 may expose Inheritable methods?
> HiveThriftServer2  is very good when used as a JDBC Server, but 
> HiveThriftServer2.scala  is not Inheritable or invokable by app.
> My app use JavaSQLContext and registerTempTable.
> I want to expose these TempTables by HiveThriftServer2(JDBC Server).
> Thanks.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to