文件处理

下载文件

下载data/algorithm/amz_edges.csv文件:

DownloadFileRequest request = new DownloadFileRequest();
request.setFilePathName("data/algorithm/amz_edges.csv");
client.downloadFile(request, new DownloadListener() {
@Override
public void onReady() {
// do something
}
@Override
public void onError(Throwable t) {
// do something
}
@Override
public void onComplete() {
// do something
}
@Override
public void next(DownloadFileResult result) {
// do something
}
});

导出数据

导出1百万条边数据,包含name,rank:

ExportRequest request = new ExportRequest();
request.setDbType(DBType.DBEDGE);
request.setLimit(1000000);
request.setSelectPropertiesName(Arrays.asList("name","rank"));
client.export(request, new ExportListener() {
@Override
public void onReady() {
// do something
}
@Override
public void onError(Throwable t) {
// do something
}
@Override
public void onComplete() {
// do something
}
@Override
public void next(ExportData result) {
// do something
}
});