• 大小: 102KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: Java
  • 标签: hadoop  2.6.1  Java  

资源简介

hadoop实战源代码,包含Java操作HDFS文件的上传、下载、删除等功能

资源截图

代码片段和文件信息

package cn.itcast.bigdata.hadooprpc.client;

import java.net.InetSocketAddress;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import cn.itcast.bigdata.hadooprpc.protocol.ClientNamenodeProtocol;

public class MyHdfsClient {


public static void main(String[] args) throws Exception {
ClientNamenodeProtocol namenode = RPC.getProxy(ClientNamenodeProtocol.class 1L new InetSocketAddress(“localhost“ 8888) new Configuration());
String metaData = namenode.getmetaData(“/angela.mygirl“);
System.out.println(metaData);
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        394  2017-03-30 23:37  shizhan_03_hadoop\.classpath

     文件        393  2017-03-30 23:38  shizhan_03_hadoop\.project

     文件        598  2017-04-01 12:06  shizhan_03_hadoop\.settings\org.eclipse.jdt.core.prefs

     文件       1250  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\client\MyHdfsClient.class

     文件       1280  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\client\UserLoginAction.class

     文件        225  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\protocol\ClientNamenodeProtocol.class

     文件        284  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\protocol\IUserLoginService.class

     文件        850  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\service\MyNameNode.class

     文件       1749  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\service\PublishServiceUtil.class

     文件        907  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\hadooprpc\service\UserLoginServiceImpl.class

     文件       5946  2017-04-02 05:59  shizhan_03_hadoop\bin\cn\itcast\bigdata\hdfs\HdfsClientDemo.class

     文件       2489  2017-04-02 05:59  shizhan_03_hadoop\bin\cn\itcast\bigdata\hdfs\HdfsStreamAccess.class

     文件       1212  2017-04-02 05:59  shizhan_03_hadoop\bin\cn\itcast\bigdata\log\GenerateLog.class

     文件       2443  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowBean.class

     文件       2439  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowCount$FlowCountMapper.class

     文件       2531  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowCount$FlowCountReducer.class

     文件       1944  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowCount.class

     文件       2614  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowCountSort$FlowCountSortMapper.class

     文件       2210  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowCountSort$FlowCountSortReducer.class

     文件       2051  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\FlowCountSort.class

     文件       1339  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\flowsum\Test.class

     文件       1937  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\provinceflow\FlowBean.class

     文件       2474  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\provinceflow\FlowCount$FlowCountMapper.class

     文件       2596  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\provinceflow\FlowCount$FlowCountReducer.class

     文件       2109  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\provinceflow\FlowCount.class

     文件       1826  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\provinceflow\ProvincePartitioner.class

     文件       3477  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\rjoin\InfoBean.class

     文件       3215  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\rjoin\RJoin$RJoinMapper.class

     文件       3435  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\rjoin\RJoin$RJoinReducer.class

     文件       2053  2017-04-02 06:04  shizhan_03_hadoop\bin\cn\itcast\bigdata\mr\rjoin\RJoin.class

............此处省略99个文件信息

评论

共有 条评论