diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java index 825118fed3c3c..f88035f4a44d3 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Quota.java @@ -75,7 +75,7 @@ public Quota(Router router, RouterRpcServer server) { * @param storagespaceQuota Storage space quota. * @param type StorageType that the space quota is intended to be set on. * @param checkMountEntry whether to check the path is a mount entry. - * @throws AccessControlException If the quota system is disabled or if + * @throws IOException If the quota system is disabled or if * checkMountEntry is true and the path is a mount entry. */ public void setQuota(String path, long namespaceQuota, long storagespaceQuota, diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/StateStoreService.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/StateStoreService.java index ff0ea486e216c..74997e86be3d2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/StateStoreService.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/StateStoreService.java @@ -138,7 +138,7 @@ public StateStoreService() { * Initialize the State Store and the connection to the back-end. * * @param config Configuration for the State Store. - * @throws IOException Cannot create driver for the State Store. + * @throws Exception Cannot create driver for the State Store. */ @Override protected void serviceInit(Configuration config) throws Exception { @@ -239,7 +239,6 @@ protected void serviceStop() throws Exception { * * @param Type of the records stored. * @param clazz Class of the record store to track. - * @return New record store. * @throws ReflectiveOperationException */ private > void addRecordStore( @@ -428,7 +427,6 @@ public void refreshCaches(boolean force) { result = cachedStore.loadCache(force); } catch (IOException e) { LOG.error("Error updating cache for {}", cacheName, e); - result = false; } if (!result) { success = false; diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/impl/MountTableStoreImpl.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/impl/MountTableStoreImpl.java index a46410a274163..3ace406e49a3e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/impl/MountTableStoreImpl.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/impl/MountTableStoreImpl.java @@ -70,7 +70,7 @@ public MountTableStoreImpl(StateStoreDriver driver) { * * @param src mount entry being accessed * @param action type of action being performed on the mount entry - * @throws AccessControlException if mount table cannot be accessed + * @throws IOException if mount table cannot be accessed */ private void checkMountTableEntryPermission(String src, FsAction action) throws IOException { @@ -90,7 +90,7 @@ private void checkMountTableEntryPermission(String src, FsAction action) * Check parent path permission recursively. It needs WRITE permission * of the nearest parent entry and other EXECUTE permission. * @param src mount entry being checked - * @throws AccessControlException if mount table cannot be accessed + * @throws IOException if mount table cannot be accessed */ private void checkMountTablePermission(final String src) throws IOException { String parent = src.substring(0, src.lastIndexOf(Path.SEPARATOR)); diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/protocol/impl/pb/FederationProtocolPBTranslator.java b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/protocol/impl/pb/FederationProtocolPBTranslator.java index 003bcfaddb694..b50b516c6155a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/protocol/impl/pb/FederationProtocolPBTranslator.java +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/store/protocol/impl/pb/FederationProtocolPBTranslator.java @@ -54,7 +54,7 @@ public FederationProtocolPBTranslator(Class

protoType) { * the proto handler this translator holds. */ @SuppressWarnings("unchecked") - public void setProto(Message p) { + public void setProto(Message p) throws IllegalArgumentException { if (protoClass.isInstance(p)) { if (this.builder != null) { // Merge with builder