public class QueryEndNotifier extends AsyncEventListener<QueryEnded>
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryEndNotifier.Email |
| Modifier and Type | Field and Description |
|---|---|
static String |
EMAIL_ERROR_COUNTER
The Constant EMAIL_ERROR_COUNTER.
|
HANDLER_METHOD_NAME| Constructor and Description |
|---|
QueryEndNotifier(QueryExecutionServiceImpl queryService,
org.apache.hadoop.hive.conf.HiveConf hiveConf,
LogSegregationContext logSegregationContext)
Instantiates a new query end notifier.
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(QueryEnded event)
Should implement the actual event handling.
|
static void |
sendMail(String host,
String port,
QueryEndNotifier.Email email,
int mailSmtpTimeout,
int mailSmtpConnectionTimeout)
Send mail.
|
getEventQueue, onEvent, stoppublic static final String EMAIL_ERROR_COUNTER
public QueryEndNotifier(QueryExecutionServiceImpl queryService, org.apache.hadoop.hive.conf.HiveConf hiveConf, @NonNull LogSegregationContext logSegregationContext)
queryService - the query servicehiveConf - the hive confpublic void process(QueryEnded event)
AsyncEventListenerprocess in class AsyncEventListener<QueryEnded>event - the eventpublic static void sendMail(String host, String port, QueryEndNotifier.Email email, int mailSmtpTimeout, int mailSmtpConnectionTimeout) throws Exception
host - the hostport - the portemail - the emailmailSmtpTimeout - the mail smtp timeoutmailSmtpConnectionTimeout - the mail smtp connection timeoutExceptionCopyright © 2014–2018 Apache Software Foundation. All rights reserved.