presto-jmx/src/main/java/io/prestosql/plugin/jmx/JmxRecordSetProvider.java/JmxRecordSetProvider/getAttributes
class JmxRecordSetProvider:    private ImmutableMap<String, Optional<Object>> getAttributes(Set<String> uniqueColumnNames, String name)
            throws JMException
    {
        ObjectName objectName = new ObjectName(name);

        String[] columnNamesArray = uniqueColumnNames.toArray(new String[uniqueColumnNames.size()]);

        ImmutableMap.Builder<String, Optional<Object>> attributes = ImmutableMap.builder();
        for (Attribute attribute : mbeanServer.getAttributes(objectName, columnNamesArray).asList()) {
            attributes.put(attribute.getName(), Optional.ofNullable(attribute.getValue()));
        }
        return attributes.build();
    }