Skip to content

Commit 0338c4b

Browse files
committed
HDFS-17672. [ARR] Move asynchronous related classes to the async package.
1 parent 1363190 commit 0338c4b

File tree

16 files changed

+35
-38
lines changed

16 files changed

+35
-38
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ private String getCurrentFairnessPolicyControllerClassName() {
19401940
* @return A prioritized list of NNs to use for communication.
19411941
* @throws IOException If a NN cannot be located for the nameservice ID.
19421942
*/
1943-
protected List<? extends FederationNamenodeContext> getOrderedNamenodes(String nsId,
1943+
public List<? extends FederationNamenodeContext> getOrderedNamenodes(String nsId,
19441944
boolean isObserverRead) throws IOException {
19451945
final List<? extends FederationNamenodeContext> namenodes;
19461946

hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterRpcServer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ RemoteLocation getCreateLocation(
10331033
* @return The remote location for this file.
10341034
* @throws IOException If the file has no creation location.
10351035
*/
1036-
RemoteLocation getCreateLocationAsync(
1036+
public RemoteLocation getCreateLocationAsync(
10371037
final String src, final List<RemoteLocation> locations)
10381038
throws IOException {
10391039

@@ -1996,7 +1996,7 @@ public Long getNextSPSPath() throws IOException {
19961996
* @return Prioritized list of locations in the federated cluster.
19971997
* @throws IOException If the location for this path cannot be determined.
19981998
*/
1999-
protected List<RemoteLocation> getLocationsForPath(String path,
1999+
public List<RemoteLocation> getLocationsForPath(String path,
20002000
boolean failIfLocked) throws IOException {
20012001
return getLocationsForPath(path, failIfLocked, true);
20022002
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.async;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020
import org.apache.hadoop.conf.Configuration;
2121
import org.apache.hadoop.fs.FileSystem;
@@ -25,7 +25,6 @@
2525
import org.apache.hadoop.hdfs.server.federation.MockResolver;
2626
import org.apache.hadoop.hdfs.server.federation.RouterConfigBuilder;
2727
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
28-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
2928
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3029
import org.apache.hadoop.ipc.CallerContext;
3130
import org.junit.After;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
package org.apache.hadoop.hdfs.server.federation.router;
19+
package org.apache.hadoop.hdfs.server.federation.router.async;
2020

2121
import org.apache.hadoop.conf.Configuration;
2222
import org.apache.hadoop.fs.CacheFlag;
@@ -31,8 +31,8 @@
3131
import org.apache.hadoop.hdfs.server.federation.MockResolver;
3232
import org.apache.hadoop.hdfs.server.federation.RouterConfigBuilder;
3333
import org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries;
34-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncCacheAdmin;
35-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
34+
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
35+
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3636
import org.apache.hadoop.ipc.CallerContext;
3737
import org.junit.After;
3838
import org.junit.AfterClass;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.router;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020

2121
import org.apache.hadoop.conf.Configuration;
@@ -32,8 +32,8 @@
3232
import org.apache.hadoop.hdfs.server.federation.MiniRouterDFSCluster;
3333
import org.apache.hadoop.hdfs.server.federation.MockResolver;
3434
import org.apache.hadoop.hdfs.server.federation.RouterConfigBuilder;
35-
import org.apache.hadoop.hdfs.server.federation.router.async.AsyncErasureCoding;
36-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
35+
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
36+
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3737
import org.apache.hadoop.io.erasurecode.ECSchema;
3838
import org.apache.hadoop.ipc.CallerContext;
3939
import org.junit.After;
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.async;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
2121
import org.apache.hadoop.hdfs.protocol.HdfsConstants;
2222
import org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys;
2323
import org.apache.hadoop.hdfs.server.federation.router.RouterNamenodeProtocol;
24-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncNamenodeProtocol;
2524
import org.apache.hadoop.hdfs.server.protocol.BlocksWithLocations;
2625
import org.apache.hadoop.hdfs.server.protocol.BlocksWithLocations.BlockWithLocations;
2726
import org.apache.hadoop.hdfs.server.protocol.NamespaceInfo;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.router;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020
import org.apache.hadoop.conf.Configuration;
2121
import org.apache.hadoop.fs.FSDataOutputStream;
@@ -27,8 +27,8 @@
2727
import org.apache.hadoop.hdfs.server.federation.MiniRouterDFSCluster;
2828
import org.apache.hadoop.hdfs.server.federation.MockResolver;
2929
import org.apache.hadoop.hdfs.server.federation.RouterConfigBuilder;
30-
import org.apache.hadoop.hdfs.server.federation.router.async.AsyncQuota;
31-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
30+
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
31+
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3232
import org.apache.hadoop.ipc.CallerContext;
3333
import org.junit.After;
3434
import org.junit.AfterClass;
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.router;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020
import org.apache.hadoop.conf.Configuration;
2121
import org.apache.hadoop.fs.FSDataOutputStream;
@@ -30,7 +30,11 @@
3030
import org.apache.hadoop.hdfs.server.federation.metrics.FederationRPCMetrics;
3131
import org.apache.hadoop.hdfs.server.federation.resolver.FederationNamenodeContext;
3232
import org.apache.hadoop.hdfs.server.federation.resolver.RemoteLocation;
33-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
33+
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
34+
import org.apache.hadoop.hdfs.server.federation.router.RemoteMethod;
35+
import org.apache.hadoop.hdfs.server.federation.router.RemoteParam;
36+
import org.apache.hadoop.hdfs.server.federation.router.Router;
37+
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3438
import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
3539
import org.apache.hadoop.ipc.CallerContext;
3640
import org.apache.hadoop.ipc.RetriableException;
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.router;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020
import org.apache.hadoop.conf.Configuration;
2121
import org.apache.hadoop.fs.FileSystem;
@@ -28,7 +28,9 @@
2828
import org.apache.hadoop.hdfs.server.federation.MockResolver;
2929
import org.apache.hadoop.hdfs.server.federation.RouterConfigBuilder;
3030
import org.apache.hadoop.hdfs.server.federation.resolver.RemoteLocation;
31-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
31+
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
32+
import org.apache.hadoop.hdfs.server.federation.router.RemoteMethod;
33+
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3234
import org.apache.hadoop.hdfs.server.protocol.DatanodeStorageReport;
3335
import org.apache.hadoop.ipc.CallerContext;
3436
import org.junit.After;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
package org.apache.hadoop.hdfs.server.federation.router;
18+
package org.apache.hadoop.hdfs.server.federation.router.async;
1919

2020
import org.apache.hadoop.conf.Configuration;
2121
import org.apache.hadoop.fs.FSDataOutputStream;
@@ -30,8 +30,8 @@
3030
import org.apache.hadoop.hdfs.server.federation.MiniRouterDFSCluster;
3131
import org.apache.hadoop.hdfs.server.federation.MockResolver;
3232
import org.apache.hadoop.hdfs.server.federation.RouterConfigBuilder;
33-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncRpcClient;
34-
import org.apache.hadoop.hdfs.server.federation.router.async.RouterAsyncSnapshot;
33+
import org.apache.hadoop.hdfs.server.federation.router.RBFConfigKeys;
34+
import org.apache.hadoop.hdfs.server.federation.router.RouterRpcServer;
3535
import org.apache.hadoop.ipc.CallerContext;
3636
import org.apache.hadoop.test.LambdaTestUtils;
3737
import org.junit.After;

0 commit comments

Comments
 (0)