HDFS-5673: binary search