code: protected Set<ClusterNode.GrantId> deleteAppFromNode(
        ClusterNode node, ResourceType type) {
      synchronized (node) {
        if (node.deleted) {
          return null;
        }
  
        nameToApps.remove(node.getName());
        RunnableIndices r = typeToIndices.get(type);
        r.deleteRunnable(node);
  
        return node.getGrants(type);
      }
    }
docs: Remove one application type from the node. Happens when the daemon
  responsible for handling this application type on the node goes down
  @param node the node
  @param type the type of the resource
  @return the list of grants that belonged to the application on this node