/**
* 修改文件名
* @throws IOException
* @throws InterruptedException
* @throws URISyntaxException
*/
@Test
public void testRename() throws IOException, InterruptedException, URISyntaxException{
// 1 獲取文件系統
Configuration configuration = new Configuration();
FileSystem fs = FileSystem.get(new URI("hdfs://192.168.2.210:9000"), configuration, "atguigu");
// 2 修改文件名稱
fs.rename(new Path("/keymap-shkstart.jar"), new Path("/keymap-shkstart1.jar"));
// 3 關閉資源
fs.close();
}