Search in sources :

Example 1 with OrderedStringMapEntry

use of com.facebook.buck.distributed.thrift.OrderedStringMapEntry in project buck by facebook.

the class DistBuildCellIndexer method dumpConfig.

private static BuildJobStateBuckConfig dumpConfig(BuckConfig buckConfig) {
    BuildJobStateBuckConfig jobState = new BuildJobStateBuckConfig();
    jobState.setUserEnvironment(buckConfig.getEnvironment());
    Map<String, List<OrderedStringMapEntry>> rawConfig = Maps.transformValues(buckConfig.getRawConfigForDistBuild(), input -> {
        List<OrderedStringMapEntry> result = new ArrayList<>();
        for (Map.Entry<String, String> entry : input.entrySet()) {
            result.add(new OrderedStringMapEntry(entry.getKey(), entry.getValue()));
        }
        return result;
    });
    jobState.setRawBuckConfig(rawConfig);
    jobState.setArchitecture(buckConfig.getArchitecture().name());
    jobState.setPlatform(buckConfig.getPlatform().name());
    return jobState;
}
Also used : OrderedStringMapEntry(com.facebook.buck.distributed.thrift.OrderedStringMapEntry) BuildJobStateBuckConfig(com.facebook.buck.distributed.thrift.BuildJobStateBuckConfig) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

BuildJobStateBuckConfig (com.facebook.buck.distributed.thrift.BuildJobStateBuckConfig)1 OrderedStringMapEntry (com.facebook.buck.distributed.thrift.OrderedStringMapEntry)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1