@@ -110,7 +110,7 @@ folly::Optional<std::string> ConfigBase::setValue(
110110 propertyName);
111111 auto oldValue = config_->get <std::string>(propertyName);
112112 config_->set (propertyName, value);
113- if (oldValue.hasValue ()) {
113+ if (oldValue.has_value ()) {
114114 return oldValue;
115115 }
116116 return registeredProps_[propertyName];
@@ -372,7 +372,7 @@ SystemConfig::remoteFunctionServerLocation() const {
372372 // First check if there is a UDS path registered. If there's one, use it.
373373 auto remoteServerUdsPath =
374374 optionalProperty (kRemoteFunctionServerThriftUdsPath );
375- if (remoteServerUdsPath.hasValue ()) {
375+ if (remoteServerUdsPath.has_value ()) {
376376 return folly::SocketAddress::makeFromPath (remoteServerUdsPath.value ());
377377 }
378378
@@ -382,13 +382,13 @@ SystemConfig::remoteFunctionServerLocation() const {
382382 auto remoteServerPort =
383383 optionalProperty<uint16_t >(kRemoteFunctionServerThriftPort );
384384
385- if (remoteServerPort.hasValue ()) {
385+ if (remoteServerPort.has_value ()) {
386386 // Fallback to localhost if address is not specified.
387- return remoteServerAddress.hasValue ()
387+ return remoteServerAddress.has_value ()
388388 ? folly::
389389 SocketAddress{remoteServerAddress.value (), remoteServerPort.value ()}
390390 : folly::SocketAddress{" ::1" , remoteServerPort.value ()};
391- } else if (remoteServerAddress.hasValue ()) {
391+ } else if (remoteServerAddress.has_value ()) {
392392 VELOX_FAIL (
393393 " Remote function server port not provided using '{}'." ,
394394 kRemoteFunctionServerThriftPort );
@@ -959,15 +959,15 @@ int NodeConfig::prometheusExecutorThreads() const {
959959 static constexpr int
960960 kNodePrometheusExecutorThreadsDefault = 2 ;
961961 auto resultOpt = optionalProperty<int >(kNodePrometheusExecutorThreads );
962- if (resultOpt.hasValue ()) {
962+ if (resultOpt.has_value ()) {
963963 return resultOpt.value ();
964964 }
965965 return kNodePrometheusExecutorThreadsDefault ;
966966}
967967
968968std::string NodeConfig::nodeId () const {
969969 auto resultOpt = optionalProperty (kNodeId );
970- if (resultOpt.hasValue ()) {
970+ if (resultOpt.has_value ()) {
971971 return resultOpt.value ();
972972 }
973973 // Generate the nodeId which must be a UUID. nodeId must be a singleton.
@@ -985,7 +985,7 @@ std::string NodeConfig::nodeInternalAddress(
985985 auto resultOpt = optionalProperty (kNodeInternalAddress );
986986 // / node.ip(kNodeIp) is legacy config replaced with node.internal-address, but
987987 // / still valid config in Presto, so handling both.
988- if (!resultOpt.hasValue ()) {
988+ if (!resultOpt.has_value ()) {
989989 resultOpt = optionalProperty (kNodeIp );
990990 }
991991 if (resultOpt.has_value ()) {
0 commit comments