You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by zh...@apache.org on 2022/11/23 13:04:00 UTC

[hbase] branch branch-2.5 updated (2c7776e9799 -> 8c2cfcf207e)

This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a change to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git


    from 2c7776e9799 HBASE-27496 Optionally limit the amount of plans executed in the Normalizer (#4888)
     new 9cf813465dc HBASE-27504 Remove duplicated config 'hbase.normalizer.merge.min_region_age.days' in hbase-default.xml (#4894)
     new c9ed26dd985 HBASE-27445 fix the result of DirectMemoryUtils#getDirectMemorySize (#4846)
     new 8c2cfcf207e HBASE-27501 The .flattened-pom.xml for some modules are not installed (#4893)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 hbase-common/src/main/resources/hbase-default.xml  |  5 ---
 .../hadoop/hbase/util/DirectMemoryUtils.java       | 36 +++-------------------
 pom.xml                                            |  1 +
 3 files changed, 5 insertions(+), 37 deletions(-)


[hbase] 02/03: HBASE-27445 fix the result of DirectMemoryUtils#getDirectMemorySize (#4846)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit c9ed26dd985460b0b7e9771bc9be71895465cb10
Author: Ruanhui <32...@users.noreply.github.com>
AuthorDate: Wed Nov 23 20:09:41 2022 +0800

    HBASE-27445 fix the result of DirectMemoryUtils#getDirectMemorySize (#4846)
    
    Co-authored-by: huiruan <hu...@tencent.com>
    Signed-off-by: Duo Zhang <zh...@apache.org>
    (cherry picked from commit 2f4758ee592959ee5ddd646a6769bb81a781d610)
---
 .../hadoop/hbase/util/DirectMemoryUtils.java       | 36 +++-------------------
 1 file changed, 4 insertions(+), 32 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/DirectMemoryUtils.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/DirectMemoryUtils.java
index c0a9685d13e..082796b4a15 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/DirectMemoryUtils.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/DirectMemoryUtils.java
@@ -18,12 +18,9 @@
 package org.apache.hadoop.hbase.util;
 
 import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.Locale;
 import javax.management.JMException;
 import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
@@ -37,6 +34,7 @@ import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
 import org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocatorMetric;
 import org.apache.hbase.thirdparty.io.netty.buffer.ByteBufAllocatorMetricProvider;
 import org.apache.hbase.thirdparty.io.netty.buffer.PooledByteBufAllocator;
+import org.apache.hbase.thirdparty.io.netty.util.internal.PlatformDependent;
 
 /**
  * Utilities for interacting with and monitoring DirectByteBuffer allocations.
@@ -49,6 +47,7 @@ public class DirectMemoryUtils {
   private static final MBeanServer BEAN_SERVER;
   private static final ObjectName NIO_DIRECT_POOL;
   private static final boolean HAS_MEMORY_USED_ATTRIBUTE;
+  private static final long MAX_DIRECT_MEMORY = PlatformDependent.estimateMaxDirectMemory();
 
   static {
     // initialize singletons. Only maintain a reference to the MBeanServer if
@@ -77,36 +76,9 @@ public class DirectMemoryUtils {
     HAS_MEMORY_USED_ATTRIBUTE = a != null;
   }
 
-  /**
-   * @return the setting of -XX:MaxDirectMemorySize as a long. Returns 0 if -XX:MaxDirectMemorySize
-   *         is not set.
-   */
+  /** Returns the direct memory limit of the current progress */
   public static long getDirectMemorySize() {
-    RuntimeMXBean runtimemxBean = ManagementFactory.getRuntimeMXBean();
-    List<String> arguments = runtimemxBean.getInputArguments();
-    long multiplier = 1; // for the byte case.
-    for (String s : arguments) {
-      if (s.contains("-XX:MaxDirectMemorySize=")) {
-        String memSize = s.toLowerCase(Locale.ROOT).replace("-xx:maxdirectmemorysize=", "").trim();
-
-        if (memSize.contains("k")) {
-          multiplier = 1024;
-        }
-
-        else if (memSize.contains("m")) {
-          multiplier = 1048576;
-        }
-
-        else if (memSize.contains("g")) {
-          multiplier = 1073741824;
-        }
-        memSize = memSize.replaceAll("[^\\d]", "");
-
-        long retValue = Long.parseLong(memSize);
-        return retValue * multiplier;
-      }
-    }
-    return 0;
+    return MAX_DIRECT_MEMORY;
   }
 
   /** Returns the current amount of direct memory used. */


[hbase] 03/03: HBASE-27501 The .flattened-pom.xml for some modules are not installed (#4893)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 8c2cfcf207e8b651ad7fad270653c2bff03da963
Author: Duo Zhang <zh...@apache.org>
AuthorDate: Wed Nov 23 20:17:28 2022 +0800

    HBASE-27501 The .flattened-pom.xml for some modules are not installed (#4893)
    
    Signed-off-by: Bryan Beaudreault <bb...@apache.org>
    (cherry picked from commit 84749b054c5697cb0f3240fa3c0f976cf5df865d)
---
 pom.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pom.xml b/pom.xml
index 01ea35226c6..3dc0afdabfa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1900,6 +1900,7 @@
         <version>1.3.0</version>
         <configuration>
           <embedBuildProfileDependencies>true</embedBuildProfileDependencies>
+          <updatePomFile>true</updatePomFile>
         </configuration>
         <executions>
           <!-- enable flattening -->


[hbase] 01/03: HBASE-27504 Remove duplicated config 'hbase.normalizer.merge.min_region_age.days' in hbase-default.xml (#4894)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhangduo pushed a commit to branch branch-2.5
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 9cf813465dcfc024fd9c8359d933d25d5a28ae80
Author: mokai <mo...@126.com>
AuthorDate: Wed Nov 23 18:54:00 2022 +0800

    HBASE-27504 Remove duplicated config 'hbase.normalizer.merge.min_region_age.days' in hbase-default.xml (#4894)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
    (cherry picked from commit c691091f780150d41f6205666b6c221618567ee6)
---
 hbase-common/src/main/resources/hbase-default.xml | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/hbase-common/src/main/resources/hbase-default.xml b/hbase-common/src/main/resources/hbase-default.xml
index f3a243a6e80..270d097e024 100644
--- a/hbase-common/src/main/resources/hbase-default.xml
+++ b/hbase-common/src/main/resources/hbase-default.xml
@@ -661,11 +661,6 @@ possible configurations would overwhelm and obscure the important.
     <value>3</value>
     <description>The minimum age for a region to be considered for a merge, in days.</description>
   </property>
-  <property>
-    <name>hbase.normalizer.merge.min_region_age.days</name>
-    <value>3</value>
-    <description>The minimum age for a region to be considered for a merge, in days.</description>
-  </property>
   <property>
     <name>hbase.normalizer.merge.min_region_size.mb</name>
     <value>1</value>