private void refreshIndexForDimensionKey(String rowId){
  try {
    String allValuesKey=DimensionStoreKeyUtils.getAllValuesKey();
    String dimensionRows=keyValueStore.get(allValuesKey);
    Set<String> dimensionRowsSet=new LinkedHashSet<>();
    if (dimensionRows != null) {
      dimensionRowsSet.addAll(Arrays.asList(objectMapper.readValue(dimensionRows,String[].class)));
    }
    dimensionRowsSet.add(rowId);
    String dimRows=objectMapper.writeValueAsString(dimensionRowsSet);
    keyValueStore.put(allValuesKey,dimRows);
  }
 catch (  IOException e) {
    LOG.error("Exception while adding dimension entry in KeyValueStore : {}",e);
    throw new RuntimeException(e);
  }
}

private void refreshIndexForDimensionKey ( String rowId ) { try { String allValuesKey = DimensionStoreKeyUtils . getAllValuesKey ( ) ; String dimensionRows = keyValueStore . get ( allValuesKey ) ; Set < String > dimensionRowsSet = new LinkedHashSet < > ( ) ; if ( dimensionRows != null ) { dimensionRowsSet . addAll ( Arrays . asList ( objectMapper . readValue ( dimensionRows , String [ ] . class ) ) ) ; } dimensionRowsSet . add ( rowId ) ; String dimRows = objectMapper . writeValueAsString ( dimensionRowsSet ) ; keyValueStore . put ( allValuesKey , dimRows ) ; } catch ( IOException e ) { LOG . error ( "Exception while adding dimension entry in KeyValueStore : {}" , e ) ; throw new RuntimeException ( e ) ; } }
this method updates the set of values corresponding to a dimension . < p > eg : for dimension dim1 there were 3 rows with id ' s v1 , v2 , v3 and desc ' s value1 , value2 , value3 respectively the keyvaluestore would look like all_values_key - > [ id_v1_row_key , id_v2_row_key , id_v3_row_key ] < p > after this refreshindexfordimensionkey call , given a new row id : id_v4_row_key , it would look like all_values_key - > [ id_v1_row_key , id_v2_row_key , id_v3_row_key , id_v4_row_key ] < p > this is useful to list all values for & lt ; blah & gt ; / dim1 / values endpoint
