private void processColumnValuesForOneChunk(int chunkCountForSegment) throws IOException {
  deleteStorePath();
  CarbonDictionaryWriterImpl writer=prepareWriter();
  writer.write(convertStringListToByteArray(dataSet1));
  writer.close();
  writer.commit();
  long end_offset=CarbonUtil.getFileSize(this.dictionaryFilePath);
  List<byte[]> dictionaryData=readDictionaryFile(0L,0L);
  List<String> actual=convertByteArrayListToStringValueList(dictionaryData);
  compareDictionaryData(actual,dataSet1);
  List<CarbonDictionaryColumnMetaChunk> carbonDictionaryColumnMetaChunks=readDictionaryMetadataFile();
  assertTrue(1 == carbonDictionaryColumnMetaChunks.size());
  long start_offset=0L;
  CarbonDictionaryColumnMetaChunk expected=new CarbonDictionaryColumnMetaChunk(1,2,start_offset,end_offset,1);
  for (  CarbonDictionaryColumnMetaChunk chunk : carbonDictionaryColumnMetaChunks) {
    validateDictionaryMetadata(chunk,expected);
  }
}

private void processColumnValuesForOneChunk ( int chunkCountForSegment ) throws IOException { deleteStorePath ( ) ; CarbonDictionaryWriterImpl writer = prepareWriter ( ) ; writer . write ( convertStringListToByteArray ( dataSet1 ) ) ; writer . close ( ) ; writer . commit ( ) ; long end_offset = CarbonUtil . getFileSize ( this . dictionaryFilePath ) ; List < byte [ ] > dictionaryData = readDictionaryFile ( 0L , 0L ) ; List < String > actual = convertByteArrayListToStringValueList ( dictionaryData ) ; compareDictionaryData ( actual , dataSet1 ) ; List < CarbonDictionaryColumnMetaChunk > carbonDictionaryColumnMetaChunks = readDictionaryMetadataFile ( ) ; assertTrue ( 1 == carbonDictionaryColumnMetaChunks . size ( ) ) ; long start_offset = 0L ; CarbonDictionaryColumnMetaChunk expected = new CarbonDictionaryColumnMetaChunk ( 1 , 2 , start_offset , end_offset , 1 ) ; for ( CarbonDictionaryColumnMetaChunk chunk : carbonDictionaryColumnMetaChunks ) { validateDictionaryMetadata ( chunk , expected ) ; } }
this method will test the functionality of writing and reading one dictionary chunk
