-
Notifications
You must be signed in to change notification settings - Fork 16
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: add interactive-mode SQLExecutor with SQLRTTask #13
base: master
Are you sure you want to change the base?
Conversation
wenyu.ywm seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 先从aliyun:master同步一下代码,做一次本地合并
- 要修改的问题,cr中有标明
} | ||
|
||
func (t *TaskConfig) AddProperty(key, value string) { | ||
t.Config = append(t.Config, common.Property{Name: key, Value: value}) | ||
} | ||
|
||
type BaseTask struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
暂时只有SQLRTTTask用了BaseTask, 先不单独提取一个“父类”。及时提取的话,要对外不可见
} | ||
|
||
// UpdateInfo set information to running instance | ||
func (instance *Instance) UpdateInfo(taskName, infoKey, infoValue string) (UpdateInfoResult, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
和java sdk保持一致,用SetTaskInfo作为方法名
} | ||
|
||
// UpdateInfo set information to running instance | ||
func (instance *Instance) UpdateInfo(taskName, infoKey, infoValue string) (UpdateInfoResult, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UpdateInfoResult等返回值统一放到instance_res.go里
return nil | ||
}, | ||
) | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码中很多这种无用的注释: "//", 都去掉
) | ||
|
||
const ( | ||
DEFAULT_TASK_NAME = "sqlrt_task" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go中的常量用“驼峰式”命名,首字符大写
if err != nil { | ||
return nil, errors.WithStack(err) | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个地方为什么在cfg.QueryId != -1时去掉 session.newInitionRequst等逻辑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是需要调用: AttachToExistedIRDownloadSession
aliAccount := account.NewAliyunAccount(conf.AccessId, conf.AccessKey) | ||
odpsIns := odps.NewOdps(aliAccount, conf.Endpoint) | ||
odpsIns.SetDefaultProjectName(conf.ProjectName) | ||
sql := `select * from all_types_demo_no_parition;` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
例子中的表名用:all_types_demo,需要其他表的话表名DDL
No description provided.