@ Override public void verifyOrCreateReport ( String reportId ) { checkNotNull ( reportId , "reportId" ) ; String tableName = getTableName ( reportId ) ; if ( _dataStore . getTableExists ( tableName ) ) { return ; // Nothing to do. } try { // TODO: when run in the EU this should be routed to the US data center. _dataStore . createTable ( tableName , new TableOptionsBuilder ( ) . setPlacement ( _systemTablePlacement ) . build ( ) , ImmutableMap . < String , String > of ( ) , new AuditBuilder ( ) . setComment ( "create table" ) . build ( ) ) ; } catch ( TableExistsException e ) { // This is expected if we're continuing an existing report. } }
Verifies that the given report table exists or if not creates it .