Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature][Spark]: Standard auth utils method for kyuubi #582

Closed
2 tasks done
baiyangtx opened this issue Nov 9, 2022 · 0 comments · Fixed by #587
Closed
2 tasks done

[Feature][Spark]: Standard auth utils method for kyuubi #582

baiyangtx opened this issue Nov 9, 2022 · 0 comments · Fixed by #587
Assignees
Labels
module:mixed-spark Spark module for Mixed Format type:feature Feature Requests
Milestone

Comments

@baiyangtx
Copy link
Contributor

Description

provider a standrad method to covert arctic command to auth operation type. this method will avoid to submit to PR to kyuubi once arctic add or change LogicalPlan name.

Use case/motivation

No response

Describe the solution

provider a utils class

object ArcticAuthUtil {
  val commandTypes = { APPEND,  UPSERT, CREATE_TABLE, ALTER_TABLE, CREATE_TABLE_AS_SELECT, OVERWRITE, DELETE }

  def commandType(command: String): String {

  }

  def isArcticCommand(command: String) : boolean {}

}

and in kyuubi or some other auth plugin.

case "CreateDataSourceTableAsSelectCommand" => CREATE_TABLE_AS_SELETE
case "CreateDataSourceTableCommand" =>  CREATE_TABLE
case command if isArcticCommand(command) => convertArcticCommandType(command)


def isArcticCommand(command: String) : boolean = {
   try{
      val clz = Class.forName("com.netease.arctic.spark.ArcticAuthUtil ")
      // call ArcticAuthUtil.isArcticCommand by  refaction.  
   } catch ( exception e ) { 
      return false
   }
}

by this way, other spark plugin will not depend on arctic code directly, and may decrease influence of arctic code change.

Subtasks

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@baiyangtx baiyangtx added the type:feature Feature Requests label Nov 9, 2022
@baiyangtx baiyangtx added this to the Release 0.4.0 milestone Nov 9, 2022
@baiyangtx baiyangtx added the module:mixed-spark Spark module for Mixed Format label Nov 9, 2022
@YesOrNo828 YesOrNo828 changed the title [Feature][Spark]: Standrad auth utils method for kyuubi [Feature][Spark]: Standard auth utils method for kyuubi Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:mixed-spark Spark module for Mixed Format type:feature Feature Requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants