public BytesBytesMultiHashMap getHashMapFromDisk(int rowCount)
        throws IOException, ClassNotFoundException {
      if (hashMapSpilledOnCreation) {
        return new BytesBytesMultiHashMap(rowCount, loadFactor, wbSize, -1);
      } else {
        InputStream inputStream = Files.newInputStream(hashMapLocalPath);
        com.esotericsoftware.kryo.kryo5.io.Input input = new com.esotericsoftware.kryo.kryo5.io.Input(inputStream);
        Kryo kryo = SerializationUtilities.borrowKryo();
        BytesBytesMultiHashMap restoredHashMap = null;
        try {
          restoredHashMap = kryo.readObject(input, BytesBytesMultiHashMap.class);
        } finally {
          SerializationUtilities.releaseKryo(kryo);
        }

        if (rowCount > 0) {
          restoredHashMap.expandAndRehashToTarget(rowCount);
        }

        // some bookkeeping
        rowsOnDisk = 0;
        hashMapOnDisk = false;

        input.close();
        inputStream.close();
        Files.delete(hashMapLocalPath);
        return restoredHashMap;
      }
    }
This class encapsulates the triplet together since they are closely related to each other
The triplet: hashmap (either in memory or on disk), small table container, big table container
ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java