/** * Creates a new instance of {@link InconsistentProperty} from proto representation. * * @param inconsistentProperty the proto representation of an inconsistent property * @return the instance */ public static InconsistentProperty fromProto( alluxio.grpc.InconsistentProperty inconsistentProperty) { return new InconsistentProperty(inconsistentProperty); } }
if (entry.getValue().size() >= 2) { PropertyKey key = entry.getKey(); InconsistentProperty inconsistentProperty = new InconsistentProperty() .setName(key.getName()).setValues(entry.getValue()); Scope scope = key.getScope().equals(Scope.ALL) ? Scope.SERVER : key.getScope();
/** * @return the created inconsistent property */ private static InconsistentProperty createInconsistentProperty() { Map<Optional<String>, List<String>> values = new HashMap<>(); values.put(Optional.ofNullable(null), Arrays.asList("workerHostname1:workerPort", "workerHostname2:workerPort")); values.put(Optional.of("some_value"), Arrays.asList("masterHostname1:port", "masterHostname2:port")); return new InconsistentProperty().setName("my_key").setValues(values); }
/** * Creates a new instance of {@link InconsistentProperty} from thrift representation. * * @param inconsistentProperty the thrift representation of an inconsistent property * @return the instance */ public static InconsistentProperty fromThrift( alluxio.thrift.InconsistentProperty inconsistentProperty) { return new InconsistentProperty(inconsistentProperty); } }
if (entry.getValue().size() >= 2) { PropertyKey key = entry.getKey(); InconsistentProperty inconsistentProperty = new InconsistentProperty() .setName(key.getName()).setValues(entry.getValue()); Scope scope = key.getScope().equals(Scope.ALL) ? Scope.SERVER : key.getScope();