@Override public void run() { while (!isInterrupted() && !stopped) { long now = System.currentTimeMillis(); if (now > (lastUpdated + metadataCacheUpdateFreqInMillis)) { try { updateCache(); } catch (TableNotFoundException ex) { LOG.warn("Metadata table not found.", ex); break; } catch (IOException ex) { LOG.warn("Error updating metadata table cache", ex); } } try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException ex) { interrupt(); break; } } LOG.info("Metadata cache update terminated."); } };
@Override public void run() { while (!isInterrupted() && !stopped) { long now = System.currentTimeMillis(); if (now > (lastUpdated + metadataCacheUpdateFreqInMillis)) { try { updateCache(); } catch (TableNotFoundException ex) { LOG.warn("Metadata table not found.", ex); break; } catch (IOException ex) { LOG.warn("Error updating metadata table cache", ex); } } try { TimeUnit.SECONDS.sleep(1); } catch (InterruptedException ex) { interrupt(); break; } } LOG.info("Metadata cache update terminated."); } };