/** * helper method for ensuring get(storageTable).get(updatePeriod).get(partitionColumn) gives a non-null object. * <p></p> * kind of like mkdir -p * * @param timeLineKey storage table * @param updatePeriod update period * @param partitionColumn partition column * @return timeline if already exists, or puts a new timeline and returns. */ public PartitionTimeline ensureEntry(String timeLineKey, String storagTableName, UpdatePeriod updatePeriod, String partitionColumn) { return this .computeIfAbsent(timeLineKey, s -> new TreeMap<>()) .computeIfAbsent(updatePeriod, k -> new CaseInsensitiveStringHashMap<>()) .computeIfAbsent(partitionColumn, c -> PartitionTimelineFactory.get( CubeMetastoreClient.this, storagTableName, updatePeriod, c)); }
/** * helper method for ensuring get(storageTable).get(updatePeriod).get(partitionColumn) gives a non-null object. * <p></p> * kind of like mkdir -p * * @param timeLineKey storage table * @param updatePeriod update period * @param partitionColumn partition column * @return timeline if already exists, or puts a new timeline and returns. */ public PartitionTimeline ensureEntry(String timeLineKey, String storagTableName, UpdatePeriod updatePeriod, String partitionColumn) { return this .computeIfAbsent(timeLineKey, s -> new TreeMap<>()) .computeIfAbsent(updatePeriod, k -> new CaseInsensitiveStringHashMap<>()) .computeIfAbsent(partitionColumn, c -> PartitionTimelineFactory.get( CubeMetastoreClient.this, storagTableName, updatePeriod, c)); }