Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ protected boolean isClosed() {

@Override
protected void abortInFinalizer() {
getS3AStreamStatistics().streamLeaked();
try {
close();
} catch (IOException ignored) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

import static org.apache.hadoop.fs.contract.ContractTestUtils.dataset;
import static org.apache.hadoop.fs.s3a.S3ATestUtils.assume;
import static org.apache.hadoop.fs.s3a.S3ATestUtils.skipIfAnalyticsAcceleratorEnabled;
import static org.apache.hadoop.fs.statistics.IOStatisticAssertions.assertThatStatisticCounter;
import static org.apache.hadoop.fs.statistics.StreamStatisticNames.STREAM_LEAKS;
import static org.apache.hadoop.test.GenericTestUtils.LogCapturer.captureLogs;
Expand Down Expand Up @@ -90,10 +89,6 @@ public void setup() throws Exception {
@Test
public void testFinalizer() throws Throwable {
Path path = methodPath();
// Analytics accelerator currently does not support stream leak detection. This work is tracked
// in https://issues.apache.org/jira/browse/HADOOP-19451
skipIfAnalyticsAcceleratorEnabled(getConfiguration(),
"Analytics Accelerator currently does not support leak detection");

final S3AFileSystem fs = getFileSystem();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ public static void skipIfAnalyticsAcceleratorEnabled(

public static boolean isAnalyticsAcceleratorEnabled(final Configuration conf) {
return conf.get(INPUT_STREAM_TYPE,
INPUT_STREAM_TYPE_CLASSIC).equals(INPUT_STREAM_TYPE_ANALYTICS);
INPUT_STREAM_TYPE_ANALYTICS).equals(INPUT_STREAM_TYPE_ANALYTICS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
public class TestStreamFactories extends AbstractHadoopTestBase {

/**
* The empty string and "default" both map to the classic stream.
* The empty string and "default" both map to the analytics stream.
*/
@Test
public void testDefaultFactoryCreation() throws Throwable {
load("", DEFAULT_STREAM_TYPE,
ClassicObjectInputStreamFactory.class);
AnalyticsStreamFactory.class);
load(INPUT_STREAM_TYPE_DEFAULT, DEFAULT_STREAM_TYPE,
ClassicObjectInputStreamFactory.class);
AnalyticsStreamFactory.class);
}

/**
Expand All @@ -70,7 +70,7 @@ public void testDefaultFactoryCreation() throws Throwable {
@Test
public void testClassicFactoryCreation() throws Throwable {
final ClassicObjectInputStreamFactory f =
load(INPUT_STREAM_TYPE_CLASSIC, DEFAULT_STREAM_TYPE,
load(INPUT_STREAM_TYPE_CLASSIC, InputStreamType.Classic,
ClassicObjectInputStreamFactory.class);
final StreamFactoryRequirements requirements = f.factoryRequirements();
assertThat(requirements.requiresFuturePool())
Expand Down