|
@@ -37,24 +37,6 @@ public class FeatureConstructor {
|
|
|
private static final Account account = new AliyunAccount(ODPS_CONFIG.get("ACCESSID"), ODPS_CONFIG.get("ACCESSKEY"));
|
|
|
|
|
|
|
|
|
- public static List<Record> loadStreamDataFromOSS(String table, String dt) {
|
|
|
- Odps odps = new Odps(account);
|
|
|
- odps.setEndpoint(ODPS_CONFIG.get("ENDPOINT"));
|
|
|
- odps.setDefaultProject("loghubods");
|
|
|
- String sql = String.format("select * from %s where dt ='%s';", table, dt);
|
|
|
- Instance instance;
|
|
|
- List<Record> records = new ArrayList<Record>();
|
|
|
- try {
|
|
|
- instance = SQLTask.run(odps, sql);
|
|
|
- instance.waitForSuccess();
|
|
|
- records = SQLTask.getResult(instance);
|
|
|
- } catch (OdpsException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- return records;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
public static TunnelRecordReader loadDataFromOSSSession(String sql) {
|
|
|
Odps odps = new Odps(account);
|
|
|
odps.setEndpoint(ODPS_CONFIG.get("ENDPOINT"));
|