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 @@ -19,27 +19,22 @@

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.io.compress.HFileTestBase;
import org.apache.hadoop.hbase.testclassification.IOTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category({ IOTests.class, SmallTests.class })
@Tag(IOTests.TAG)
@Tag(SmallTests.TAG)
public class TestHFileCompressionLz4 extends HFileTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestHFileCompressionLz4.class);

private static Configuration conf;

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
conf = TEST_UTIL.getConfiguration();
conf.set(Compression.LZ4_CODEC_CLASS_KEY, Lz4Codec.class.getCanonicalName());
Expand All @@ -53,5 +48,4 @@ public void test() throws Exception {
new Path(TEST_UTIL.getDataTestDir(), HBaseTestingUtil.getRandomUUID().toString() + ".hfile");
doTest(conf, path, Compression.Algorithm.LZ4);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,22 @@

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.io.compress.HFileTestBase;
import org.apache.hadoop.hbase.testclassification.IOTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category({ IOTests.class, SmallTests.class })
@Tag(IOTests.TAG)
@Tag(SmallTests.TAG)
public class TestHFileCompressionLzo extends HFileTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestHFileCompressionLzo.class);

private static Configuration conf;

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
conf = TEST_UTIL.getConfiguration();
conf.set(Compression.LZO_CODEC_CLASS_KEY, LzoCodec.class.getCanonicalName());
Expand All @@ -53,5 +48,4 @@ public void test() throws Exception {
new Path(TEST_UTIL.getDataTestDir(), HBaseTestingUtil.getRandomUUID().toString() + ".hfile");
doTest(conf, path, Compression.Algorithm.LZO);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,22 @@

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.io.compress.HFileTestBase;
import org.apache.hadoop.hbase.testclassification.IOTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category({ IOTests.class, SmallTests.class })
@Tag(IOTests.TAG)
@Tag(SmallTests.TAG)
public class TestHFileCompressionSnappy extends HFileTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestHFileCompressionSnappy.class);

private static Configuration conf;

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
conf = TEST_UTIL.getConfiguration();
conf.set(Compression.SNAPPY_CODEC_CLASS_KEY, SnappyCodec.class.getCanonicalName());
Expand All @@ -53,5 +48,4 @@ public void test() throws Exception {
new Path(TEST_UTIL.getDataTestDir(), HBaseTestingUtil.getRandomUUID().toString() + ".hfile");
doTest(conf, path, Compression.Algorithm.SNAPPY);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,22 @@

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.io.compress.HFileTestBase;
import org.apache.hadoop.hbase.testclassification.IOTests;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category({ IOTests.class, SmallTests.class })
@Tag(IOTests.TAG)
@Tag(SmallTests.TAG)
public class TestHFileCompressionZstd extends HFileTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestHFileCompressionZstd.class);

private static Configuration conf;

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
conf = TEST_UTIL.getConfiguration();
conf.set(Compression.ZSTD_CODEC_CLASS_KEY, ZstdCodec.class.getCanonicalName());
Expand All @@ -53,5 +48,4 @@ public void test() throws Exception {
new Path(TEST_UTIL.getDataTestDir(), HBaseTestingUtil.getRandomUUID().toString() + ".hfile");
doTest(conf, path, Compression.Algorithm.ZSTD);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@
*/
package org.apache.hadoop.hbase.io.compress.aircompressor;

import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.io.compress.CompressionTestBase;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category(SmallTests.class)
@Tag(SmallTests.TAG)
public class TestLz4Codec extends CompressionTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestLz4Codec.class);

@Test
public void testLz4CodecSmall() throws Exception {
codecSmallTest(new Lz4Codec());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@
*/
package org.apache.hadoop.hbase.io.compress.aircompressor;

import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.io.compress.CompressionTestBase;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category(SmallTests.class)
@Tag(SmallTests.TAG)
public class TestLzoCodec extends CompressionTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestLzoCodec.class);

@Test
public void testLzoCodecSmall() throws Exception {
codecSmallTest(new LzoCodec());
Expand All @@ -47,5 +41,4 @@ public void testLzoCodecLarge() throws Exception {
public void testLzoCodecVeryLarge() throws Exception {
codecVeryLargeTest(new LzoCodec(), 3); // like text
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@
*/
package org.apache.hadoop.hbase.io.compress.aircompressor;

import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.io.compress.CompressionTestBase;
import org.apache.hadoop.hbase.testclassification.SmallTests;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Category(SmallTests.class)
@Tag(SmallTests.TAG)
public class TestSnappyCodec extends CompressionTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestSnappyCodec.class);

@Test
public void testSnappyCodecSmall() throws Exception {
codecSmallTest(new SnappyCodec());
Expand All @@ -47,5 +41,4 @@ public void testSnappyCodecLarge() throws Exception {
public void testSnappyCodecVeryLarge() throws Exception {
codecVeryLargeTest(new SnappyCodec(), 3); // like text
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,21 @@
package org.apache.hadoop.hbase.io.compress.aircompressor;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.regionserver.wal.CompressionContext;
import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
import org.apache.hadoop.hbase.wal.CompressedWALTestBase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;

@Category({ RegionServerTests.class, MediumTests.class })
@Tag(RegionServerTests.TAG)
@Tag(MediumTests.TAG)
public class TestWALCompressionLz4 extends CompressedWALTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestWALCompressionLz4.class);

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
Configuration conf = TEST_UTIL.getConfiguration();
conf.set(Compression.LZ4_CODEC_CLASS_KEY, Lz4Codec.class.getCanonicalName());
Expand All @@ -48,9 +43,8 @@ public static void setUpBeforeClass() throws Exception {
TEST_UTIL.startMiniDFSCluster(3);
}

@AfterClass
@AfterAll
public static void tearDown() throws Exception {
TEST_UTIL.shutdownMiniCluster();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,21 @@
package org.apache.hadoop.hbase.io.compress.aircompressor;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.regionserver.wal.CompressionContext;
import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
import org.apache.hadoop.hbase.wal.CompressedWALTestBase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;

@Category({ RegionServerTests.class, MediumTests.class })
@Tag(RegionServerTests.TAG)
@Tag(MediumTests.TAG)
public class TestWALCompressionLzo extends CompressedWALTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestWALCompressionLzo.class);

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
Configuration conf = TEST_UTIL.getConfiguration();
conf.set(Compression.LZO_CODEC_CLASS_KEY, LzoCodec.class.getCanonicalName());
Expand All @@ -48,7 +43,7 @@ public static void setUpBeforeClass() throws Exception {
TEST_UTIL.startMiniDFSCluster(3);
}

@AfterClass
@AfterAll
public static void tearDown() throws Exception {
TEST_UTIL.shutdownMiniCluster();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,21 @@
package org.apache.hadoop.hbase.io.compress.aircompressor;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.io.compress.Compression;
import org.apache.hadoop.hbase.regionserver.wal.CompressionContext;
import org.apache.hadoop.hbase.testclassification.MediumTests;
import org.apache.hadoop.hbase.testclassification.RegionServerTests;
import org.apache.hadoop.hbase.wal.CompressedWALTestBase;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.experimental.categories.Category;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;

@Category({ RegionServerTests.class, MediumTests.class })
@Tag(RegionServerTests.TAG)
@Tag(MediumTests.TAG)
public class TestWALCompressionSnappy extends CompressedWALTestBase {

@ClassRule
public static final HBaseClassTestRule CLASS_RULE =
HBaseClassTestRule.forClass(TestWALCompressionSnappy.class);

@BeforeClass
@BeforeAll
public static void setUpBeforeClass() throws Exception {
Configuration conf = TEST_UTIL.getConfiguration();
conf.set(Compression.SNAPPY_CODEC_CLASS_KEY, SnappyCodec.class.getCanonicalName());
Expand All @@ -48,9 +43,8 @@ public static void setUpBeforeClass() throws Exception {
TEST_UTIL.startMiniDFSCluster(3);
}

@AfterClass
@AfterAll
public static void tearDown() throws Exception {
TEST_UTIL.shutdownMiniCluster();
}

}
Loading