public abstract class CompactorThread extends Thread implements org.apache.hadoop.conf.Configurable
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected HiveConf |
conf |
protected String |
hostName |
protected static org.slf4j.Logger |
LOG |
protected String |
runtimeVersion |
protected AtomicBoolean |
stop |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
CompactorThread() |
Modifier and Type | Method and Description |
---|---|
protected LockRequest |
createLockRequest(CompactionInfo ci,
long txnId,
LockType lockType,
DataOperationType opType) |
org.apache.hadoop.conf.Configuration |
getConf() |
protected String |
getRuntimeVersion() |
void |
init(AtomicBoolean stop) |
static void |
initializeAndStartThread(CompactorThread thread,
org.apache.hadoop.conf.Configuration conf) |
protected boolean |
isMinorCompactionSupported(Map<String,String> tblproperties,
AcidDirectory dir)
Check for that special case when minor compaction is supported or not.
|
protected boolean |
replIsCompactionDisabledForTable(Table tbl) |
protected Partition |
resolvePartition(CompactionInfo ci)
Get the partition being compacted.
|
protected StorageDescriptor |
resolveStorageDescriptor(Table t,
Partition p)
Get the storage descriptor for a compaction.
|
protected boolean |
runJobAsSelf(String owner)
Determine whether to run this job as the current user or whether we need a doAs to switch
users.
|
void |
setConf(org.apache.hadoop.conf.Configuration configuration) |
protected String |
tableName(Table t) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected static final org.slf4j.Logger LOG
protected HiveConf conf
protected AtomicBoolean stop
protected String hostName
protected String runtimeVersion
public void setConf(org.apache.hadoop.conf.Configuration configuration)
setConf
in interface org.apache.hadoop.conf.Configurable
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void init(AtomicBoolean stop) throws Exception
Exception
protected Partition resolvePartition(CompactionInfo ci) throws MetaException
ci
- compaction info returned from the compaction queueException
- if underlying calls throw, or if the partition name resolves to more than
one partition.MetaException
protected boolean isMinorCompactionSupported(Map<String,String> tblproperties, AcidDirectory dir)
tblproperties
- The properties of the table to checkdir
- The AcidDirectory
instance pointing to the table's folder on the filesystem.protected StorageDescriptor resolveStorageDescriptor(Table t, Partition p)
t
- table from resolveTable(org.apache.hadoop.hive.metastore.txn.CompactionInfo)
p
- table from resolvePartition(org.apache.hadoop.hive.metastore.txn.CompactionInfo)
protected boolean runJobAsSelf(String owner)
owner
- of the directory we will be working in, as determined by
TxnUtils.findUserToRunAs(String, Table, Configuration)
public static void initializeAndStartThread(CompactorThread thread, org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
protected boolean replIsCompactionDisabledForTable(Table tbl)
protected String getRuntimeVersion()
protected LockRequest createLockRequest(CompactionInfo ci, long txnId, LockType lockType, DataOperationType opType)
Copyright © 2022 The Apache Software Foundation. All rights reserved.