摘要: 分区表: 建表语句中添加:partitioned by (col1 string, col2 string) create table emp_pt(id int, name string, job string, mgr int, hiredate string, salary double, b 阅读全文
posted @ 2019-09-18 15:28 BIG_BOSS_ZC 阅读(581) 评论(0) 推荐(0)
摘要: 导入数据 1). 本地 load data local inpath "/root/example/hive/data/dept.txt" into table dept; 2). HDFSload data inpath "/user/hive/warehouse/functiontest.db/ 阅读全文
posted @ 2019-09-18 14:19 BIG_BOSS_ZC 阅读(701) 评论(0) 推荐(0)
摘要: hive运行查询语句时报错: Error: org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org. 阅读全文
posted @ 2019-09-17 19:38 BIG_BOSS_ZC 阅读(621) 评论(0) 推荐(0)
摘要: 本教程仅仅是使用spark,能在hive用就行。 1.下载Spark; 2.WinSCP上传spark压缩包到虚拟机; 3.tar -zxvf spark-2.3.3-bin-without-hadoop -C /opt/programs/ 4. 1)配置Spark环境变量; 2)配置spark-e 阅读全文
posted @ 2019-09-17 19:28 BIG_BOSS_ZC 阅读(1977) 评论(0) 推荐(0)
摘要: hive是基于Hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张数据库表,并提供简单的sql查询功能,可以将sql语句转换为MapReduce任务进行运行。 其优点是学习成本低,可以通过类SQL语句快速实现简单的MapReduce统计,不必开发专门的MapReduce应用,十分适合数据 阅读全文
posted @ 2019-09-17 19:03 BIG_BOSS_ZC 阅读(674) 评论(0) 推荐(0)
摘要: mapreduce过程解析 数据在map中怎么写入磁盘? 数据:经过map逻辑处理过后的数据(key,value)… 磁盘:本地磁盘 环形缓冲区 1.为什么要环形缓冲区? 答:使用环形缓冲区,便于写入缓冲区和写出缓冲区同时进行。 2.为什么不等缓冲区满了再spill? 答:会出现阻塞。 3.数据的分 阅读全文
posted @ 2019-09-09 16:05 BIG_BOSS_ZC 阅读(1941) 评论(1) 推荐(1)
摘要: Hadoop HA Safemode(安全模式) During start up the NameNode loads the file system state from the fsimage and the edits log file. It then waits for DataNodes 阅读全文
posted @ 2019-09-03 20:35 BIG_BOSS_ZC 阅读(155) 评论(0) 推荐(0)
摘要: Checkpoint Node(检查点节点) NameNode persists its namespace using two files: fsimage, which is the latest checkpoint of the namespace and edits, a journal 阅读全文
posted @ 2019-09-03 11:44 BIG_BOSS_ZC 阅读(213) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-09-02 20:23 BIG_BOSS_ZC 阅读(304) 评论(0) 推荐(0)
摘要: 文件上传原理图 剖析文件写入 1.客户端(client)通过对DistributedFileSystem对象调用create()来新建文件; FSDataOutputStream outputStream = fileSystem.create(new Path("/test.txt")); 2.D 阅读全文
posted @ 2019-09-02 15:51 BIG_BOSS_ZC 阅读(131) 评论(0) 推荐(0)