@Override public V put(K key, V value) { V v = this.get(key); if (v == null) { super.put(key, value); } else if (v instanceof HoodieRollingStat) { long inserts = ((HoodieRollingStat) v).getInserts(); long upserts = ((HoodieRollingStat) v).getUpserts(); long deletes = ((HoodieRollingStat) v).getDeletes(); ((HoodieRollingStat) value).addInserts(inserts); ((HoodieRollingStat) value).addUpserts(upserts); ((HoodieRollingStat) value).addDeletes(deletes); super.put(key, value); } return value; } }
public void addRollingStat(String partitionPath, HoodieRollingStat stat) { if (!partitionToRollingStats.containsKey(partitionPath)) { partitionToRollingStats.put(partitionPath, new RollingStatsHashMap<>()); } partitionToRollingStats.get(partitionPath).put(stat.getFileId(), stat); }
.entrySet()) { for (Map.Entry<String, HoodieRollingStat> stat : pstat.getValue().entrySet()) { inserts += stat.getValue().getInserts(); .entrySet()) { for (Map.Entry<String, HoodieRollingStat> stat : pstat.getValue().entrySet()) { inserts += stat.getValue().getInserts(); upserts += stat.getValue().getUpserts();
HoodieRollingStat hoodieRollingStat = new HoodieRollingStat(stat.getFileId(), stat.getNumWrites() - (stat.getNumUpdateWrites() - stat.getNumDeletes()), stat.getNumUpdateWrites(), stat.getNumDeletes(), stat.getTotalWriteBytes());
rollingStatMetadata.getPartitionToRollingStats().entrySet()) { for (Map.Entry<String, HoodieRollingStat> stat : pstat.getValue().entrySet()) { inserts += stat.getValue().getInserts(); fileIdToInsertsMap.put(stat.getKey(), stat.getValue().getInserts()); fileIdToUpsertsMap.put(stat.getKey(), stat.getValue().getUpserts()); inserts += stat.getValue().getInserts(); upserts += stat.getValue().getUpserts(); inserts += stat.getValue().getInserts(); upserts += stat.getValue().getUpserts();
HoodieRollingStat hoodieRollingStat = new HoodieRollingStat(stat.getFileId(), stat.getNumWrites() - (stat.getNumUpdateWrites() - stat.getNumDeletes()), stat.getNumUpdateWrites(), stat.getNumDeletes(), stat.getTotalWriteBytes());
rollingStatMetadata.getPartitionToRollingStats().entrySet()) { for (Map.Entry<String, HoodieRollingStat> stat : pstat.getValue().entrySet()) { inserts += stat.getValue().getInserts(); .entrySet()) { for (Map.Entry<String, HoodieRollingStat> stat : pstat.getValue().entrySet()) { inserts += stat.getValue().getInserts(); upserts += stat.getValue().getUpserts(); .entrySet()) { for (Map.Entry<String, HoodieRollingStat> stat : pstat.getValue().entrySet()) { inserts += stat.getValue().getInserts(); upserts += stat.getValue().getUpserts();