boolean latestPartitionExists(String factOrDimTblName, String storageName, String latestPartCol) throws HiveException, LensException { String storageTableName = MetastoreUtil.getStorageTableName(factOrDimTblName, Storage.getPrefix(storageName)); if (isDimensionTable(factOrDimTblName)) { return dimTableLatestPartitionExists(storageTableName); } else { return !partitionTimelineCache.noPartitionsExist(factOrDimTblName, storageName, latestPartCol); } }
boolean latestPartitionExists(String factOrDimTblName, String storageName, String latestPartCol) throws HiveException, LensException { String storageTableName = MetastoreUtil.getStorageTableName(factOrDimTblName, Storage.getPrefix(storageName)); if (isDimensionTable(factOrDimTblName)) { return dimTableLatestPartitionExists(storageTableName); } else { return !partitionTimelineCache.noPartitionsExist(factOrDimTblName, storageName, latestPartCol); } }
foundPart = client.dimTableLatestPartitionExists(tableName); if (foundPart) { log.debug("Adding existing partition {}", StorageConstants.LATEST_PARTITION_VALUE);
foundPart = client.dimTableLatestPartitionExists(tableName); if (foundPart) { log.debug("Adding existing partition {}", StorageConstants.LATEST_PARTITION_VALUE);
assertFalse(client.dimTableLatestPartitionExists(storageTableName)); Map<String, Date> expectedLatestValues = Maps.newHashMap(); Map<String, Date> timeParts = new HashMap<>();
assertFalse(client.dimTableLatestPartitionExists(storageTableName)); assertFalse(client.latestPartitionExists(cubeDim.getName(), c1, getDatePartitionKey())); assertEquals(client.getAllParts(storageTableName).size(), 0); assertFalse(client.dimTableLatestPartitionExists(storageTableName)); assertTrue(client.dimTableLatestPartitionExists(storageTableName)); client.dropStorageFromDim(cubeDim.getName(), c1); assertFalse(client.dimTableLatestPartitionExists(storageTableName));