@ Override public TableReportMetadata getReportMetadata ( String reportId ) { checkNotNull ( reportId , "reportId" ) ; final String reportTable = getTableName ( reportId ) ; Map < String , Object > metadata ; try { metadata = _dataStore . get ( reportTable , REPORT_METADATA_KEY ) ; } catch ( UnknownTableException e ) { // The table is only unknown if the report doesn't exist throw new ReportNotFoundException ( reportId ) ; } if ( Intrinsic . isDeleted ( metadata ) ) { throw new ReportNotFoundException ( reportId ) ; } Date startTime = JsonHelper . parseTimestamp ( ( String ) metadata . get ( "startTime" ) ) ; Date completeTime = null ; if ( metadata . containsKey ( "completeTime" ) ) { completeTime = JsonHelper . parseTimestamp ( ( String ) metadata . get ( "completeTime" ) ) ; } Boolean success = ( Boolean ) metadata . get ( "success" ) ; List < String > placements ; Object placementMap = metadata . get ( "placements" ) ; if ( placementMap != null ) { placements = ImmutableList . copyOf ( JsonHelper . convert ( placementMap , new TypeReference < Map < String , Object > > ( ) { } ) . keySet ( ) ) ; } else { placements = ImmutableList . of ( ) ; } return new TableReportMetadata ( reportId , startTime , completeTime , success , placements ) ; }
Returns the table data for a given report . The caller can optionally return a partial report with ony the requested tables .