Skip to content

Commit

Permalink
drop module kyuubi-hive-thrift
Browse files Browse the repository at this point in the history
  • Loading branch information
yaooqinn committed Jun 23, 2020
1 parent 829da50 commit 1a3e886
Show file tree
Hide file tree
Showing 103 changed files with 187 additions and 67,922 deletions.
6 changes: 0 additions & 6 deletions kyuubi-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.kyuubi</groupId>
<artifactId>kyuubi-hive-thrift</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.kyuubi</groupId>
<artifactId>kyuubi-ha</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions kyuubi-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<name>Kyuubi Project Common</name>

<dependencies>

<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
Expand All @@ -42,6 +43,12 @@
<artifactId>slf4j-api</artifactId>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-service-rpc</artifactId>
<version>2.3.7</version>
</dependency>

<!-- ut -->
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* 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.kyuubi.operation

import org.apache.hive.service.rpc.thrift.TFetchOrientation

object FetchOrientation extends Enumeration {
type FetchOrientation = Value

val FETCH_NEXT,
FETCH_PRIOR,
FETCH_FIRST,
FETCH_LAST,
FETCH_RELATIVE,
FETCH_ABSOLUTE = Value

def getFetchOrientation(from: TFetchOrientation): FetchOrientation =
from match {
case TFetchOrientation.FETCH_FIRST => FETCH_FIRST
case TFetchOrientation.FETCH_PRIOR => FETCH_PRIOR
case TFetchOrientation.FETCH_RELATIVE => FETCH_RELATIVE
case TFetchOrientation.FETCH_ABSOLUTE => FETCH_ABSOLUTE
case TFetchOrientation.FETCH_LAST => FETCH_LAST
case _ => FETCH_NEXT
}

def toTFetchOrientation(from: FetchOrientation): TFetchOrientation = {
from match {
case FETCH_FIRST => TFetchOrientation.FETCH_FIRST
case FETCH_LAST => TFetchOrientation.FETCH_LAST
case FETCH_ABSOLUTE => TFetchOrientation.FETCH_ABSOLUTE
case FETCH_RELATIVE => TFetchOrientation.FETCH_RELATIVE
case FETCH_PRIOR => TFetchOrientation.FETCH_PRIOR
case _ => TFetchOrientation.FETCH_NEXT
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* 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.kyuubi.operation

import org.apache.hive.service.rpc.thrift.TOperationType

object OperationType extends Enumeration {

type OperationType = Value
val UNKNOWN_OPERATION,
EXECUTE_STATEMENT,
GET_TYPE_INFO,
GET_CATALOGS,
GET_SCHEMAS,
GET_TABLES,
GET_TABLE_TYPES,
GET_COLUMNS,
GET_FUNCTIONS = Value

def getOperationType(from: TOperationType): OperationType = {
from match {
case TOperationType.EXECUTE_STATEMENT => EXECUTE_STATEMENT
case TOperationType.GET_TYPE_INFO => GET_TYPE_INFO
case TOperationType.GET_CATALOGS => GET_CATALOGS
case TOperationType.GET_SCHEMAS => GET_SCHEMAS
case TOperationType.GET_TABLES => GET_TABLES
case TOperationType.GET_TABLE_TYPES => GET_TABLE_TYPES
case TOperationType.GET_COLUMNS => GET_COLUMNS
case TOperationType.GET_FUNCTIONS => GET_FUNCTIONS
case _ => UNKNOWN_OPERATION
}
}

def toTOperationType(from: OperationType): TOperationType = {
from match {
case EXECUTE_STATEMENT => TOperationType.EXECUTE_STATEMENT
case GET_TYPE_INFO => TOperationType.GET_TYPE_INFO
case GET_CATALOGS => TOperationType.GET_CATALOGS
case GET_SCHEMAS => TOperationType.GET_SCHEMAS
case GET_TABLES => TOperationType.GET_TABLES
case GET_TABLE_TYPES => TOperationType.GET_TABLE_TYPES
case GET_COLUMNS => TOperationType.GET_COLUMNS
case GET_FUNCTIONS => TOperationType.GET_FUNCTIONS
case _ => TOperationType.UNKNOWN
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* 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.kyuubi.operation

import org.apache.hive.service.rpc.thrift.TFetchOrientation

import org.apache.kyuubi.KyuubiFunSuite

class FetchOrientationSuite extends KyuubiFunSuite {

test("getFetchOrientation") {
val get = FetchOrientation.getFetchOrientation _
assert(get(TFetchOrientation.FETCH_ABSOLUTE) === FetchOrientation.FETCH_ABSOLUTE)
assert(get(TFetchOrientation.FETCH_FIRST) === FetchOrientation.FETCH_FIRST)
assert(get(TFetchOrientation.FETCH_LAST) === FetchOrientation.FETCH_LAST)
assert(get(TFetchOrientation.FETCH_RELATIVE) === FetchOrientation.FETCH_RELATIVE)
assert(get(TFetchOrientation.FETCH_PRIOR) === FetchOrientation.FETCH_PRIOR)
assert(get(TFetchOrientation.FETCH_NEXT) === FetchOrientation.FETCH_NEXT)
}

test("toTFetchOrientation") {
val to = FetchOrientation.toTFetchOrientation _
assert(to(FetchOrientation.FETCH_ABSOLUTE) === TFetchOrientation.FETCH_ABSOLUTE)
assert(to(FetchOrientation.FETCH_FIRST) === TFetchOrientation.FETCH_FIRST)
assert(to(FetchOrientation.FETCH_LAST) === TFetchOrientation.FETCH_LAST)
assert(to(FetchOrientation.FETCH_RELATIVE) === TFetchOrientation.FETCH_RELATIVE)
assert(to(FetchOrientation.FETCH_PRIOR) === TFetchOrientation.FETCH_PRIOR)
assert(to(FetchOrientation.FETCH_NEXT) === TFetchOrientation.FETCH_NEXT)
}

}
130 changes: 0 additions & 130 deletions kyuubi-hive-thrift/pom.xml

This file was deleted.

This file was deleted.

0 comments on commit 1a3e886

Please sign in to comment.