1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢(xún)
      選擇下列產(chǎn)品馬上在線(xiàn)溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問(wèn)題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷(xiāo)解決方案
      hadoop如何實(shí)現(xiàn)文件夾文件的創(chuàng)建與刪除-創(chuàng)新互聯(lián)

      小編給大家分享一下hadoop如何實(shí)現(xiàn)文件夾文件的創(chuàng)建與刪除,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

      成都創(chuàng)新互聯(lián)主要從事成都做網(wǎng)站、網(wǎng)站設(shè)計(jì)、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)蓬溪,10余年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專(zhuān)業(yè),歡迎來(lái)電咨詢(xún)建站服務(wù):13518219792
      package hadoop.test;
      import java.io.IOException;
      import java.net.URI;
      import java.net.URISyntaxException;
      import org.apache.hadoop.conf.Configuration;
      import org.apache.hadoop.fs.FileSystem;
      import org.apache.hadoop.fs.Path;
      public class FileSystemTest {
      	public static void main(String[] args) throws IOException, URISyntaxException {
      		Configuration cfg = new Configuration();
      		FileSystem fs = FileSystem.get(new URI("hdfs://data1:9000"),cfg);
      		//fs.open(new Path(new URI("hdfs://data1:9000")));
      		boolean flgs = fs.exists(new Path(new URI("/hgs")));
      		if(flgs) {
      			boolean flg = fs.isDirectory(new Path(new URI("/hgs")));
      			System.out.println(flg);
      			//這里會(huì)報(bào)錯(cuò),添加 環(huán)境變量 HADOOP_USER_NAME=root
      			//從本地copy一個(gè)文件到hdfs
      			//fs.copyFromLocalFile(true,new Path("e:\\install.ini"), new Path("/hgs/tmp.txt"));
      			
      			//拷貝hdfs文件到本地
      			//fs.copyToLocalFile(false,new Path("hdfs://data1:9000/hgs/tmp.txt"),new Path("e:\\tmp.txt"),true );
      			
      			//創(chuàng)建文件夾
      			//boolean fl = fs.mkdirs(new Path("/hgs/hgstmp"));
      			//System.out.println(fl);
      			boolean f = fs.delete(new Path("/hgs/hgstmp"), true);
      			System.out.println(f);
      		}
      		System.out.println(flgs);
      		fs.close();
      	}
      }

      以上是“hadoop如何實(shí)現(xiàn)文件夾文件的創(chuàng)建與刪除”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對(duì)大家有所幫助,如果還想學(xué)習(xí)更多知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道!


      標(biāo)題名稱(chēng):hadoop如何實(shí)現(xiàn)文件夾文件的創(chuàng)建與刪除-創(chuàng)新互聯(lián)
      文章鏈接:http://ef60e0e.cn/article/jhpjd.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        星座| 襄垣县| 建阳市| 阳泉市| 同德县| 湘潭市| 江北区| 保康县| 静海县| 翁牛特旗| 韶山市| 柳河县| 长岭县| 宁城县| 青铜峡市| 江源县| 镇康县| 家居| 治县。| 望奎县| 柞水县| 潞城市| 满城县| 丹东市| 宜兴市| 微山县| 上蔡县| 郁南县| 宁明县| 大庆市| 邮箱| 沭阳县| 固安县| 五大连池市| 常山县| 垦利县| 桂平市| 天等县| 哈尔滨市| 沙洋县| 新闻|