Skip to content

HBASE-28287 MOB HFiles are expired earlier than their reference data - #5599

Merged
Apache9 merged 2 commits into
apache:masterfrom
liuwenjing17:mobttl-expired-inaccurate-master
Jan 13, 2024
Merged

HBASE-28287 MOB HFiles are expired earlier than their reference data#5599
Apache9 merged 2 commits into
apache:masterfrom
liuwenjing17:mobttl-expired-inaccurate-master

Conversation

@liuwenjing17

Copy link
Copy Markdown
Contributor

No description provided.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 28sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall3m 11smaster passed
+1 💚compile2m 48smaster passed
+1 💚checkstyle0m 51smaster passed
+1 💚spotless0m 54sbranch has no errors when running spotless:check.
+1 💚spotbugs2m 1smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 36sthe patch passed
+1 💚compile2m 45sthe patch passed
+1 💚javac2m 45sthe patch passed
+1 💚checkstyle0m 37sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck12m 21sPatch does not cause any errors with Hadoop 3.2.4 3.3.6.
+1 💚spotless0m 55spatch has no errors when running spotless:check.
+1 💚spotbugs2m 9sthe patch passed
_ Other Tests _
+1 💚asflicense0m 11sThe patch does not generate ASF License warnings.
40m 23s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5599
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 7bdbfef3d261 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 75801a5
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count86 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec1m 5sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 2smaster passed
+1 💚compile0m 43smaster passed
+1 💚shadedjars5m 15sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 24smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 41sthe patch passed
+1 💚compile0m 44sthe patch passed
+1 💚javac0m 44sthe patch passed
+1 💚shadedjars5m 11spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 22sthe patch passed
_ Other Tests _
+1 💚unit214m 39shbase-server in the patch passed.
237m 52s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5599
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 0a3959e0c838 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 75801a5
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/testReport/
Max. process+thread count4555 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 25sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall2m 42smaster passed
+1 💚compile0m 37smaster passed
+1 💚shadedjars5m 50sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 29smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 57sthe patch passed
+1 💚compile0m 43sthe patch passed
+1 💚javac0m 43sthe patch passed
+1 💚shadedjars5m 55spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 27sthe patch passed
_ Other Tests _
-1 ❌unit268m 53shbase-server in the patch failed.
293m 22s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5599
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 18a5cf57db08 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / 75801a5
Default JavaTemurin-1.8.0_352-b08
unithttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-hbase-server.txt
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/testReport/
Max. process+thread count4582 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/1/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9Apache9 changed the title Fix the inaccurate expired time of MOB HFilesHBASE-28287 Fix the inaccurate expired time of MOB HFilesJan 3, 2024
@Apache9

Copy link
Copy Markdown
Contributor

I still do not fully understand the problem here...

If we do not set millis to zero, it will only affect the life time of a MOB file for less than 1 second, how could it make the MOB file expire 2 hours earlier?

@liuwenjing17

Copy link
Copy Markdown
ContributorAuthor

I still do not fully understand the problem here...

If we do not set millis to zero, it will only affect the life time of a MOB file for less than 1 second, how could it make the MOB file expire 2 hours earlier?

Because in org.apache.hadoop.hbase.mob.MobUtils, the creation time of mob files is obtained by parsing their names from fileName using the statement (Date fileDate = parseDate(MobFileName.getDateFromName(fileName));). For instance, data created on 20240105, their timestamps will be parsed as 1704384000000 (2024-01-05 00:00:00). In this way, when the master expired mob thread starts, it may affect the life time of a MOB file for less than 1 day.

@Apache9

Apache9 commented Jan 5, 2024

Copy link
Copy Markdown
Contributor

I still do not fully understand the problem here...
If we do not set millis to zero, it will only affect the life time of a MOB file for less than 1 second, how could it make the MOB file expire 2 hours earlier?

Because in org.apache.hadoop.hbase.mob.MobUtils, the creation time of mob files is obtained by parsing their names from fileName using the statement (Date fileDate = parseDate(MobFileName.getDateFromName(fileName));). For instance, data created on 20240105, their timestamps will be parsed as 1704384000000 (2024-01-05 00:00:00). In this way, when the master expired mob thread starts, it may affect the life time of a MOB file for less than 1 day.

Then the problem is we should use a timestamp instead of '20240105' in the mob file name? I still do not understand why setting MILLISECOND to 0 can solve the problem...

@liuwenjing17

Copy link
Copy Markdown
ContributorAuthor

I still do not fully understand the problem here...
If we do not set millis to zero, it will only affect the life time of a MOB file for less than 1 second, how could it make the MOB file expire 2 hours earlier?

Because in org.apache.hadoop.hbase.mob.MobUtils, the creation time of mob files is obtained by parsing their names from fileName using the statement (Date fileDate = parseDate(MobFileName.getDateFromName(fileName));). For instance, data created on 20240105, their timestamps will be parsed as 1704384000000 (2024-01-05 00:00:00). In this way, when the master expired mob thread starts, it may affect the life time of a MOB file for less than 1 day.

Then the problem is we should use a timestamp instead of '20240105' in the mob file name? I still do not understand why setting MILLISECOND to 0 can solve the problem...

Here is an example:

  1. Assume the Time-To-Live (TTL) for the mob data is set to 1 day.
  2. We write mob data at 18:33 on 01/04/2023, and the data is flushed to a mob file named xxxx20230104xxxx.
  3. The mob expiration thread starts within 1 day, at 10:45 on 01/05/2023.
  4. When checking ts, the standard expired timestamp is calculated as (currentTS - 1day parsed by Calendar) : 1704297600720 (2024-01-04 00:00:00)(3 random digits when only set to SECOND level)
    The mob file's ts, parsed from its name, is : 1704297600000 (2024-01-04 00:00:00)
  5. if (fileDate.getTime() < expireDate.getTime()) {/* expired */}
    if statement is true, indicating that the mob file has expired, and it will be cleaned. These 3 random digits cause the mob files to be cleaned earlier than expected.
  6. But if we set to MILLISECOND level, the expireDate.getTime() will be 1704297600000, and if statement will be false. In this case, the mob file will be retained as intended.

And here is the link to jira: https://issues.apache.org/jira/browse/HBASE-28287

@Apache9

Copy link
Copy Markdown
Contributor

OK. Got it. Thanks for the explaination.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 27sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
+1 💚@author0m 0sThe patch does not contain any @author tags.
_ master Compile Tests _
+1 💚mvninstall3m 18smaster passed
+1 💚compile2m 35smaster passed
+1 💚checkstyle0m 34smaster passed
+1 💚spotless0m 45sbranch has no errors when running spotless:check.
+1 💚spotbugs1m 33smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 55sthe patch passed
+1 💚compile2m 35sthe patch passed
+1 💚javac2m 35sthe patch passed
+1 💚checkstyle0m 35sthe patch passed
+1 💚whitespace0m 0sThe patch has no whitespace issues.
+1 💚hadoopcheck5m 29sPatch does not cause any errors with Hadoop 3.3.6.
+1 💚spotless0m 42spatch has no errors when running spotless:check.
+1 💚spotbugs1m 39sthe patch passed
_ Other Tests _
+1 💚asflicense0m 10sThe patch does not generate ASF License warnings.
30m 4s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#5599
Optional Testsdupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
unameLinux 0b3bbb291ffd 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / a09305d
Default JavaEclipse Adoptium-11.0.17+8
Max. process+thread count80 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/console
versionsgit=2.34.1 maven=3.8.6 spotbugs=4.7.3
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 26sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall2m 41smaster passed
+1 💚compile0m 36smaster passed
+1 💚shadedjars5m 21sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 24smaster passed
_ Patch Compile Tests _
+1 💚mvninstall2m 20sthe patch passed
+1 💚compile0m 37sthe patch passed
+1 💚javac0m 37sthe patch passed
+1 💚shadedjars5m 18spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 21sthe patch passed
_ Other Tests _
+1 💚unit221m 13shbase-server in the patch passed.
243m 8s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR#5599
Optional Testsjavac javadoc unit shadedjars compile
unameLinux d6d3aff6000e 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / a09305d
Default JavaTemurin-1.8.0_352-b08
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/testReport/
Max. process+thread count4607 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeComment
+0 🆗reexec0m 25sDocker mode activated.
-0 ⚠️yetus0m 2sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+1 💚mvninstall3m 4smaster passed
+1 💚compile0m 45smaster passed
+1 💚shadedjars5m 27sbranch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 24smaster passed
_ Patch Compile Tests _
+1 💚mvninstall3m 27sthe patch passed
+1 💚compile0m 51sthe patch passed
+1 💚javac0m 51sthe patch passed
+1 💚shadedjars6m 19spatch has no errors when building our shaded downstream artifacts.
+1 💚javadoc0m 23sthe patch passed
_ Other Tests _
+1 💚unit218m 49shbase-server in the patch passed.
243m 58s
SubsystemReport/Notes
DockerClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR#5599
Optional Testsjavac javadoc unit shadedjars compile
unameLinux 62079c1caf4b 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionmaster / a09305d
Default JavaEclipse Adoptium-11.0.17+8
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/testReport/
Max. process+thread count5122 (vs. ulimit of 30000)
modulesC: hbase-server U: hbase-server
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-5599/2/console
versionsgit=2.34.1 maven=3.8.6
Powered byApache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache9Apache9 changed the title HBASE-28287 Fix the inaccurate expired time of MOB HFilesHBASE-28287 MOB HFiles are expired earlier than their reference dataJan 13, 2024
@Apache9
Apache9 merged commit 4d2b8f8 into apache:masterJan 13, 2024
Apache9 pushed a commit that referenced this pull request Jan 13, 2024
…5599)
Co-authored-by: liuwenjing3 <liuwenjing3@360.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 4d2b8f8)
Apache9 pushed a commit that referenced this pull request Jan 13, 2024
…5599)
Co-authored-by: liuwenjing3 <liuwenjing3@360.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 4d2b8f8)
Apache9 pushed a commit that referenced this pull request Jan 13, 2024
…5599)
Co-authored-by: liuwenjing3 <liuwenjing3@360.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 4d2b8f8)
Apache9 pushed a commit that referenced this pull request Jan 13, 2024
…5599)
Co-authored-by: liuwenjing3 <liuwenjing3@360.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 4d2b8f8)
Apache9 pushed a commit that referenced this pull request Jan 13, 2024
…5599)
Co-authored-by: liuwenjing3 <liuwenjing3@360.cn>
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit 4d2b8f8)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@liuwenjing17@Apache-HBase@Apache9@wchevreuil