Skip to content

Commit

Permalink
Added a timeout for hive queries wait so that we can fail fast
Browse files Browse the repository at this point in the history
and return if there is inordinate delay.
  • Loading branch information
Neeraj Kumar committed Jul 11, 2018
1 parent 1d23dc1 commit de2f765
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/java/io/snappydata/impl/SnappyHiveCatalog.java
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ private HMSQuery getHMSQuery() {

private <T> T handleFutureResult(Future<T> f) {
try {
return f.get();
// Time out if it takes more than 30 seconds
return f.get(30, TimeUnit.SECONDS);
} catch (ExecutionException e) {
throw new RuntimeException(e.getCause());
} catch (Exception e) {
Expand Down

0 comments on commit de2f765

Please sign in to comment.