You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2020/04/30 06:15:02 UTC
[hadoop-ozone] branch master updated: HDDS-2406. Ozone shell key
get throws IllegalArgumentException if pipeline is empty. (#884)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 8ce8efa HDDS-2406. Ozone shell key get throws IllegalArgumentException if pipeline is empty. (#884)
8ce8efa is described below
commit 8ce8efa440c6535b43739e7912af8d7fdb361322
Author: flirmnave <fl...@gmail.com>
AuthorDate: Thu Apr 30 14:14:54 2020 +0800
HDDS-2406. Ozone shell key get throws IllegalArgumentException if pipeline is empty. (#884)
---
.../main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
index 2eb2f9e..8cc6e8d 100644
--- a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
+++ b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientManager.java
@@ -53,6 +53,7 @@ import java.util.function.Function;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.apache.hadoop.hdds.conf.ConfigTag.OZONE;
import static org.apache.hadoop.hdds.conf.ConfigTag.PERFORMANCE;
+import static org.apache.hadoop.hdds.scm.exceptions.SCMException.ResultCodes.NO_REPLICA_FOUND;
/**
* XceiverClientManager is responsible for the lifecycle of XceiverClient
@@ -168,7 +169,8 @@ public class XceiverClientManager implements Closeable {
throws IOException {
Preconditions.checkNotNull(pipeline);
Preconditions.checkArgument(pipeline.getNodes() != null);
- Preconditions.checkArgument(!pipeline.getNodes().isEmpty());
+ Preconditions.checkArgument(!pipeline.getNodes().isEmpty(),
+ NO_REPLICA_FOUND);
synchronized (clientCache) {
XceiverClientSpi info = getClient(pipeline, read);
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-commits-help@hadoop.apache.org