You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by in...@apache.org on 2017/04/17 17:58:02 UTC
[05/50] [abbrv] hadoop git commit: HDFS-11592. Closing a file has a
wasteful preconditions in NameNode. Contributed by Eric Badger
HDFS-11592. Closing a file has a wasteful preconditions in NameNode. Contributed by Eric Badger
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/df919ee7
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/df919ee7
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/df919ee7
Branch: refs/heads/HDFS-10467
Commit: df919ee734289072c42a7133889a3c2005b7ae77
Parents: 2ad28df
Author: Mingliang Liu <li...@apache.org>
Authored: Thu Mar 30 15:44:06 2017 -0700
Committer: Inigo <in...@apache.org>
Committed: Thu Apr 6 18:58:19 2017 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hdfs/server/namenode/INodeFile.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/df919ee7/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
index 2b0e0ad..3da6aa7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeFile.java
@@ -328,9 +328,11 @@ public class INodeFile extends INodeWithAdditionalFields
for (int i = 0; i < blocks.length; i++) {
final String err = checkBlockComplete(blocks, i, numCommittedAllowed,
minReplication);
- Preconditions.checkState(err == null,
- "Unexpected block state: %s, file=%s (%s), blocks=%s (i=%s)",
- err, this, getClass().getSimpleName(), Arrays.asList(blocks), i);
+ if(err != null) {
+ throw new IllegalStateException(String.format("Unexpected block state: " +
+ "%s, file=%s (%s), blocks=%s (i=%s)", err, this,
+ getClass().getSimpleName(), Arrays.asList(blocks), i));
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org