/** * <code>optional string source = 2;</code> */ public Builder clearSource() { bitField0_ = (bitField0_ & ~0x00000002); source_ = getDefaultInstance().getSource(); onChanged(); return this; } /**
/** * Registers new configuration information. * * @param address the node address * @param configList the configuration of this node */ public synchronized void registerNewConf(Address address, List<ConfigProperty> configList) { Preconditions.checkNotNull(address, "address should not be null"); Preconditions.checkNotNull(configList, "configuration list should not be null"); // Instead of recording property name, we record property key. mConfMap.put(address, configList.stream().map(c -> new ConfigRecord() .setKey(toPropertyKey(c.getName())).setSource(c.getSource()) .setValue(c.getValue())).collect(Collectors.toList())); mLostNodes.remove(address); for (Runnable function : mChangeListeners) { function.run(); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasSource()) { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof alluxio.grpc.ConfigProperty)) { return super.equals(obj); } alluxio.grpc.ConfigProperty other = (alluxio.grpc.ConfigProperty) obj; boolean result = true; result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); } result = result && (hasSource() == other.hasSource()); if (hasSource()) { result = result && getSource() .equals(other.getSource()); } result = result && (hasValue() == other.hasValue()); if (hasValue()) { result = result && getValue() .equals(other.getValue()); } result = result && unknownFields.equals(other.unknownFields); return result; }
output.append(String.format("%s=%s", property.getName(), value)); if (cmd.hasOption(SOURCE_OPTION_NAME)) { output.append(String.format(" (%s)", property.getSource())); } else { if (cmd.hasOption(SOURCE_OPTION_NAME)) { System.out.println(property.getSource()); } else if (cmd.hasOption(UNIT_OPTION_NAME)) { String arg = cmd.getOptionValue(UNIT_OPTION_NAME).toUpperCase();
/** * Gets Web UI ServerConfiguration page data. * * @return the response object */ @GET @Path(WEBUI_CONFIG) @ReturnType("alluxio.wire.MasterWebUIConfiguration") public Response getWebUIConfiguration() { return RestUtils.call(() -> { MasterWebUIConfiguration response = new MasterWebUIConfiguration(); response.setWhitelist(mFileSystemMaster.getWhiteList()); TreeSet<Triple<String, String, String>> sortedProperties = new TreeSet<>(); Set<String> alluxioConfExcludes = Sets.newHashSet(PropertyKey.MASTER_WHITELIST.toString()); for (ConfigProperty configProperty : mMetaMaster .getConfiguration(GetConfigurationPOptions.newBuilder().setRawValue(true).build())) { String confName = configProperty.getName(); if (!alluxioConfExcludes.contains(confName)) { sortedProperties.add(new ImmutableTriple<>(confName, ConfigurationUtils.valueAsString(configProperty.getValue()), configProperty.getSource())); } } response.setConfiguration(sortedProperties); return response; }, ServerConfiguration.global()); }
.setSource(workerWarnProp.getSource()).setValue("WrongValue").build(); mRecordOne.registerNewConf(addressOne, Arrays.asList(masterEnforceProp, wrongWorkerWarnProp)); checkResults(0, 1, ConfigStatus.WARN); .setSource(masterEnforceProp.getSource()).setValue("WrongValue").build(); mRecordTwo.registerNewConf(addressTwo, Arrays.asList(wrongMasterEnforceProp, workerWarnProp)); checkResults(1, 1, ConfigStatus.FAILED); .setSource(serverEnforceProp.getSource()).setValue("WrongValue").build(); mRecordOne.registerNewConf(addressOne, Arrays.asList(masterEnforceProp, workerWarnProp, serverEnforceProp));