SegmentProperties { public Map<Integer, Integer> getMeasuresOrdinalToBlockMapping() { return measuresOrdinalToBlockMapping; } SegmentProperties(List<ColumnSchema> columnsInTable, int[] columnCardinality); int[] getDimensionColumnsValueSize(); KeyGenerator getDimensionKeyGenerator(); List<CarbonDimension> getDimensions(); List<CarbonDimension> getComplexDimensions(); List<CarbonMeasure> getMeasures(); int[] getDimColumnsCardinality(); int[] getComplexDimColumnCardinality(); Map<Integer, Integer> getDimensionOrdinalToBlockMapping(); Map<Integer, Integer> getMeasuresOrdinalToBlockMapping(); int[] getEachDimColumnValueSize(); int[] getEachComplexDimColumnValueSize(); ColumnarSplitter getFixedLengthKeySplitter(); Map<Integer, KeyGenerator> getColumnGroupAndItsKeygenartor(); int getNumberOfNoDictionaryDimension(); int[][] getColumnGroups(); ColumnGroupModel getColumnGroupModel(); int getColumnGroupMdKeyOrdinal(int colGrpId, int ordinal); int getNoOfColumnsInColumnGroup(int colGrpId); Set<Integer> getDimensionOrdinalForBlock(int blockIndex);  }
@Test public void testBlockMetadataHasProperMeasureBlockMapping() { Map<Integer, Integer> measureOrdinalToBlockMapping = new HashMap<Integer, Integer>(); measureOrdinalToBlockMapping.put(0, 0); measureOrdinalToBlockMapping.put(1, 1); Map<Integer, Integer> measureOrdinalToBlockMappingActual = blockMetadataInfos.getMeasuresOrdinalToBlockMapping(); assertEquals(measureOrdinalToBlockMapping.size(), measureOrdinalToBlockMappingActual.size()); Iterator<Entry<Integer, Integer>> iterator = measureOrdinalToBlockMapping.entrySet().iterator(); while (iterator.hasNext()) { Entry<Integer, Integer> next = iterator.next(); Integer integer = measureOrdinalToBlockMappingActual.get(next.getKey()); if (integer != next.getValue()) { assertTrue(false); } } assertTrue(true); }