search
HomeDatabaseMysql Tutorial自定义Hive权限控制(1) 设计目标

自定义Hive权限控制(1) 设计目标

Jun 07, 2016 pm 04:31 PM
hivecompanycontrolPermissionsTargetcustomizedesign

由于公司各个部门对 hive 的使用增加,针对 hive 的 权限控制 是必须要开展的一项工作了。针对此事项,最近进行了 hive 源码的查看,并完成了初步的设计和实现基本满足了当前 权限控制 的目标。 目标 1.采用公共模块或者公共配置文件去做用户权限管理。2.每

由于公司各个部门对hive的使用增加,针对hive权限控制是必须要开展的一项工作了。针对此事项,最近进行了hive源码的查看,并完成了初步的设计和实现基本满足了当前权限控制的目标。

目标

1.采用公共模块或者公共配置文件去做用户权限管理。2.每个部门使用不同的账号进行查询Hadoop集群数据。3.所有查询Hadoop集群数据的用户账号都需要经过权限管理模块验证,无权限的操作应该给予提示信息。4.根据各部门的职责限定该部门的人员使用的账号只能查询归属于该部门的数据。5.对于敏感信息应该只有特殊账号才可以进行查询。6.对于每次操作需要记录操作日志(时间,用户名,操作表),日志需要定时备份。

针对以上目标,形成如下任务

1.针对hiveserver增加权限控制功能。2.针对hivelib增加用户权限配置模块。3.针对hiveclient增加用户配置功能。4.扩展hive配置文件,增加4个保留配置。5.提供权限控制的web项目,用于权限配置。

控制内容

1.使用者同一个任务最大使用分区数量。用于控制map任务数量。2.使用者同一个任务最大reduce任务数量。3.使用者可使用的DB。4.使用者可使用的表。(如果该表所对应的db已经配置给该用户,则无需再单独进行配置)。5.使用者不允许访问的特殊列。6.使用者在使用某张表的时候必须使用的列。(暂时没有使用场景)7.针对用户的频道进行分区限制。

本次修改涉及范围

1.hiveserver修改hive-exec-0.8.1.jar,hive-common-0.8.1.jar,主要用于增加权限控制,和增加配置项2.hivelib(公司内部使用的python类库,通过thrift访问hive,抽取数据)修改hiveclient.py,同时增加conf配置。3.修改hiveclient针对conf/hive-site.xml增加配置项。4.利用django完成web权限分配项目。(开发快速)

下一章,将具体介绍如何完成以上步骤。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools