Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAPREDUCE-7435. Manifest Committer OOM on abfs #5519

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
17db68e
MAPREDUCE-7435. Manifest Committer OOM on abfs
steveloughran Mar 29, 2023
e153791
MAPREDUCE-7435. committer OOM
steveloughran Mar 31, 2023
16422e4
MAPREDUCE-7435. oom: switch to sequence file for storage of the files.
steveloughran Apr 4, 2023
f95a926
MAPREDUCE-7435. oom: switch to sequence file for storage of the files.
steveloughran Apr 5, 2023
3046b08
MAPREDUCE-7435. starting to get write/read chain working
steveloughran Apr 5, 2023
3182c97
MAPREDUCE-7435. starting to get write/read chain working
steveloughran Apr 5, 2023
f18e9da
MAPREDUCE-7435. Async queue/write working
steveloughran Apr 6, 2023
30d90e0
MAPREDUCE-7435. following chain through to validation
steveloughran Apr 17, 2023
ed04b54
MAPREDUCE-7435. Parallel writing test
steveloughran Apr 18, 2023
61a6846
MAPREDUCE-7435. checkstyle, remote iterator work, azure tuning
steveloughran Apr 19, 2023
ffb25e7
MAPREDUCE-7435. improve ITestAbfsLoadManifestsStage performance
steveloughran Apr 19, 2023
9874acb
MAPREDUCE-7435. tweak test performance by disabling parallel TA dir c…
steveloughran Apr 19, 2023
7af5ab2
MAPREDUCE-7435. reduce delete overhead on renaming by a HEAD
steveloughran Apr 19, 2023
f969993
MAPREDUCE-7435. javadocs and other warnings, *not spotbugs*
steveloughran Apr 20, 2023
8e83fdc
MAPREDUCE-7435. Mehakmeet comments, excluding timeouts.
steveloughran Apr 26, 2023
b289707
MAPREDUCE-7435. validation reporting missing files
steveloughran Jun 1, 2023
355fa35
MAPREDUCE-7435. Mehakmeet review
steveloughran Jun 1, 2023
070c788
MAPREDUCE-7435. checkstyle: remove unused imports.
steveloughran Jun 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,75 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.hadoop.fs.statistics;

import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;

/**
* Setter for IOStatistics entries.
* These operations have been in the read/write API
* {@code IOStatisticsStore} since IOStatistics
* was added; extracting into its own interface allows for
* {@link IOStatisticsSnapshot} to also support it.
* These are the simple setters, they don't provide for increments,
* decrements, calculation of min/max/mean etc.
* @since The interface and IOStatisticsSnapshot support was added <i>after</i> Hadoop 3.3.5
*/
@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface IOStatisticsSetters extends IOStatistics {

/**
* Set a counter.
*
* No-op if the counter is unknown.
* @param key statistics key
* @param value value to set
*/
void setCounter(String key, long value);

/**
* Set a gauge.
*
* @param key statistics key
* @param value value to set
*/
void setGauge(String key, long value);

/**
* Set a maximum.
* @param key statistics key
* @param value value to set
*/
void setMaximum(String key, long value);

/**
* Set a minimum.
* @param key statistics key
* @param value value to set
*/
void setMinimum(String key, long value);

/**
* Set a mean statistic to a given value.
* @param key statistic key
* @param value new value.
*/
void setMeanStatistic(String key, MeanStatistic value);
}
Expand Up @@ -62,7 +62,8 @@
@InterfaceAudience.Public
@InterfaceStability.Evolving
public final class IOStatisticsSnapshot
implements IOStatistics, Serializable, IOStatisticsAggregator {
implements IOStatistics, Serializable, IOStatisticsAggregator,
IOStatisticsSetters {

private static final long serialVersionUID = -1762522703841538084L;

Expand Down Expand Up @@ -222,6 +223,33 @@ public synchronized Map<String, MeanStatistic> meanStatistics() {
return meanStatistics;
}

@Override
public synchronized void setCounter(final String key, final long value) {
counters().put(key, value);
}

@Override
public synchronized void setGauge(final String key, final long value) {
gauges().put(key, value);

}

@Override
public synchronized void setMaximum(final String key, final long value) {
maximums().put(key, value);

}

@Override
public synchronized void setMinimum(final String key, final long value) {
minimums().put(key, value);
}

@Override
public void setMeanStatistic(final String key, final MeanStatistic value) {
meanStatistics().put(key, value);
}

@Override
public String toString() {
return ioStatisticsToString(this);
Expand Down
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

package org.apache.hadoop.fs.s3a.statistics.impl;
package org.apache.hadoop.fs.statistics.impl;

import javax.annotation.Nullable;
import java.time.Duration;
Expand All @@ -25,7 +25,6 @@

import org.apache.hadoop.fs.statistics.IOStatistics;
import org.apache.hadoop.fs.statistics.MeanStatistic;
import org.apache.hadoop.fs.statistics.impl.IOStatisticsStore;

/**
* This may seem odd having an IOStatisticsStore which does nothing
Expand Down
Expand Up @@ -24,13 +24,15 @@
import org.apache.hadoop.fs.statistics.IOStatistics;
import org.apache.hadoop.fs.statistics.IOStatisticsAggregator;
import org.apache.hadoop.fs.statistics.DurationTrackerFactory;
import org.apache.hadoop.fs.statistics.IOStatisticsSetters;
import org.apache.hadoop.fs.statistics.MeanStatistic;

/**
* Interface of an IOStatistics store intended for
* use in classes which track statistics for reporting.
*/
public interface IOStatisticsStore extends IOStatistics,
IOStatisticsSetters,
IOStatisticsAggregator,
DurationTrackerFactory {

Expand All @@ -56,24 +58,6 @@ default long incrementCounter(String key) {
*/
long incrementCounter(String key, long value);

/**
* Set a counter.
*
* No-op if the counter is unknown.
* @param key statistics key
* @param value value to set
*/
void setCounter(String key, long value);

/**
* Set a gauge.
*
* No-op if the gauge is unknown.
* @param key statistics key
* @param value value to set
*/
void setGauge(String key, long value);

/**
* Increment a gauge.
* <p>
Expand All @@ -85,14 +69,6 @@ default long incrementCounter(String key) {
*/
long incrementGauge(String key, long value);

/**
* Set a maximum.
* No-op if the maximum is unknown.
* @param key statistics key
* @param value value to set
*/
void setMaximum(String key, long value);

/**
* Increment a maximum.
* <p>
Expand All @@ -104,16 +80,6 @@ default long incrementCounter(String key) {
*/
long incrementMaximum(String key, long value);

/**
* Set a minimum.
* <p>
* No-op if the minimum is unknown.
* </p>
* @param key statistics key
* @param value value to set
*/
void setMinimum(String key, long value);

/**
* Increment a minimum.
* <p>
Expand Down Expand Up @@ -147,16 +113,6 @@ default long incrementCounter(String key) {
*/
void addMaximumSample(String key, long value);

/**
* Set a mean statistic to a given value.
* <p>
* No-op if the key is unknown.
* </p>
* @param key statistic key
* @param value new value.
*/
void setMeanStatistic(String key, MeanStatistic value);

/**
* Add a sample to the mean statistics.
* <p>
Expand Down
Expand Up @@ -67,6 +67,17 @@ public interface IOStatisticsStoreBuilder {
IOStatisticsStoreBuilder withDurationTracking(
String... prefixes);

/**
* A value which is tracked with counter/min/max/mean.
* Similar to {@link #withDurationTracking(String...)}
* but without the failure option and with the same name
* across all categories.
* @param prefixes prefixes to add.
* @return the builder
*/
IOStatisticsStoreBuilder withSampleTracking(
String... prefixes);

/**
* Build the collector.
* @return a new collector.
Expand Down
Expand Up @@ -92,6 +92,18 @@ public IOStatisticsStoreBuilderImpl withDurationTracking(
return this;
}

@Override
public IOStatisticsStoreBuilderImpl withSampleTracking(
final String... prefixes) {
for (String p : prefixes) {
withCounters(p);
withMinimums(p);
withMaximums(p);
withMeanStatistics(p);
}
return this;
}

@Override
public IOStatisticsStore build() {
return new IOStatisticsStoreImpl(counters, gauges, minimums,
Expand Down