added a parquet api
This commit is contained in:
parent
43e0386b78
commit
e5f7b88ea5
|
@ -215,6 +215,14 @@ public class MDStoreController extends AbstractDnetController {
|
|||
return hdfsClient.readParquetFiles(path + "/store", limit);
|
||||
}
|
||||
|
||||
@ApiOperation("read the parquet file of a mdstore (current version)")
|
||||
@GetMapping("/mdstore/{mdId}/parquet/content/{limit}")
|
||||
public List<Map<String, Object>> listMdstoreParquet(@PathVariable final String mdId, @PathVariable final long limit) throws MDStoreManagerException {
|
||||
final String versionId = databaseUtils.findMdStore(mdId).getCurrentVersion();
|
||||
final String path = databaseUtils.findVersion(versionId).getHdfsPath();
|
||||
return hdfsClient.readParquetFiles(path + "/store", limit);
|
||||
}
|
||||
|
||||
protected void setDatabaseUtils(final DatabaseUtils databaseUtils) {
|
||||
this.databaseUtils = databaseUtils;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue