C++ Map inserts pairs with duplicated key

I’m trying to use map with MAC as key. I wrote user defined class for MAC and overload operator< to use in map. class Mac { public: uint8_t addr[6]; std::string to_string() const { char mac_to_string[18]; sprintf(mac_to_string, “%02X:%02X:%02X:%02X:%02X:%02X”, addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); return std::string(mac_to_string); } Mac &operator=(const Mac &rhs) { memcpy(addr, rhs.addr, sizeof(Mac)); return…

Details

How to enable JMX port for Namenode and Datanode in Hadoop from Ambari

I am using HDP 3.1.1. I am trying to enable JMX for HDFS by following the below link. https://docs.cloudera.com/HDPDocuments/HDP3/HDP-3.1.4/data-storage/content/using_jmx_for_accessing_hdfs_metrics.html After restarting the HDFS. again the changes are removing automatically. I tried to add the same lines from Ambari as well At that time HDFS itself is not starting.

Details