org.apache.hadoop.hive.ql.txn.compactor
Class Worker

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.hadoop.hive.ql.txn.compactor.Worker
All Implemented Interfaces:
Runnable, MetaStoreThread

public class Worker
extends Thread

A class to do compactions. This will run in a separate thread. It will spin on the compaction queue and look for new work to do.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Nested classes/interfaces inherited from interface org.apache.hadoop.hive.metastore.MetaStoreThread
MetaStoreThread.BooleanPointer
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Worker()
           
 
Method Summary
static String hostname()
          Get the hostname that this worker is run on.
 void init(MetaStoreThread.BooleanPointer stop)
           
 void run()
           
 void setHiveConf(HiveConf conf)
           
 void setThreadId(int threadId)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.hive.metastore.MetaStoreThread
start
 

Constructor Detail

Worker

public Worker()
Method Detail

hostname

public static String hostname()
Get the hostname that this worker is run on. Made static and public so that other classes can use the same method to know what host their worker threads are running on.

Returns:
hostname

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

init

public void init(MetaStoreThread.BooleanPointer stop)
          throws org.apache.hadoop.hive.metastore.api.MetaException
Specified by:
init in interface MetaStoreThread
Throws:
org.apache.hadoop.hive.metastore.api.MetaException

setHiveConf

public void setHiveConf(HiveConf conf)
Specified by:
setHiveConf in interface MetaStoreThread

setThreadId

public void setThreadId(int threadId)
Specified by:
setThreadId in interface MetaStoreThread


Copyright © 2014 The Apache Software Foundation. All rights reserved.