module Presto::Client::ModelVersions::V0_178::DriverStats
Public Class Methods
decode(hash)
click to toggle source
# File lib/presto/client/model_versions/0.178.rb, line 509 def decode(hash) unless hash.is_a?(Hash) raise TypeError, "Can't convert #{hash.class} to Hash" end obj = allocate obj.send(:initialize_struct, hash["createTime"], hash["startTime"], hash["endTime"], hash["queuedTime"], hash["elapsedTime"], hash["memoryReservation"], hash["peakMemoryReservation"], hash["systemMemoryReservation"], hash["totalScheduledTime"], hash["totalCpuTime"], hash["totalUserTime"], hash["totalBlockedTime"], hash["fullyBlocked"], hash["blockedReasons"] && hash["blockedReasons"].map {|h| h.downcase.to_sym }, hash["rawInputDataSize"], hash["rawInputPositions"], hash["rawInputReadTime"], hash["processedInputDataSize"], hash["processedInputPositions"], hash["outputDataSize"], hash["outputPositions"], hash["operatorStats"] && hash["operatorStats"].map {|h| OperatorStats.decode(h) }, ) obj end