/** * * @param fact fact * @param storage storage * @param partCol part column * @return true if all the timelines for fact-storage table are empty for all valid update periods. * @throws HiveException * @throws LensException */ public boolean noPartitionsExist(String fact, String storage, String partCol) throws HiveException, LensException { if (get(fact, storage) == null) { return true; } for (UpdatePeriod updatePeriod : get(fact, storage).keySet()) { PartitionTimeline timeline = get(fact, storage, updatePeriod, partCol); if (timeline != null && !timeline.isEmpty()) { return false; } } return true; }
/** * * @param fact fact * @param storage storage * @param partCol part column * @return true if all the timelines for fact-storage table are empty for all valid update periods. * @throws HiveException * @throws LensException */ public boolean noPartitionsExist(String fact, String storage, String partCol) throws HiveException, LensException { if (get(fact, storage) == null) { return true; } for (UpdatePeriod updatePeriod : get(fact, storage).keySet()) { PartitionTimeline timeline = get(fact, storage, updatePeriod, partCol); if (timeline != null && !timeline.isEmpty()) { return false; } } return true; }
assertTrue(timeline.isEmpty());