| Package | Description |
|---|---|
| com.aliyun.odps |
提供操作ODPS基本资源的类
|
| com.aliyun.odps.task |
提供ODPS支持的Task定义
|
| Modifier and Type | Method and Description |
|---|---|
Instance |
Instances.create(Job job)
|
Instance |
Instances.create(String projectName,
Task task)
为给定的
Task创建Instance |
Instance |
Instances.create(String projectName,
Task task,
int priority)
为给定的
Task创建Instance |
Instance |
Instances.create(String projectName,
Task task,
Integer priority,
String runningCluster) |
Instance |
Instances.create(String projectName,
Task task,
int priority,
String runningCluster)
为给定的
Task创建Instance |
Instance |
Instances.create(Task task)
|
Instance |
Instances.create(Task task,
int priority)
为给定的
Task创建Instance |
Instance |
Instances.create(Task task,
int priority,
String runningCluster)
为给定的
Task创建Instance |
Instance |
Instances.get(String id)
获取指定Instance
|
Instance |
Instances.get(String projectName,
String id)
获取指定Instance
|
| Modifier and Type | Method and Description |
|---|---|
Iterable<Instance> |
Instances.iterable()
获得Instance的 iterable 迭代器
|
Iterable<Instance> |
Instances.iterable(InstanceFilter filter)
获得
Instance iterable 迭代器 |
Iterable<Instance> |
Instances.iterable(String project)
获得指定Project下,Instance iterable迭代器
|
Iterable<Instance> |
Instances.iterable(String project,
InstanceFilter filter)
|
Iterator<Instance> |
Instances.iterator()
获得Instance的迭代器
|
Iterator<Instance> |
Instances.iterator(InstanceFilter filter)
获得
Instance迭代器 |
Iterator<Instance> |
Instances.iterator(String project)
获得指定Project下,Instance迭代器
|
Iterator<Instance> |
Instances.iterator(String project,
InstanceFilter filter)
|
| Modifier and Type | Method and Description |
|---|---|
void |
OdpsHooks.after(Instance instance,
Odps odps)
调用 Hook 的 after
|
abstract void |
OdpsHook.after(Instance instance,
Odps odps)
instance 结束后,框架会将 Instance 和 odps 对象传入 hook
|
String |
LogView.generateLogView(Instance instance,
long hours) |
void |
OdpsHooks.onInstanceCreated(Instance instance,
Odps odps)
调用 Hook 的 ready
|
void |
OdpsHook.onInstanceCreated(Instance instance,
Odps odps)
向远程提交 job 并产生 instance 时,将 Instance 和 Odps 对象传入 Hook
|
| Modifier and Type | Method and Description |
|---|---|
static Instance |
SQLTask.run(Odps odps,
String sql)
运行 SQL.
执行读取数据时,最多返回 1W 条记录,若超过,数据将被截断。 特别注意,在执行数据读取操作时: 正常情况下的 task 执行后,task 的状态为 SUCCESS,并正常返回数据结果。 但是,当读取数据量超过 10MB,task 的状态将是 FAILED,返回的数据结果为 error message。 因此,大量数据的获取建议使用 TableTunnel 进行操作。示例代码: |
static Instance |
SQLCostTask.run(Odps odps,
String sql)
通过匿名Instance运行SQLCostTask
|
static Instance |
LOTTask.run(Odps odps,
String input,
boolean runSQL)
通过匿名Instance运行LOTTask
|
static Instance |
GraphTask.run(Odps odps,
String project,
GraphTask graphTask) |
static Instance |
GraphTask.run(Odps odps,
String project,
GraphTask graphTask,
int priority) |
static Instance |
LOTTask.run(Odps odps,
String project,
String input,
boolean runSQL,
Map<String,String> hints,
Map<String,String> aliases)
通过匿名Instance运行LOTTask
|
static Instance |
LOTTask.run(Odps odps,
String project,
String input,
boolean runSQL,
String taskName,
Map<String,String> hints,
Map<String,String> aliases)
运行LOTTask
|
static Instance |
SQLCostTask.run(Odps odps,
String project,
String sql,
Map<String,String> hints)
通过匿名Instance运行SQLCostTask
|
static Instance |
MoyeTask.run(Odps odps,
String project,
String plan,
Map<String,String> hints) |
static Instance |
CupidTask.run(Odps odps,
String project,
String plan,
Map<String,String> hints) |
static Instance |
MoyeTask.run(Odps odps,
String project,
String plan,
Map<String,String> hints,
int priority) |
static Instance |
CupidTask.run(Odps odps,
String project,
String plan,
Map<String,String> hints,
int priority) |
static Instance |
SQLTask.run(Odps odps,
String project,
String sql,
Map<String,String> hints,
Map<String,String> aliases)
运行SQL
|
static Instance |
SQLCostTask.run(Odps odps,
String project,
String sql,
String taskName,
Map<String,String> hints)
运行SQLCostTask
|
static Instance |
SQLTask.run(Odps odps,
String project,
String sql,
String taskName,
Map<String,String> hints,
Map<String,String> aliases) |
static Instance |
SQLTask.run(Odps odps,
String project,
String sql,
String taskName,
Map<String,String> hints,
Map<String,String> aliases,
int priority) |
| Modifier and Type | Method and Description |
|---|---|
static List<Record> |
SQLTask.getResult(Instance instance)
Columns of each record in result are ALL OdpsType.STIRNG, ignore their real type in odps
Return value is valid only when SQL query is select, otherwise, result will be empty. |
static List<Record> |
SQLTask.getResult(Instance instance,
String taskName)
Deprecated.
|
static List<Record> |
SQLTask.getResultByInstanceTunnel(Instance instance)
使用 instance tunnel 的方式获取 Anonymous task 的结果
|
static List<Record> |
SQLTask.getResultByInstanceTunnel(Instance instance,
Long limit)
使用 instance tunnel 的方式获取 Anonymous task 的结果
|
static List<Record> |
SQLTask.getResultByInstanceTunnel(Instance instance,
String taskName)
使用 instance tunnel 的方式获取 instance 结果
当数据量不大于
SQLTask.SQL_TASK_RESULT_LIMIT 条时,成功;
若数据量量大于 SQLTask.SQL_TASK_RESULT_LIMIT 条, 返回 SQL_TASK_RESULT_LIMIT 条结果;
可使用 SQLTask.getResultByInstanceTunnel(Instance, String, Long) 接口调整 limit 参数, 来获取更多数据; |
static List<Record> |
SQLTask.getResultByInstanceTunnel(Instance instance,
String taskName,
Long limit)
Columns of each record in result are ALL OdpsType.STIRNG, ignore their real type in odps
Return value is valid only when SQL query is select, otherwise, result will be empty. |
Copyright © 2016 Alibaba Cloud Computing. All rights reserved.