public class SessionStateUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SessionStateUtil.CommitInfo
Container class for job commit information.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
addCommitInfo(org.apache.hadoop.conf.Configuration conf,
String tableName,
String jobId,
int taskNum,
Map<String,String> additionalProps) |
static boolean |
addResource(org.apache.hadoop.conf.Configuration conf,
String key,
Object resource) |
static void |
addResourceOrThrow(org.apache.hadoop.conf.Configuration conf,
String key,
Object resource) |
static Optional<Map<String,SessionStateUtil.CommitInfo>> |
getCommitInfo(org.apache.hadoop.conf.Configuration conf,
String tableName) |
static Optional<String> |
getProperty(org.apache.hadoop.conf.Configuration conf,
String key) |
static Optional<QueryState> |
getQueryState(org.apache.hadoop.conf.Configuration conf) |
static Optional<Object> |
getResource(org.apache.hadoop.conf.Configuration conf,
String key) |
public static Optional<Object> getResource(org.apache.hadoop.conf.Configuration conf, String key)
conf
- Configuration object used for getting the query state, should contain the query idkey
- The resource identifierpublic static Optional<String> getProperty(org.apache.hadoop.conf.Configuration conf, String key)
conf
- Configuration object used for getting the query state, should contain the query idkey
- The resource identifierpublic static boolean addResource(org.apache.hadoop.conf.Configuration conf, String key, Object resource)
conf
- Configuration object used for getting the query state, should contain the query idkey
- The resource identifierresource
- The resource to save into the QueryStatepublic static void addResourceOrThrow(org.apache.hadoop.conf.Configuration conf, String key, Object resource)
public static Optional<Map<String,SessionStateUtil.CommitInfo>> getCommitInfo(org.apache.hadoop.conf.Configuration conf, String tableName)
conf
- Configuration object used for getting the query state, should contain the query idtableName
- Name of the table for which the commit info should be retrievedSessionStateUtil.CommitInfo
, or empty Optional if not presentpublic static boolean addCommitInfo(org.apache.hadoop.conf.Configuration conf, String tableName, String jobId, int taskNum, Map<String,String> additionalProps)
conf
- Configuration object used for getting the query state, should contain the query idtableName
- Name of the table for which the commit info should be storedjobId
- The job IDtaskNum
- The number of successful tasks for the jobadditionalProps
- Any additional properties related to the job commitpublic static Optional<QueryState> getQueryState(org.apache.hadoop.conf.Configuration conf)
Copyright © 2023 The Apache Software Foundation. All rights reserved.