public static String constructHadoopTags ( Props props , String [ ] keys ) { String [ ] keysAndValues = new String [ keys . length ] ; for ( int i = 0 ; i < keys . length ; i ++ ) { if ( props . containsKey ( keys [ i ] ) ) { keysAndValues [ i ] = keys [ i ] + ":" + props . get ( keys [ i ] ) ; } } Joiner joiner = Joiner . on ( ' ' ) . skipNulls ( ) ; return joiner . join ( keysAndValues ) ; }
Construct a CSV of tags for the Hadoop application .