Accelerating SPARQL queries by exploiting hash-based locality and adaptive partitioning