public void storeState(final Configuration configuration) {
        // clear properties from vertex program
        Set<String> oldKeys = new HashSet<>();
        configuration.subset(PREFIX_SELECTED_TYPE_KEY).getKeys()
                .forEachRemaining(key -> oldKeys.add(PREFIX_SELECTED_TYPE_KEY + "." + key));
        oldKeys.forEach(configuration::clearProperty);

        // store selectedTypes
        selectedTypes.forEach(typeId ->
                configuration.addProperty(PREFIX_SELECTED_TYPE_KEY + "." + typeId, typeId));

        // store user specified properties
        persistentProperties.forEach((key, value) ->
                configuration.addProperty(PREFIX_PERSISTENT_PROPERTIES + "." + key, value));
    }
public void storeState ( final Configuration configuration ) { Set < String > oldKeys = new HashSet < > ( ) ; configuration . subset ( PREFIX_SELECTED_TYPE_KEY ) . getKeys ( ) . forEachRemaining ( key -> oldKeys . add ( PREFIX_SELECTED_TYPE_KEY + "." + key ) ) ; oldKeys . forEach ( configuration :: clearProperty ) ; selectedTypes . forEach ( typeId -> configuration . addProperty ( PREFIX_SELECTED_TYPE_KEY + "." + typeId , typeId ) ) ; persistentProperties . forEach ( ( key , value ) -> configuration . addProperty ( PREFIX_PERSISTENT_PROPERTIES + "." + key , value ) ) ; }
Store <code>persistentProperties</code> and any hard coded fields in an apache config object for propagation to
spark executors.

@param configuration the apache config object that will be propagated