[doc][fix](multi-catalog) Add multi-catalog es doc (#13429)

1. Add multicatalog es doc
2. Modify es unsigned_long mapping to largeint.
3. getHost add pre judge logic.
This commit is contained in:
Stalary
2022-10-19 16:00:13 +08:00
committed by GitHub
parent 29b4d8dcad
commit eeb2b0acdb
5 changed files with 147 additions and 3 deletions

View File

@ -397,8 +397,9 @@ public class EsUtil {
case "integer":
return Type.INT;
case "long":
case "unsigned_long":
return Type.BIGINT;
case "unsigned_long":
return Type.LARGEINT;
case "float":
case "half_float":
return Type.FLOAT;

View File

@ -126,6 +126,9 @@ public class SimpleScheduler {
public static TNetworkAddress getHost(ImmutableMap<Long, Backend> backends,
Reference<Long> backendIdRef)
throws UserException {
if (backends.isEmpty()) {
throw new UserException(SystemInfoService.NO_SCAN_NODE_BACKEND_AVAILABLE_MSG);
}
long id = nextId.getAndIncrement() % backends.size();
Map.Entry<Long, Backend> backendEntry = backends.entrySet().stream().skip(id).filter(
e -> isAvailable(e.getValue())).findFirst().orElse(null);