This repository was archived by the owner on Dec 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
doradus-server/src/main/java/com/dell/doradus/logservice Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 3232import com .dell .doradus .common .HttpDefs ;
3333import com .dell .doradus .common .HttpMethod ;
3434import com .dell .doradus .common .RESTResponse ;
35+ import com .dell .doradus .common .RetentionAge ;
3536import com .dell .doradus .common .TableDefinition ;
3637import com .dell .doradus .common .UNode ;
3738import com .dell .doradus .common .Utils ;
@@ -262,9 +263,22 @@ private void validateApplication(ApplicationDefinition appDef) {
262263 }
263264
264265 for (TableDefinition tableDef : appDef .getTableDefinitions ().values ()) {
265- Utils .require (tableDef .getFieldDefinitions ().size () == 0 ,
266- "Field definitions are not allowed with the LoggingService" );
266+ validateTable (tableDef );
267267 }
268268 }
269269
270+ private void validateTable (TableDefinition tableDef ) {
271+ for (String optName : tableDef .getOptionNames ()) {
272+ switch (optName ) {
273+ case CommonDefs .OPT_RETENTION_AGE :
274+ new RetentionAge (tableDef .getOption (optName ));
275+ break ;
276+ default :
277+ Utils .require (false , "Unknown LoggingService table option: %s" , optName );
278+ }
279+ }
280+ Utils .require (tableDef .getFieldDefinitions ().size () == 0 ,
281+ "Field definitions are not allowed with the LoggingService" );
282+ }
283+
270284} // class LoggingService
You can’t perform that action at this time.
0 commit comments