(hadoop) branch HDFS-17384 updated: HDFS-17394. [FGL] Remove unused WriteHoldCount of FSNamesystemLock (#6571)

2024-02-26 Thread ferhui
This is an automated email from the ASF dual-hosted git repository.

ferhui pushed a commit to branch HDFS-17384
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/HDFS-17384 by this push:
 new d58260a0988e HDFS-17394. [FGL] Remove unused WriteHoldCount of 
FSNamesystemLock (#6571)
d58260a0988e is described below

commit d58260a0988e111f370472103e0d56469d0347b5
Author: ZanderXu 
AuthorDate: Tue Feb 27 14:12:02 2024 +0800

HDFS-17394. [FGL] Remove unused WriteHoldCount of FSNamesystemLock (#6571)
---
 .../hdfs/server/namenode/ContentSummaryComputationContext.java |  3 +--
 .../org/apache/hadoop/hdfs/server/namenode/FSDirectory.java| 10 --
 .../org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java   |  4 
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryComputationContext.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryComputationContext.java
index 61a34828f14d..bbebe78fb1f6 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryComputationContext.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ContentSummaryComputationContext.java
@@ -123,8 +123,7 @@ public class ContentSummaryComputationContext {
 
 // sanity check.
 if (!hadDirReadLock || !hadFsnReadLock || hadDirWriteLock ||
-hadFsnWriteLock || dir.getReadHoldCount() != 1 ||
-fsn.getReadHoldCount() != 1) {
+hadFsnWriteLock || fsn.getReadHoldCount() != 1) {
   // cannot relinquish
   return false;
 }
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
index 52ba4729a713..0305cbab3e37 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
@@ -284,16 +284,6 @@ public class FSDirectory implements Closeable {
 return namesystem.hasReadLock();
   }
 
-  @Deprecated // dirLock is obsolete, use namesystem.fsLock instead
-  public int getReadHoldCount() {
-return namesystem.getReadHoldCount();
-  }
-
-  @Deprecated // dirLock is obsolete, use namesystem.fsLock instead
-  public int getWriteHoldCount() {
-return namesystem.getWriteHoldCount();
-  }
-
   public int getListLimit() {
 return lsLimit;
   }
diff --git 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
index 075398f000ec..8f0e535d953f 100644
--- 
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
+++ 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
@@ -1849,10 +1849,6 @@ public class FSNamesystem implements Namesystem, 
FSNamesystemMBean,
 return this.fsLock.getReadHoldCount();
   }
 
-  public int getWriteHoldCount() {
-return this.fsLock.getWriteHoldCount();
-  }
-
   /** Lock the checkpoint lock */
   public void cpLock() {
 this.cpLock.lock();


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org



(hadoop) branch trunk updated (a897e745f598 -> 15af52954f32)

2024-02-26 Thread zhangshuyan
This is an automated email from the ASF dual-hosted git repository.

zhangshuyan pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


from a897e745f598 HDFS-17393. Remove unused FSNamesytemLock cond in 
FSNamesystem (#6567)
 add 15af52954f32 HDFS-17358. EC: infinite lease recovery caused by the 
length of RWR equals to zero or datanode does not have the replica. (#6509). 
Contributed by farmmamba.

No new revisions were added by this update.

Summary of changes:
 .../hdfs/server/datanode/BlockRecoveryWorker.java  | 44 +-
 .../datanode/erasurecode/StripedBlockReader.java   |  4 +-
 .../hadoop/hdfs/TestLeaseRecoveryStriped.java  | 29 ++
 3 files changed, 66 insertions(+), 11 deletions(-)


-
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org



(hadoop) branch branch-3.4 updated: HADOOP-19065. Update Protocol Buffers installation to 3.21.12 (#6576) Contributed by Zhaobo Huang.

2024-02-26 Thread slfan1989
This is an automated email from the ASF dual-hosted git repository.

slfan1989 pushed a commit to branch branch-3.4
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-3.4 by this push:
 new 175f245107f8 HADOOP-19065. Update Protocol Buffers installation to 
3.21.12 (#6576) Contributed by Zhaobo Huang.
175f245107f8 is described below

commit 175f245107f8547d6af7c01dc5c6c0f8cd30dd66
Author: huangzhaobo 
AuthorDate: Mon Feb 26 22:51:20 2024 +0800

HADOOP-19065. Update Protocol Buffers installation to 3.21.12 (#6576) 
Contributed by Zhaobo Huang.

Reviewed-by: Steve Loughran 
Signed-off-by: Shilun Fan 
---
 BUILDING.txt   | 29 +++---
 dev-support/docker/Dockerfile  |  2 +-
 dev-support/docker/Dockerfile_aarch64  |  2 +-
 dev-support/docker/Dockerfile_centos_7 |  2 +-
 dev-support/docker/Dockerfile_centos_8 |  2 +-
 dev-support/docker/Dockerfile_debian_10|  2 +-
 .../docker/pkg-resolver/install-protobuf.sh|  9 ---
 7 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/BUILDING.txt b/BUILDING.txt
index a98d7049a2b0..3d35007c9cbe 100644
--- a/BUILDING.txt
+++ b/BUILDING.txt
@@ -7,7 +7,7 @@ Requirements:
 * JDK 1.8
 * Maven 3.3 or later
 * Boost 1.72 (if compiling native code)
-* Protocol Buffers 3.7.1 (if compiling native code)
+* Protocol Buffers 3.21.12 (if compiling native code)
 * CMake 3.19 or newer (if compiling native code)
 * Zlib devel (if compiling native code)
 * Cyrus SASL devel (if compiling native code)
@@ -74,10 +74,10 @@ Refer to  dev-support/docker/Dockerfile):
   $ ./bootstrap
   $ make -j$(nproc)
   $ sudo make install
-* Protocol Buffers 3.7.1 (required to build native code)
-  $ curl -L -s -S 
https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz
 -o protobuf-3.7.1.tar.gz
-  $ mkdir protobuf-3.7-src
-  $ tar xzf protobuf-3.7.1.tar.gz --strip-components 1 -C protobuf-3.7-src && 
cd protobuf-3.7-src
+* Protocol Buffers 3.21.12 (required to build native code)
+  $ curl -L 
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > 
protobuf-3.21.12.tar.gz
+  $ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
+  $ ./autogen.sh
   $ ./configure
   $ make -j$(nproc)
   $ sudo make install
@@ -437,10 +437,10 @@ Installing required dependencies for clean install of 
macOS 10.14:
 * Install native libraries, only openssl is required to compile native code,
 you may optionally install zlib, lz4, etc.
   $ brew install openssl
-* Protocol Buffers 3.7.1 (required to compile native code)
-  $ wget 
https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protobuf-java-3.7.1.tar.gz
-  $ mkdir -p protobuf-3.7 && tar zxvf protobuf-java-3.7.1.tar.gz 
--strip-components 1 -C protobuf-3.7
-  $ cd protobuf-3.7
+* Protocol Buffers 3.21.12 (required to compile native code)
+  $ curl -L 
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > 
protobuf-3.21.12.tar.gz
+  $ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
+  $ ./autogen.sh
   $ ./configure
   $ make
   $ make check
@@ -476,11 +476,10 @@ Building on CentOS 8
 * Install python2 for building documentation.
   $ sudo dnf install python2
 
-* Install Protocol Buffers v3.7.1.
-  $ git clone https://github.com/protocolbuffers/protobuf
-  $ cd protobuf
-  $ git checkout v3.7.1
-  $ autoreconf -i
+* Install Protocol Buffers v3.21.12.
+  $ curl -L 
https://github.com/protocolbuffers/protobuf/archive/refs/tags/v3.21.12.tar.gz > 
protobuf-3.21.12.tar.gz
+  $ tar -zxvf protobuf-3.21.12.tar.gz && cd protobuf-3.21.12
+  $ ./autogen.sh
   $ ./configure --prefix=/usr/local
   $ make
   $ sudo make install
@@ -535,7 +534,7 @@ Requirements:
 * JDK 1.8
 * Maven 3.0 or later (maven.apache.org)
 * Boost 1.72 (boost.org)
-* Protocol Buffers 3.7.1 (https://github.com/protocolbuffers/protobuf/releases)
+* Protocol Buffers 3.21.12 (https://github.com/protocolbuffers/protobuf/tags)
 * CMake 3.19 or newer (cmake.org)
 * Visual Studio 2019 (visualstudio.com)
 * Windows SDK 8.1 (optional, if building CPU rate control for the container 
executor. Get this from
diff --git a/dev-support/docker/Dockerfile b/dev-support/docker/Dockerfile
index fac364bbd436..3b71e622a575 100644
--- a/dev-support/docker/Dockerfile
+++ b/dev-support/docker/Dockerfile
@@ -66,7 +66,7 @@ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
 ENV SPOTBUGS_HOME /opt/spotbugs
 
 ###
-# Set env vars for Google Protobuf 3.7.1
+# Set env vars for Google Protobuf 3.21.12
 ###
 ENV PROTOBUF_HOME /opt/protobuf
 ENV PATH "${PATH}:/opt/protobuf/bin"
diff --git a/dev-support/docker/Dockerfile_aarch64 
b/dev-support/docker/Dockerfile_aarch64
index 14a537801270..9941c7dd619f 100644
--- a/dev-support/docker/Dockerfile_aarch64
+++ b/dev-support/docker/Dockerfile_aarch64
@@ -66,7 +6