def update_partition(nmap, node)
      amap = nil
      copied = false

      while partition = get_next
        node_array = nmap[partition.namespace]

        if !node_array
          if !copied
            # Make shallow copy of map.
            amap = {}
            nmap.each {|k, v| amap[k] = v}
            copied = true
          end

          node_array = Atomic.new(Array.new(Aerospike::Node::PARTITIONS))
          amap[partition.namespace] = node_array
        end

        Aerospike.logger.debug("#{partition.to_s}, #{node.name}")
        node_array.update{|v| v[partition.partition_id] = node; v }
      end

      copied ? amap : nil
    end
def update_partition(nmap, node)
      amap = nil
      copied = false

      while partition = get_next
        node_array = nmap[partition.namespace]

        if !node_array
          if !copied
            # Make shallow copy of map.
            amap = {}
            nmap.each {|k, v| amap[k] = v}
            copied = true
          end

          node_array = Atomic.new(Array.new(Aerospike::Node::PARTITIONS))
          amap[partition.namespace] = node_array
        end

        Aerospike.logger.debug("#{partition.to_s}, #{node.name}")
        node_array.update{|v| v[partition.partition_id] = node; v }
      end

      copied ? amap : nil
    end
:nodoc: