use of io.dingodb.store.row.metadata.StoreLabel in project dingo by dingodb.
the class RowStoreMetaAdaptorImpl method mapping.
public Store mapping(ExecutorView executorView) {
if (executorView == null) {
return null;
}
Store store = new Store();
store.setEndpoint(new Endpoint(executorView.location().getHost(), executorView.location().getPort()));
store.setId(executorView.resourceId().toString());
store.setLabels(executorView.labels().entrySet().stream().map(e -> new StoreLabel(e.getKey(), e.getValue())).collect(Collectors.toList()));
store.setRegions(executorView.apps().stream().map(id -> scheduleMetaAdaptor.namespace().<RegionApp>getApp(id)).map(this::mapping).collect(Collectors.toList()));
return store;
}
Aggregations