public static Map < String , StoreDefinition > getUserStoreDefMapOnNode ( AdminClient adminClient , Integer nodeId ) { List < StoreDefinition > storeDefinitionList = adminClient . metadataMgmtOps . getRemoteStoreDefList ( nodeId ) . getValue ( ) ; Map < String , StoreDefinition > storeDefinitionMap = Maps . newHashMap ( ) ; for ( StoreDefinition storeDefinition : storeDefinitionList ) { storeDefinitionMap . put ( storeDefinition . getName ( ) , storeDefinition ) ; } return storeDefinitionMap ; }
Utility function that fetches user defined store definitions