private String getLexicalErrorMessage(Cell cell) {
    StringBuilder sb = new StringBuilder();
    sb.append("Added a key not lexically larger than previous. Current cell = ");
    sb.append(cell);
    sb.append(", lastCell = ");
    sb.append(lastCell);
    // file context includes HFile path and optionally table and CF of file being written
    sb.append("fileContext=");
    sb.append(hFileContext);
    return sb.toString();
  }
Checks that the given Cell's key does not violate the key order.
@param cell Cell whose key to check.
@return true if the key is duplicate
@throws IOException if the key or the key order is wrong
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileWriterImpl.java