hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject [8/8] hbase git commit: HBASE-21263 Mention compression algorithm along with other storefile details
Date Tue, 16 Oct 2018 21:03:43 GMT
HBASE-21263 Mention compression algorithm along with other storefile details

Signed-off-by: Andrew Purtell <apurtell@apache.org>
Amending-Author: Andrew Purtell <apurtell@apache.org>

Conflicts:
	hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
	hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/26ef2a01
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/26ef2a01
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/26ef2a01

Branch: refs/heads/branch-1.3
Commit: 26ef2a016032bc05c2ce6fd1b1a96034413c1ed5
Parents: 743f9a4
Author: subrat.mishra <subrat.mishra@yahoo.com>
Authored: Mon Oct 15 18:33:48 2018 +0530
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Tue Oct 16 13:45:49 2018 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HStore.java   | 7 +++++++
 .../hadoop/hbase/regionserver/compactions/Compactor.java    | 1 +
 .../java/org/apache/hadoop/hbase/io/hfile/TestChecksum.java | 9 +++++----
 .../org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java    | 7 ++++---
 .../apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java   | 2 +-
 .../hadoop/hbase/regionserver/CreateRandomStoreFile.java    | 2 +-
 6 files changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/26ef2a01/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
index 5e07b6b..a57f906 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
@@ -289,6 +289,7 @@ public class HStore implements Store {
           "hbase.hstore.flush.retries.number must be > 0, not "
               + flushRetriesNumber);
     }
+
     // Crypto context for new store files
     String cipherName = family.getEncryptionType();
     if (cipherName != null) {
@@ -345,6 +346,12 @@ public class HStore implements Store {
       cryptoContext.setCipher(cipher);
       cryptoContext.setKey(key);
     }
+
+    LOG.info("Store=" + getColumnFamilyName() +
+      ", memstore type=" + this.memstore.getClass().getSimpleName() +
+      ", verifyBulkLoads=" + verifyBulkLoads +
+      ", encoding=" + family.getDataBlockEncoding() +
+      ", compression=" + family.getCompressionType());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/26ef2a01/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
index 75c7f58..c78350d 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
@@ -199,6 +199,7 @@ public abstract class Compactor<T extends CellSink> {
           ", bloomtype=" + r.getBloomFilterType().toString() +
           ", size=" + TraditionalBinaryPrefix.long2String(r.length(), "", 1) +
           ", encoding=" + r.getHFileReader().getDataBlockEncoding() +
+          ", compression=" + compactionCompression +
           ", seqNum=" + seqNum +
           (allFiles ? ", earliestPutTs=" + earliestPutTs: ""));
       }

http://git-wip-us.apache.org/repos/asf/hbase/blob/26ef2a01/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestChecksum.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestChecksum.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestChecksum.java
index 1452ecb..f7e87b0 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestChecksum.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestChecksum.java
@@ -295,10 +295,11 @@ public class TestChecksum {
                                dataSize + HConstants.HFILEBLOCK_HEADER_SIZE,
                                bytesPerChecksum);
         LOG.info("testChecksumChunks: pread=" + pread +
-                   ", bytesPerChecksum=" + bytesPerChecksum +
-                   ", fileSize=" + totalSize +
-                   ", dataSize=" + dataSize +
-                   ", expectedChunks=" + expectedChunks);
+          ", bytesPerChecksum=" + bytesPerChecksum +
+          ", fileSize=" + totalSize + 
+          ", dataSize=" + dataSize +
+          ", expectedChunks=" + expectedChunks +
+          ", compression=" + algo);
 
         // Verify hbase checksums.
         assertEquals(true, hfs.useHBaseChecksum());

http://git-wip-us.apache.org/repos/asf/hbase/blob/26ef2a01/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
index 2e3d4a0..47c5820 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
@@ -364,6 +364,8 @@ public class TestHFileBlock {
     for (Compression.Algorithm algo : COMPRESSION_ALGORITHMS) {
       for (boolean pread : new boolean[] { false, true }) {
         for (DataBlockEncoding encoding : DataBlockEncoding.values()) {
+          LOG.info("testDataBlockEncoding: Compression algorithm=" + algo + ", pread=" +
pread +
+            ", dataBlockEncoder=" + encoding);
           Path path = new Path(TEST_UTIL.getDataTestDir(), "blocks_v2_"
               + algo + "_" + encoding.toString());
           FSDataOutputStream os = fs.create(path);
@@ -520,9 +522,8 @@ public class TestHFileBlock {
       for (boolean pread : BOOLEAN_VALUES) {
         for (boolean cacheOnWrite : BOOLEAN_VALUES) {
           Random rand = defaultRandom();
-          LOG.info("testPreviousOffset:Compression algorithm: " + algo +
-                   ", pread=" + pread +
-                   ", cacheOnWrite=" + cacheOnWrite);
+          LOG.info("testPreviousOffset: Compression algorithm=" + algo + ", pread=" + pread
+
+            ", cacheOnWrite=" + cacheOnWrite);
           Path path = new Path(TEST_UTIL.getDataTestDir(), "prev_offset");
           List<Long> expectedOffsets = new ArrayList<Long>();
           List<Long> expectedPrevOffsets = new ArrayList<Long>();

http://git-wip-us.apache.org/repos/asf/hbase/blob/26ef2a01/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
index 6372713..04d12ca 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
@@ -188,7 +188,7 @@ public class TestHFileBlockIndex {
 
   private void readIndex(boolean useTags) throws IOException {
     long fileSize = fs.getFileStatus(path).getLen();
-    LOG.info("Size of " + path + ": " + fileSize);
+    LOG.info("Size of " + path + ": " + fileSize + ", compression=" + compr);
 
     FSDataInputStream istream = fs.open(path);
     HFileContext meta = new HFileContextBuilder()

http://git-wip-us.apache.org/repos/asf/hbase/blob/26ef2a01/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/CreateRandomStoreFile.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/CreateRandomStoreFile.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/CreateRandomStoreFile.java
index c3f7b82..bcba1f9 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/CreateRandomStoreFile.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/CreateRandomStoreFile.java
@@ -209,7 +209,7 @@ public class CreateRandomStoreFile {
 
     Path storeFilePath = sfw.getPath();
     long fileSize = fs.getFileStatus(storeFilePath).getLen();
-    LOG.info("Created " + storeFilePath + ", " + fileSize + " bytes");
+    LOG.info("Created " + storeFilePath + ", " + fileSize + " bytes, compression=" + compr);
 
     return true;
   }


Mime
View raw message