public static void printJobProperties ( Optional < JobExecutionInfo > jobExecutionInfoOptional ) { if ( ! jobExecutionInfoOptional . isPresent ( ) ) { System . err . println ( "Job not found." ) ; return ; } List < List < String > > data = new ArrayList <> ( ) ; List < String > flags = Arrays . asList ( "" , "-" ) ; List < String > labels = Arrays . asList ( "Property Key" , "Property Value" ) ; for ( Map . Entry < String , String > entry : jobExecutionInfoOptional . get ( ) . getJobProperties ( ) . entrySet ( ) ) { data . add ( Arrays . asList ( entry . getKey ( ) , entry . getValue ( ) ) ) ; } new CliTablePrinter . Builder ( ) . labels ( labels ) . data ( data ) . flags ( flags ) . delimiterWidth ( 2 ) . build ( ) . printTable ( ) ; }
Print properties of a specific job