code: public void reset() {
  		int numBuckets = bucketSegments.size() * numBucketsPerSegment;
  		this.log2NumBuckets = MathUtils.log2strict(numBuckets);
  		this.numBucketsMask = (1 << MathUtils.log2strict(numBuckets)) - 1;
  		this.numBucketsMask2 = (1 << MathUtils.log2strict(numBuckets >> 1)) - 1;
  		this.growthThreshold = (int) (numBuckets * LOAD_FACTOR);
  		//reset the record segments.
  		recordArea.reset();
  		resetBucketSegments(bucketSegments);
  		numElements = 0;
  		destructiveIterator = null;
  		LOG.info("reset BytesHashMap with record memory segments {}, {} in bytes, init allocating {} for bucket area.",
  				freeMemorySegments.size(), freeMemorySegments.size() * segmentSize, bucketSegments.size());
  	}
docs: reset the map's record and bucket area's memory segments for reusing.