log.warn(String .format("Not validating table: %s as update time was not found. %s", hiveDataset.getTable().getCompleteName(), e.getMessage()));
@Override public Long call() throws Exception { if (HdfsBasedUpdateProvider.this.fs.exists(path)) { return HdfsBasedUpdateProvider.this.fs.getFileStatus(path).getModificationTime(); } throw new UpdateNotFoundException(String.format("Data file does not exist at path %s", path)); } });
} catch (UpdateNotFoundException e) { log.warn(String.format("Not validating partition: %s as update time was not found. %s", sourcePartition.getCompleteName(), e.getMessage()));
private long parseDateForLocation(String location) throws UpdateNotFoundException { for (Patterns pattern : Patterns.values()) { String dateString = StringUtils.substringAfterLast(location, pattern.prefix); if (StringUtils.isNotBlank(dateString)) { try { return pattern.dateFormat.parseMillis(dateString); } catch (IllegalArgumentException | UnsupportedOperationException e) { throw new UpdateNotFoundException(String.format("Failed parsing date string %s", dateString)); } } } throw new UpdateNotFoundException(String.format("Path %s does not match any date pattern %s", location, Arrays.toString(Patterns.values()))); }
sourcePartition.getCompleteName(), e.getMessage())); } catch (SchemaNotFoundException e) { log.error(String.format("Not creating workunit for %s as schema was not found. %s",
/** * Get the update time of a {@link Table} * @return the update time if available, 0 otherwise * * {@inheritDoc} * @see HiveUnitUpdateProvider#getUpdateTime(org.apache.hadoop.hive.ql.metadata.Table) */ @Override public long getUpdateTime(Table table) throws UpdateNotFoundException { try { return getUpdateTime(table.getDataLocation()); } catch (IOException e) { throw new UpdateNotFoundException(String.format("Failed to get update time for %s.", table.getCompleteName()), e); } }
.getCompleteName(), e.getMessage()), e); } catch (SchemaNotFoundException e) { log.error(String.format("Not Creating workunit for %s as schema was not found. %s", hiveDataset.getTable()
/** * Get the update time of a {@link Partition} * * @return the update time if available, 0 otherwise * * {@inheritDoc} * @see HiveUnitUpdateProvider#getUpdateTime(org.apache.hadoop.hive.ql.metadata.Partition) */ @Override public long getUpdateTime(Partition partition) throws UpdateNotFoundException { try { return getUpdateTime(partition.getDataLocation()); } catch (IOException e) { throw new UpdateNotFoundException(String.format("Failed to get update time for %s", partition.getCompleteName()), e); } }
log.warn(String .format("Not validating table: %s as update time was not found. %s", hiveDataset.getTable().getCompleteName(), e.getMessage()));
@Override public Long call() throws Exception { if (HdfsBasedUpdateProvider.this.fs.exists(path)) { return HdfsBasedUpdateProvider.this.fs.getFileStatus(path).getModificationTime(); } throw new UpdateNotFoundException(String.format("Data file does not exist at path %s", path)); } });
} catch (UpdateNotFoundException e) { log.warn(String.format("Not validating partition: %s as update time was not found. %s", sourcePartition.getCompleteName(), e.getMessage()));
private long parseDateForLocation(String location) throws UpdateNotFoundException { for (Patterns pattern : Patterns.values()) { String dateString = StringUtils.substringAfterLast(location, pattern.prefix); if (StringUtils.isNotBlank(dateString)) { try { return pattern.dateFormat.parseMillis(dateString); } catch (IllegalArgumentException | UnsupportedOperationException e) { throw new UpdateNotFoundException(String.format("Failed parsing date string %s", dateString)); } } } throw new UpdateNotFoundException(String.format("Path %s does not match any date pattern %s", location, Arrays.toString(Patterns.values()))); }
sourcePartition.getCompleteName(), e.getMessage())); } catch (SchemaNotFoundException e) { log.error(String.format("Not creating workunit for %s as schema was not found. %s",
/** * Get the update time of a {@link Table} * @return the update time if available, 0 otherwise * * {@inheritDoc} * @see HiveUnitUpdateProvider#getUpdateTime(org.apache.hadoop.hive.ql.metadata.Table) */ @Override public long getUpdateTime(Table table) throws UpdateNotFoundException { try { return getUpdateTime(table.getDataLocation()); } catch (IOException e) { throw new UpdateNotFoundException(String.format("Failed to get update time for %s.", table.getCompleteName()), e); } }
.getCompleteName(), e.getMessage()), e); } catch (SchemaNotFoundException e) { log.error(String.format("Not Creating workunit for %s as schema was not found. %s", hiveDataset.getTable()
/** * Get the update time of a {@link Partition} * * @return the update time if available, 0 otherwise * * {@inheritDoc} * @see HiveUnitUpdateProvider#getUpdateTime(org.apache.hadoop.hive.ql.metadata.Partition) */ @Override public long getUpdateTime(Partition partition) throws UpdateNotFoundException { try { return getUpdateTime(partition.getDataLocation()); } catch (IOException e) { throw new UpdateNotFoundException(String.format("Failed to get update time for %s", partition.getCompleteName()), e); } }