public Builder fromProtoRequest(LlapDaemonProtocolProtos.EvictEntityRequestProto protoRequest) {
        entities.clear();
        String dbName = protoRequest.getDbName().toLowerCase();

        Map<String, Set<LinkedHashMap<String, String>>> entitiesInDb = new HashMap<>();
        List<LlapDaemonProtocolProtos.TableProto> tables = protoRequest.getTableList();

        if (tables != null && !tables.isEmpty()) {
          for (LlapDaemonProtocolProtos.TableProto table : tables) {
            String dbAndTableName =
                (new StringBuilder().append(dbName).append('.').append(table.getTableName())).toString().toLowerCase();

            if (table.getPartValCount() == 0) {
              entitiesInDb.put(dbAndTableName, null);
              continue;
            }
            Set<LinkedHashMap<String, String>> partitions = new HashSet<>();
            LinkedHashMap<String, String> partDesc = new LinkedHashMap<>();

            for (int valIx = 0; valIx < table.getPartValCount(); ++valIx) {
              int keyIx = valIx % table.getPartKeyCount();

              partDesc.put(table.getPartKey(keyIx).toLowerCase(), table.getPartVal(valIx));

              if (keyIx == table.getPartKeyCount() - 1) {
                partitions.add(partDesc);
                partDesc = new LinkedHashMap<>();
              }
            }

            entitiesInDb.put(dbAndTableName, partitions);
          }
        }
        entities.put(dbName, entitiesInDb);
        return this;
      }
Translate from Protobuf request.
@param protoRequest
@return the builder itself.
ql/src/java/org/apache/hadoop/hive/llap/ProactiveEviction.java