[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:
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user