public class DatahubReader extends Object
Constructor and Description |
---|
DatahubReader(com.aliyun.odps.rest.RestClient datahubServiceClient,
TableSchema tableSchema,
String path,
Map<String,String> params,
Map<String,String> headers) |
DatahubReader(com.aliyun.odps.rest.RestClient datahubServiceClient,
TableSchema tableSchema,
String path,
Map<String,String> params,
Map<String,String> headers,
String packId) |
Modifier and Type | Method and Description |
---|---|
String |
getLastPackId()
获取当前从服务端读取的pack的packId
|
Record |
read()
从指定的shard读取一条记录
|
byte[] |
readMeta() |
SeekPackResult |
seek(long timeStamp) |
void |
skipPack()
跳过某条Record不进行数据读取
|
public DatahubReader(com.aliyun.odps.rest.RestClient datahubServiceClient, TableSchema tableSchema, String path, Map<String,String> params, Map<String,String> headers)
public DatahubReader(com.aliyun.odps.rest.RestClient datahubServiceClient, TableSchema tableSchema, String path, Map<String,String> params, Map<String,String> headers, String packId)
public Record read() throws OdpsException, IOException
Record
OdpsException,
- IOExceptionOdpsException
IOException
public void skipPack()
public String getLastPackId()
public SeekPackResult seek(long timeStamp) throws OdpsException, IOException
OdpsException
IOException
public byte[] readMeta() throws OdpsException, IOException
OdpsException
IOException
Copyright © 2020 Alibaba Cloud Computing. All rights reserved.