module Presto::Client::ModelVersions::V303::QueryStats
Public Class Methods
decode(hash)
click to toggle source
# File lib/presto/client/model_versions/303.rb, line 1655 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["executionStartTime"], hash["lastHeartbeat"], hash["endTime"], hash["elapsedTime"], hash["queuedTime"], hash["resourceWaitingTime"], hash["executionTime"], hash["analysisTime"], hash["distributedPlanningTime"], hash["totalPlanningTime"], hash["finishingTime"], hash["totalTasks"], hash["runningTasks"], hash["completedTasks"], hash["totalDrivers"], hash["queuedDrivers"], hash["runningDrivers"], hash["blockedDrivers"], hash["completedDrivers"], hash["cumulativeUserMemory"], hash["userMemoryReservation"], hash["totalMemoryReservation"], hash["peakUserMemoryReservation"], hash["peakTotalMemoryReservation"], hash["peakTaskUserMemory"], hash["peakTaskTotalMemory"], hash["scheduled"], hash["totalScheduledTime"], hash["totalCpuTime"], hash["totalBlockedTime"], hash["fullyBlocked"], hash["blockedReasons"] && hash["blockedReasons"].map {|h| h.downcase.to_sym }, hash["physicalInputDataSize"], hash["physicalInputPositions"], hash["internalNetworkInputDataSize"], hash["internalNetworkInputPositions"], hash["rawInputDataSize"], hash["rawInputPositions"], hash["processedInputDataSize"], hash["processedInputPositions"], hash["outputDataSize"], hash["outputPositions"], hash["physicalWrittenDataSize"], hash["stageGcStatistics"] && hash["stageGcStatistics"].map {|h| StageGcStatistics.decode(h) }, hash["operatorSummaries"] && hash["operatorSummaries"].map {|h| OperatorStats.decode(h) }, ) obj end