улей «ЗАГРУЗИТЬ ДАННЫЕ ВХОДА ~ ПЕРЕЗАПИСАТЬ В ТАБЛИЦУ ~» меняет разрешение и ACL таблицы - PullRequest
0 голосов
/ 03 июня 2019

Я пытаюсь загрузить данные и перезаписать таблицу.

После LOAD ~~ OVERWRITE ~~ изменяется разрешение файла и ACL таблицы (может быть, сбрасывается значение по умолчанию?).

Полагаю, опция hive.warehouse.subdir.inherit.perms=true создает такую ​​ситуацию. Если я установлю hive.warehouse.subdir.inherit.perms=false, перезаписанная таблица и файлы получат разрешение, которое имел исходный файл данных.

Q. Можно ли сохранить разрешение исходной таблицы, а не файла данных?

Если нет, после LOAD ~~ OVERWRITE ~~, следует ли изменить разрешение файла и установить ACL таблицы вручную?

1 Ответ

0 голосов
/ 03 июня 2019

Вы можете проверить эту документацию для получения дополнительной информации о наследовании разрешений в Hive

https://cwiki.apache.org/confluence/display/Hive/Permission+Inheritance+in+Hive

When "hive.warehouse.subdir.inherit.perms" flag is enabled in Hive, Hive will try to do all the following inheritances.
    Database directory inherits from warehouse directory.
    Table directory inherits from database directory, or from warehouse directory if it is part of the default database.
    External table directory inherits from parent directory.
    Partition directory inherits from table directory.  (As of Hive 1.1.0.)
    Data files inherit from table or partition directory.
Failure by Hive to inherit will not cause operation to fail. Rule of thumb of when security-prop inheritance will happen is the following:
    To run chmod, a user must be the owner of the file, or else a super-user.
    To run chgrp, a user must be the owner of files, or else a super-user.
    Hence, user that hive runs as (either 'hive' or the logged-in user in case of impersonation), must be super-user or owner of the file whose security properties are going to be changed

Таким образом, вы не можете сохранить разрешение таблицы. Вы включили Авторизацию Hive?

Вы можете попробовать SQL Standards Based Authorization in Hive Server2 https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Authorization

...