if (query.getAPIMethod() == HttpMethod.GET || query.getAPIMethod() == HttpMethod.POST ||
query.getAPIMethod() == HttpMethod.PUT) {
final HashMap<String, HashMap<String, Object>> results =
new HashMap<String, HashMap<String, Object>>(tsuids.size());
final TreeBuilder builder = new TreeBuilder(tsdb, tree);
for (String tsuid : tsuids) {
final HashMap<String, Object> tsuid_results =
new HashMap<String, Object>();
try {
final TSMeta meta = TSMeta.getTSMeta(tsdb, tsuid)
.joinUninterruptibly();
// if the meta doesn't exist, we can't process, so just log a
// message to the results and move on to the next TSUID
if (meta == null) {
tsuid_results.put("branch", null);
tsuid_results.put("meta", null);
final ArrayList<String> messages = new ArrayList<String>(1);
messages.add("Unable to locate TSUID meta data");
tsuid_results.put("messages", messages);
results.put(tsuid, tsuid_results);
continue;
}
builder.processTimeseriesMeta(meta, true).joinUninterruptibly();
tsuid_results.put("branch", builder.getRootBranch());
tsuid_results.put("meta", meta);
tsuid_results.put("messages", builder.getTestMessage());
results.put(tsuid, tsuid_results);
} catch (DeferredGroupException e) {
// we want to catch NSU errors and handle them gracefully for
// TSUIDs where they may have been deleted