public static String writeSingleClientConfigAvro ( Properties props ) { // TODO: Use a dedicated json lib. We shouldn't be manually manipulating json... String avroConfig = "" ; Boolean firstProp = true ; for ( String key : props . stringPropertyNames ( ) ) { if ( firstProp ) { firstProp = false ; } else { avroConfig = avroConfig + ",\n" ; } avroConfig = avroConfig + "\t\t\"" + key + "\": \"" + props . getProperty ( key ) + "\"" ; } if ( avroConfig . isEmpty ( ) ) { return "{}" ; } else { return "{\n" + avroConfig + "\n\t}" ; } }
Assembles an avro format string of single store config from store properties