public Date getStorageTableStartDate(String storageTable, FactTable factTableName) throws LensException { List<Date> startDates = getStorageTimes(storageTable, MetastoreUtil.getStoragetableStartTimesKey()); startDates.add(factTableName.getStartTime()); return Collections.max(startDates); }
public Date getStorageTableStartDate(String storageTable, FactTable factTableName) throws LensException { List<Date> startDates = getStorageTimes(storageTable, MetastoreUtil.getStoragetableStartTimesKey()); startDates.add(factTableName.getStartTime()); return Collections.max(startDates); }
public boolean isStorageTableCandidateForRange(String storageTableName, Date fromDate, Date toDate) throws LensException { List<Date> storageEndDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableEndTimesKey()); for(Date endDate : storageEndDates) { // endDate is exclusive if (endDate.before(fromDate) || endDate.equals(fromDate)) { log.debug("from date {} is after validity end time: {}, hence discarding {}", fromDate, endDate, storageTableName); return false; } } List<Date> storageStartDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableStartTimesKey()); for(Date startDate : storageStartDates) { // toDate is exclusive on the range if (startDate.after(toDate) || startDate.equals(toDate)) { log.debug("to date {} is before validity start time: {}, hence discarding {}", toDate, startDate, storageTableName); return false; } } return true; }
public boolean isStorageTableCandidateForRange(String storageTableName, Date fromDate, Date toDate) throws LensException { List<Date> storageEndDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableEndTimesKey()); for (Date endDate : storageEndDates) { // endDate is exclusive if (endDate.before(fromDate) || endDate.equals(fromDate)) { log.debug("from date {} is after validity end time: {}, hence discarding {}", fromDate, endDate, storageTableName); return false; } } List<Date> storageStartDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableStartTimesKey()); for (Date startDate : storageStartDates) { // toDate is exclusive on the range if (startDate.after(toDate) || startDate.equals(toDate)) { log.debug("to date {} is before validity start time: {}, hence discarding {}", toDate, startDate, storageTableName); return false; } } return true; }
public boolean isStorageTablePartitionACandidate(String storageTableName, Date partDate) throws LensException { List<Date> storageStartDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableStartTimesKey()); for(Date startDate : storageStartDates) { if (partDate.before(startDate)) { log.info("part date {} is before validity start time: {}, hence discarding {}", partDate, startDate, storageTableName); return false; } } List<Date> storageEndDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableEndTimesKey()); for(Date endDate : storageEndDates) { // end date should be exclusive if (partDate.after(endDate) || partDate.equals(endDate)) { log.info("part date {} is after validity end time: {}, hence discarding {}", partDate, endDate, storageTableName); return false; } } return true; }
public boolean isStorageTablePartitionACandidate(String storageTableName, Date partDate) throws LensException { List<Date> storageStartDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableStartTimesKey()); for (Date startDate : storageStartDates) { if (partDate.before(startDate)) { log.info("part date {} is before validity start time: {}, hence discarding {}", partDate, startDate, storageTableName); return false; } } List<Date> storageEndDates = getStorageTimes(storageTableName, MetastoreUtil.getStoragetableEndTimesKey()); for (Date endDate : storageEndDates) { // end date should be exclusive if (partDate.after(endDate) || partDate.equals(endDate)) { log.info("part date {} is after validity end time: {}, hence discarding {}", partDate, endDate, storageTableName); return false; } } return true; }
storageProps.put(getStoragetableStartTimesKey(), "now -30 days"); storageProps.put(getStoragetableEndTimesKey(), "now +10 days");
datePartSingleton, datePartKeySingleton); s1.getTblProps().put(MetastoreUtil.getStoragetableStartTimesKey(), "2015, now.day -10 days"); s1.getTblProps().put(MetastoreUtil.getStoragetableEndTimesKey(), "now.day - 1 day");
datePartSingleton, datePartKeySingleton); s1.getTblProps().put(MetastoreUtil.getStoragetableStartTimesKey(), "2015, now.day -10 days"); s1.getTblProps().put(MetastoreUtil.getStoragetableEndTimesKey(), "now.day - 1 day");
XProperties props = cubeObjectFactory.createXProperties(); XProperty propStartTime = cubeObjectFactory.createXProperty(); propStartTime.setName(MetastoreUtil.getStoragetableStartTimesKey()); propStartTime.setValue("now -10 days"); XProperty propEndTime = cubeObjectFactory.createXProperty();