本文整理了Java中org.apache.hadoop.hive.ql.exec.Utilities.getRandomWaitTime()
方法的一些代码示例,展示了Utilities.getRandomWaitTime()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.getRandomWaitTime()
方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.exec.Utilities
类名称:Utilities
方法名:getRandomWaitTime
[英]Introducing a random factor to the wait time before another retry. The wait time is dependent on # of failures and a random factor. At the first time of getting an exception , the wait time is a random number between 0..baseWindow msec. If the first retry still fails, we will wait baseWindow msec grace period before the 2nd retry. Also at the second retry, the waiting window is expanded to 2baseWindow msec alleviating the request rate from the server. Similarly the 3rd retry will wait 2baseWindow msec. grace period before retry and the waiting window is expanded to 3baseWindow msec and so on.
[中]在下次重试前的等待时间中引入随机因素。等待时间取决于#个故障和一个随机因素。在第一次获取异常时,等待时间是介于0和0之间的随机数。。基本窗口毫秒。如果第一次重试仍然失败,我们将在第二次重试之前等待baseWindow毫秒宽限期。同样在第二次重试时,等待窗口扩展为2baseWindow毫秒,降低了服务器的请求速率。同样,第三次重试将等待2baseWindow毫秒。重试前的宽限期,等待窗口扩展为3baseWindow毫秒,依此类推。
代码示例来源:origin: apache/hive
throw e;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, randGen);
try {
Thread.sleep(waitTime);
代码示例来源:origin: apache/hive
throw e;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, randGen);
try {
Thread.sleep(waitTime);
代码示例来源:origin: apache/drill
throw e;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: apache/drill
throw e;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: apache/hive
throw e;
long waitTime = getRandomWaitTime(baseWindow, failures, randGen);
try {
Thread.sleep(waitTime);
代码示例来源:origin: apache/drill
throw e;
long waitTime = getRandomWaitTime(baseWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
throw e;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
throw e;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
private boolean handleSQLRecoverableException(Exception e, int failures) {
if (failures >= maxRetries) {
return false;
}
// close the current connection
closeConnection();
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
} catch (InterruptedException iex) {
}
// get a new connection
if (!connect(hiveconf)) {
// if cannot reconnect, just fail because connect() already handles retries.
LOG.error("Error during publishing aggregation. " + e);
return false;
}
return true;
}
代码示例来源:origin: com.facebook.presto.hive/hive-apache
throw e;
long waitTime = getRandomWaitTime(baseWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
return false;
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
代码示例来源:origin: com.facebook.presto.hive/hive-apache
return false; // just return false without fail the task
long waitTime = Utilities.getRandomWaitTime(waitWindow, failures, r);
try {
Thread.sleep(waitTime);
内容来源于网络,如有侵权,请联系作者删除!