コード例 #1
0
 @Override
 public void writeDictionaryPage(DictionaryPage dictionaryPage) throws IOException {
   if (this.dictionaryPage != null) {
     throw new ParquetEncodingException("Only one dictionary page is allowed");
   }
   BytesInput dictionaryBytes = dictionaryPage.getBytes();
   int uncompressedSize = (int) dictionaryBytes.size();
   BytesInput compressedBytes = compressor.compress(dictionaryBytes);
   this.dictionaryPage =
       new DictionaryPage(
           BytesInput.copy(compressedBytes),
           uncompressedSize,
           dictionaryPage.getDictionarySize(),
           dictionaryPage.getEncoding());
 }