Class Warehouse

java.lang.Object
dev.frostlake.metastore.model.Warehouse
All Implemented Interfaces:
Taggable

public class Warehouse extends Object implements Taggable
Represents a Snowflake Compute Warehouse Warehouses provide compute resources for query execution
  • Constructor Details

  • Method Details

    • start

      public void start()
    • suspend

      public void suspend()
      ALTER WAREHOUSE … SUSPEND. Suspending a warehouse that is already suspended is an error (live-verified wording), unlike a compute pool's idempotent suspend.
    • resume

      public void resume(boolean ifSuspended)
      ALTER WAREHOUSE … RESUME. Resuming a warehouse that is already running is an error, unless the statement said IF SUSPENDED (live-verified wording).
    • recordQueryExecution

      public void recordQueryExecution(QueryExecution execution)
    • getName

      public String getName()
    • getOwner

      public String getOwner()
    • setOwner

      public void setOwner(String owner)
    • setTag

      public void setTag(String tagName, String value)
      Description copied from interface: Taggable
      Associate (or overwrite) a tag value on this object; tagName is the canonical upper-cased tag name.
      Specified by:
      setTag in interface Taggable
    • unsetTag

      public void unsetTag(String tagName)
      Description copied from interface: Taggable
      Remove a tag association from this object (no-op if absent).
      Specified by:
      unsetTag in interface Taggable
    • getTagValue

      public String getTagValue(String tagName)
      Description copied from interface: Taggable
      The value of the named tag on this object, or null if not set.
      Specified by:
      getTagValue in interface Taggable
    • getTagValues

      public Map<String,String> getTagValues()
      Description copied from interface: Taggable
      All tag associations on this object (tag name -> value). Named getTagValues to avoid clashing with Schema.getTags().
      Specified by:
      getTagValues in interface Taggable
    • getSize

      public WarehouseSize getSize()
    • setSize

      public void setSize(WarehouseSize size)
    • getState

      public WarehouseState getState()
    • setState

      public void setState(WarehouseState state)
    • getScalingPolicy

      public ScalingPolicy getScalingPolicy()
    • setScalingPolicy

      public void setScalingPolicy(ScalingPolicy scalingPolicy)
    • getMinClusterCount

      public int getMinClusterCount()
    • setMinClusterCount

      public void setMinClusterCount(int minClusterCount)
    • getMaxClusterCount

      public int getMaxClusterCount()
    • setMaxClusterCount

      public void setMaxClusterCount(int maxClusterCount)
    • getAutoSuspendSeconds

      public Integer getAutoSuspendSeconds()
    • setAutoSuspendSeconds

      public void setAutoSuspendSeconds(Integer autoSuspendSeconds)
      Null after UNSET AUTO_SUSPEND: live leaves the cell empty, not at the default.
    • isAutoResume

      public boolean isAutoResume()
    • setAutoResume

      public void setAutoResume(boolean autoResume)
    • getCreatedAt

      public LocalDateTime getCreatedAt()
    • getLastStateChange

      public LocalDateTime getLastStateChange()
    • getQueryHistory

      public List<QueryExecution> getQueryHistory()
    • getTotalQueriesExecuted

      public long getTotalQueriesExecuted()
    • getTotalCreditsUsed

      public long getTotalCreditsUsed()
    • getComment

      public String getComment()
    • setComment

      public void setComment(String comment)
    • getWarehouseType

      public String getWarehouseType()
    • setWarehouseType

      public void setWarehouseType(String warehouseType)
    • isInitiallySuspended

      public boolean isInitiallySuspended()
    • setInitiallySuspended

      public void setInitiallySuspended(boolean initiallySuspended)
    • getResourceMonitor

      public String getResourceMonitor()
    • setResourceMonitor

      public void setResourceMonitor(String resourceMonitor)
    • markParameterSet

      public void markParameterSet(String parameterName)
      Record that parameterName was given on the warehouse rather than left at its default.
    • isParameterSetOnWarehouse

      public boolean isParameterSetOnWarehouse(String parameterName)
      Whether the warehouse set this parameter itself — a WAREHOUSE level rather than a blank one.
    • getMaxConcurrencyLevel

      public int getMaxConcurrencyLevel()
    • setMaxConcurrencyLevel

      public void setMaxConcurrencyLevel(int maxConcurrencyLevel)
    • getStatementQueuedTimeoutSeconds

      public int getStatementQueuedTimeoutSeconds()
    • setStatementQueuedTimeoutSeconds

      public void setStatementQueuedTimeoutSeconds(int s)
    • getStatementTimeoutSeconds

      public int getStatementTimeoutSeconds()
    • setStatementTimeoutSeconds

      public void setStatementTimeoutSeconds(int s)
    • isEnableQueryAcceleration

      public boolean isEnableQueryAcceleration()
    • setEnableQueryAcceleration

      public void setEnableQueryAcceleration(boolean v)
    • getQueryAccelerationMaxScaleFactor

      public int getQueryAccelerationMaxScaleFactor()
    • setQueryAccelerationMaxScaleFactor

      public void setQueryAccelerationMaxScaleFactor(int v)
    • getGeneration

      public String getGeneration()
    • setGeneration

      public void setGeneration(String generation)
    • rename

      public void rename(String newName)
    • isActive

      public boolean isActive()
    • canExecuteQueries

      public boolean canExecuteQueries()