Package dev.frostlake.metastore.model
Class Warehouse
java.lang.Object
dev.frostlake.metastore.model.Warehouse
- All Implemented Interfaces:
Taggable
Represents a Snowflake Compute Warehouse
Warehouses provide compute resources for query execution
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintintintgetName()getOwner()intgetSize()getState()intintgetTagValue(String tagName) The value of the named tag on this object, ornullif not set.All tag associations on this object (tag name -> value).longlongbooleanisActive()booleanbooleanbooleanbooleanisParameterSetOnWarehouse(String parameterName) Whether the warehouse set this parameter itself — a WAREHOUSE level rather than a blank one.voidmarkParameterSet(String parameterName) Record thatparameterNamewas given on the warehouse rather than left at its default.voidrecordQueryExecution(QueryExecution execution) voidvoidresume(boolean ifSuspended) ALTER WAREHOUSE … RESUME.voidsetAutoResume(boolean autoResume) voidsetAutoSuspendSeconds(Integer autoSuspendSeconds) Null after UNSET AUTO_SUSPEND: live leaves the cell empty, not at the default.voidsetComment(String comment) voidsetEnableQueryAcceleration(boolean v) voidsetGeneration(String generation) voidsetInitiallySuspended(boolean initiallySuspended) voidsetMaxClusterCount(int maxClusterCount) voidsetMaxConcurrencyLevel(int maxConcurrencyLevel) voidsetMinClusterCount(int minClusterCount) voidvoidvoidsetResourceMonitor(String resourceMonitor) voidsetScalingPolicy(ScalingPolicy scalingPolicy) voidsetSize(WarehouseSize size) voidsetState(WarehouseState state) voidvoidsetStatementTimeoutSeconds(int s) voidAssociate (or overwrite) a tag value on this object;tagNameis the canonical upper-cased tag name.voidsetWarehouseType(String warehouseType) voidstart()voidsuspend()ALTER WAREHOUSE … SUSPEND.voidRemove a tag association from this object (no-op if absent).
-
Constructor Details
-
Warehouse
-
-
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
-
getName
-
getOwner
-
setOwner
-
setTag
Description copied from interface:TaggableAssociate (or overwrite) a tag value on this object;tagNameis the canonical upper-cased tag name. -
unsetTag
Description copied from interface:TaggableRemove a tag association from this object (no-op if absent). -
getTagValue
Description copied from interface:TaggableThe value of the named tag on this object, ornullif not set.- Specified by:
getTagValuein interfaceTaggable
-
getTagValues
Description copied from interface:TaggableAll tag associations on this object (tag name -> value). Named getTagValues to avoid clashing with Schema.getTags().- Specified by:
getTagValuesin interfaceTaggable
-
getSize
-
setSize
-
getState
-
setState
-
getScalingPolicy
-
setScalingPolicy
-
getMinClusterCount
public int getMinClusterCount() -
setMinClusterCount
public void setMinClusterCount(int minClusterCount) -
getMaxClusterCount
public int getMaxClusterCount() -
setMaxClusterCount
public void setMaxClusterCount(int maxClusterCount) -
getAutoSuspendSeconds
-
setAutoSuspendSeconds
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
-
getLastStateChange
-
getQueryHistory
-
getTotalQueriesExecuted
public long getTotalQueriesExecuted() -
getTotalCreditsUsed
public long getTotalCreditsUsed() -
getComment
-
setComment
-
getWarehouseType
-
setWarehouseType
-
isInitiallySuspended
public boolean isInitiallySuspended() -
setInitiallySuspended
public void setInitiallySuspended(boolean initiallySuspended) -
getResourceMonitor
-
setResourceMonitor
-
markParameterSet
Record thatparameterNamewas given on the warehouse rather than left at its default. -
isParameterSetOnWarehouse
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
-
setGeneration
-
rename
-
isActive
public boolean isActive() -
canExecuteQueries
public boolean canExecuteQueries()
-