hadoop最近心得文档整理
apache和 cloudera 版本的区别 apache在2013年4月25日发布了 hadoop 2.0.4aplha版本,依然不能用于生产环境。 cloudera 基于 hadoop 0.20版本发布了CDH4,实现了namenode高可用,新的MR框架MR2(也被称为YARN),同时支持MR与MR2的切换,cloudera还不建议在生产
apache和cloudera版本的区别
apache在2013年4月25日发布了hadoop2.0.4aplha版本,依然不能用于生产环境。
cloudera基于hadoop0.20版本发布了CDH4,实现了namenode高可用,新的MR框架MR2(也被称为YARN),同时支持MR与MR2的切换,cloudera还不建议在生产环境使用MR2。在MR2里面提供了
一个Resource Manager,负责资源管理,每个slave Node运行一个node manager,负责监控节点资源,并上报给Resource Manager。每一个新的Job被命名为一个application,每一个
Application会被分配一个Application Master,运行在slave node上,负责向Resource Manager协调资源,管理application生命周期,这样解除了MR1中JobTracker任务集中性,将任务
的执行由队列运行改为并发运行,更好的利用了集群资源。
现在一些大公司,比如新浪,已经将hadoop集群切换到CDH4的版本,用于生产环境。同时,CDH4提供了引导安装等方式,大大提高了运维的能力。但是CDH4引导安装的方式,会创建多个
用户及目录,如果出现未知问题,如果对CDH结构不够了解,排查起来会出现一定困难。
hive如何进行权限管理
对于hadoop及hive来说,都提供了有限的权限控制功能。但是针对每个公司特定的需求,并不一定能够满足。所以需要对hive的权限控制进行扩展。在当前情况下,有3种方案可以进行
使用。
1) hive0.10可以通过元数据控制权限。授权方式是通过用户,组,角色的方式进行。可以通过类似于mysql中的创建用户,组,角色,并授予权限。
2) 通过控制元数据的方式进行,对于特定的hivedb,使用特定的mysql等数据库存储元数据,这样就可以完全的隔离相关的操作,以提升数据的安全性。
3) 通过对hive源码进行扩展来实现,针对hive的权限建立一个权限管理工程,负责生成用户,并给用户赋予不同db,table,分区,同一个任务可操作MR task数量上限,及控制特定列
的权限。元数据使用同一份,还是会出现一定的风险,现在hadoop集群的管理一般是由统一的部门进行维护,可以在hive中配置元数据的时候,指定2种用户,一种拥有可读写能力,一种
只拥有只读权限,可以防止使用者误操作造成数据丢生等问题,同时针对hadoop集群要配置垃圾回收机制(core-site.xml中的fs.trash.interval),用于减小误删除造成的影响。
hadoop如何进行性能调优
网上有很多hadoop性能优化的文章,都提到了如何优化集群,我们不能照搬网上的配置,因为网络环境,服务器等的多样性,使得我们需要根据自己的情况,进行集群参数的设置。
lzo压缩即可以减少集群数据存储压力,也可以提高mapper端到reduce的数据传输压力,提高job运行效率。
hadoop原生对gzip进行支持,gzip的压缩比远高于lzo,但是在运行的过程中,其只能运行在一个task上的缺点,造成集群能力大幅下降,而lzo原生对于分块的支持,大大提供了MR执行
的效率,同时节省了磁盘空间,可以很好的提高集群性能。gzip压缩也适用于一部分非常冷的数据,对于经常不进行使用的历史数据,可以采用gzip压缩的方式,进行处理,虽然造成在
处理查询历史数据的时候会慢,但是可以减少集群磁盘占用,而且实际上很冷的数据可能一年都用不到一次。
原文地址:hadoop最近心得文档整理, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

To add a server to Eclipse, follow these steps: Create a server runtime environment Configure the server Create a server instance Select the server runtime environment Configure the server instance Start the server deployment project

Concurrency testing and debugging Concurrency testing and debugging in Java concurrent programming are crucial and the following techniques are available: Concurrency testing: Unit testing: Isolate and test a single concurrent task. Integration testing: testing the interaction between multiple concurrent tasks. Load testing: Evaluate an application's performance and scalability under heavy load. Concurrency Debugging: Breakpoints: Pause thread execution and inspect variables or execute code. Logging: Record thread events and status. Stack trace: Identify the source of the exception. Visualization tools: Monitor thread activity and resource usage.

1. Background of the Construction of 58 Portraits Platform First of all, I would like to share with you the background of the construction of the 58 Portrait Platform. 1. The traditional thinking of the traditional profiling platform is no longer enough. Building a user profiling platform relies on data warehouse modeling capabilities to integrate data from multiple business lines to build accurate user portraits; it also requires data mining to understand user behavior, interests and needs, and provide algorithms. side capabilities; finally, it also needs to have data platform capabilities to efficiently store, query and share user profile data and provide profile services. The main difference between a self-built business profiling platform and a middle-office profiling platform is that the self-built profiling platform serves a single business line and can be customized on demand; the mid-office platform serves multiple business lines, has complex modeling, and provides more general capabilities. 2.58 User portraits of the background of Zhongtai portrait construction

To successfully deploy and maintain a PHP website, you need to perform the following steps: Select a web server (such as Apache or Nginx) Install PHP Create a database and connect PHP Upload code to the server Set up domain name and DNS Monitoring website maintenance steps include updating PHP and web servers, and backing up the website , monitor error logs and update content.

KubernetesOperator simplifies PHP cloud deployment by following these steps: Install PHPOperator to interact with the Kubernetes cluster. Deploy the PHP application, declare the image and port. Manage the application using commands such as getting, describing, and viewing logs.

How to Implement PHP Security Best Practices PHP is one of the most popular backend web programming languages used for creating dynamic and interactive websites. However, PHP code can be vulnerable to various security vulnerabilities. Implementing security best practices is critical to protecting your web applications from these threats. Input validation Input validation is a critical first step in validating user input and preventing malicious input such as SQL injection. PHP provides a variety of input validation functions, such as filter_var() and preg_match(). Example: $username=filter_var($_POST['username'],FILTER_SANIT

The use of data structures and algorithms is crucial in cloud computing for managing and processing massive amounts of data. Common data structures include arrays, lists, hash tables, trees, and graphs. Commonly used algorithms include sorting algorithms, search algorithms and graph algorithms. Leveraging the power of Java, developers can use Java collections, thread-safe data structures, and Apache Commons Collections to implement these data structures and algorithms.

Commonly used protocols and libraries for Java network programming: Protocols: TCP, UDP, HTTP, HTTPS, FTP Libraries: java.net, java.nio, ApacheHttpClient, Netty, OkHttp
