module PrestoLegacy::Client::Models::StageStats
Public Class Methods
decode(hash)
click to toggle source
# File lib/presto_legacy/client/models.rb, line 1173 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["schedulingComplete"], hash["getSplitDistribution"] && DistributionSnapshot.decode(hash["getSplitDistribution"]), hash["scheduleTaskDistribution"] && DistributionSnapshot.decode(hash["scheduleTaskDistribution"]), hash["addSplitDistribution"] && DistributionSnapshot.decode(hash["addSplitDistribution"]), hash["totalTasks"], hash["runningTasks"], hash["completedTasks"], hash["totalDrivers"], hash["queuedDrivers"], hash["runningDrivers"], hash["completedDrivers"], hash["cumulativeMemory"], hash["totalMemoryReservation"], 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["processedInputDataSize"], hash["processedInputPositions"], hash["outputDataSize"], hash["outputPositions"], ) obj end