[hive] branch master updated: HIVE-25131: PreAlterPartitionEvent should have table owner details that can be authorized in Ranger

2021-07-08 Thread ngangam
This is an automated email from the ASF dual-hosted git repository.

ngangam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
 new f05f933  HIVE-25131: PreAlterPartitionEvent should have table owner 
details that can be authorized in Ranger
f05f933 is described below

commit f05f933e011a900ef3e2fc836777ee24c908d21d
Author: saihemanth 
AuthorDate: Tue May 18 10:11:52 2021 -0700

HIVE-25131: PreAlterPartitionEvent should have table owner details that can 
be authorized in Ranger
---
 .../metastore/events/AlterPartitionEvent.java  |  4 ++--
 .../apache/hadoop/hive/metastore/HMSHandler.java   | 24 ++
 .../metastore/events/PreAlterPartitionEvent.java   |  7 ++-
 3 files changed, 19 insertions(+), 16 deletions(-)

diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/AlterPartitionEvent.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/AlterPartitionEvent.java
index f7bedb5..2f9e474 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/AlterPartitionEvent.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/security/authorization/plugin/metastore/events/AlterPartitionEvent.java
@@ -60,7 +60,7 @@ public class AlterPartitionEvent extends 
HiveMetaStoreAuthorizableEvent {
 List ret   = new ArrayList<>();
 PreAlterPartitionEventevent = (PreAlterPartitionEvent) preEventContext;
 
-ret.add(new HivePrivilegeObject(HivePrivilegeObjectType.TABLE_OR_VIEW, 
event.getDbName(), event.getTableName()));
+ret.add(getHivePrivilegeObject(event.getTable()));
 
 LOG.debug("<== AlterPartitionEvent.getInputHObjs() ret={}", ret);
 
@@ -73,7 +73,7 @@ public class AlterPartitionEvent extends 
HiveMetaStoreAuthorizableEvent {
 List ret   = new ArrayList<>();
 PreAlterPartitionEventevent = (PreAlterPartitionEvent) preEventContext;
 
-ret.add(new HivePrivilegeObject(HivePrivilegeObjectType.TABLE_OR_VIEW, 
event.getDbName(), event.getTableName()));
+ret.add(getHivePrivilegeObject(event.getTable()));
 
 Partition newPartition = event.getNewPartition();
 StringnewUri   = (newPartition != null) ? 
getSdLocation(newPartition.getSd()) : "";
diff --git 
a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
 
b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
index 81e6e9e..fbcb396 100644
--- 
a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
+++ 
b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java
@@ -5741,7 +5741,10 @@ public class HMSHandler extends FacebookBase implements 
IHMSHandler {
 Partition oldPart = null;
 Exception ex = null;
 try {
-  firePreEvent(new PreAlterPartitionEvent(db_name, tbl_name, part_vals, 
new_part, this));
+  Table table = null;
+  table = getMS().getTable(catName, db_name, tbl_name, null);
+
+  firePreEvent(new PreAlterPartitionEvent(db_name, tbl_name, table, 
part_vals, new_part, this));
   if (part_vals != null && !part_vals.isEmpty()) {
 
MetaStoreServerUtils.validatePartitionNameCharacters(new_part.getValues(),
 partitionValidationPattern);
@@ -5751,12 +5754,8 @@ public class HMSHandler extends FacebookBase implements 
IHMSHandler {
   part_vals, new_part, envContext, this, validWriteIds);
 
   // Only fetch the table if we actually have a listener
-  Table table = null;
-  if (!listeners.isEmpty()) {
-if (table == null) {
-  table = getMS().getTable(catName, db_name, tbl_name, null);
-}
 
+  if (!listeners.isEmpty()) {
 MetaStoreListenerNotifier.notifyEvent(listeners,
 EventType.ALTER_PARTITION,
 new AlterPartitionEvent(oldPart, new_part, table, false,
@@ -5828,18 +5827,21 @@ public class HMSHandler extends FacebookBase implements 
IHMSHandler {
 Lock tableLock = getTableLockFor(db_name, tbl_name);
 tableLock.lock();
 try {
+
+  Table table = null;
+  table = getMS().getTable(catName, db_name, tbl_name,  null);
+
   for (Partition tmpPart : new_parts) {
 // Make sure the catalog name is set in the new partition
 if (!tmpPart.isSetCatName()) {
   tmpPart.setCatName(getDefaultCatalog(conf));
 }
-firePreEvent(new PreAlterPartitionEvent(db_name, tbl_name, null, 
tmpPart, this));
+firePreEvent(new PreAlterPartitionEvent(db_name, tbl_name, table, 
null, tmpPart, this));
   }
   oldParts = alterHandler.alterPartitions(getMS(), wh,
   catName, db_name, tbl_name, new_parts, environmentContext, 
writeIdList, writeId, this);
   Iterator olditr = oldParts.iterator();

[hive] branch master updated (d59c2a3 -> 0656a63)

2021-07-08 Thread szita
This is an automated email from the ASF dual-hosted git repository.

szita pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git.


from d59c2a3  HIVE-25313: Upgrade commons-codec to 1.15 (#2454) (Zoltan 
Haindrich reviewed by Panagiotis Garefalakis)
 add 0656a63  HIVE-25255: Support ALTER TABLE REPLACE COLUMNS for Iceberg 
(Marton Bod, reviewed by Peter Vary and Adam Szita)

No new revisions were added by this update.

Summary of changes:
 .../src/test/results/negative/hbase_ddl.q.out  |  2 +-
 .../org/apache/iceberg/hive/HiveSchemaUtil.java| 87 +++---
 .../iceberg/mr/hive/HiveIcebergMetaHook.java   | 56 --
 .../hive/TestHiveIcebergStorageHandlerNoScan.java  | 40 ++
 .../hadoop/hive/ql/ddl/table/AlterTableType.java   |  2 +-
 .../replace/AlterTableReplaceColumnsOperation.java |  2 +-
 .../results/clientnegative/alter_non_native.q.out  |  2 +-
 7 files changed, 170 insertions(+), 21 deletions(-)


[hive] branch master updated (53e7426 -> d59c2a3)

2021-07-08 Thread kgyrtkirk
This is an automated email from the ASF dual-hosted git repository.

kgyrtkirk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git.


from 53e7426   HIVE-25312: Upgrade netty to 4.1.65.Final (Zoltan Haindrich 
reviewed by Panagiotis Garefalakis)
 add d59c2a3  HIVE-25313: Upgrade commons-codec to 1.15 (#2454) (Zoltan 
Haindrich reviewed by Panagiotis Garefalakis)

No new revisions were added by this update.

Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[hive] branch master updated (8a4fa84 -> 53e7426)

2021-07-08 Thread kgyrtkirk
This is an automated email from the ASF dual-hosted git repository.

kgyrtkirk pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git.


from 8a4fa84  HIVE-25299: Casting timestamp to numeric data types is 
incorrect for non-UTC timezones (Adesh Rao, reviewed by Ashish Kumar, Sankar 
Hariappan)
 add 53e7426   HIVE-25312: Upgrade netty to 4.1.65.Final (Zoltan Haindrich 
reviewed by Panagiotis Garefalakis)

No new revisions were added by this update.

Summary of changes:
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[hive] branch master updated (4397882 -> 8a4fa84)

2021-07-08 Thread sankarh
This is an automated email from the ASF dual-hosted git repository.

sankarh pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git.


from 4397882  HIVE-25308: Use new Tez API to get JobID for Iceberg commits 
(#2446) (Marton Bod, reviewed by Marta Kuczora and Laszlo Pinter)
 add 8a4fa84  HIVE-25299: Casting timestamp to numeric data types is 
incorrect for non-UTC timezones (Adesh Rao, reviewed by Ashish Kumar, Sankar 
Hariappan)

No new revisions were added by this update.

Summary of changes:
 .../hadoop/hive/common/type/TimestampTZUtil.java   |  5 ++
 .../apache/hadoop/hive/ql/udf/UDFToBoolean.java|  4 +-
 .../org/apache/hadoop/hive/ql/udf/UDFToByte.java   |  2 +-
 .../org/apache/hadoop/hive/ql/udf/UDFToDouble.java |  5 +-
 .../org/apache/hadoop/hive/ql/udf/UDFToFloat.java  |  5 +-
 .../apache/hadoop/hive/ql/udf/UDFToInteger.java|  2 +-
 .../org/apache/hadoop/hive/ql/udf/UDFToLong.java   |  2 +-
 .../org/apache/hadoop/hive/ql/udf/UDFToShort.java  |  2 +-
 .../org/apache/hadoop/hive/ql/udf/UDFUtils.java| 27 +++-
 ql/src/test/queries/clientpositive/timestamp_1.q   | 16 +
 ql/src/test/queries/clientpositive/timestamp_2.q   | 15 
 ql/src/test/queries/clientpositive/timestamp_3.q   | 15 
 .../test/queries/clientpositive/udf_to_boolean.q   |  9 ++-
 .../results/clientpositive/llap/timestamp_1.q.out  | 80 --
 .../results/clientpositive/llap/timestamp_2.q.out  | 80 --
 .../results/clientpositive/llap/timestamp_3.q.out  | 74 +++-
 .../clientpositive/llap/udf_to_boolean.q.out   |  9 +++
 17 files changed, 319 insertions(+), 33 deletions(-)
 copy cli/src/test/org/apache/hadoop/hive/cli/TestCliSessionState.java => 
ql/src/java/org/apache/hadoop/hive/ql/udf/UDFUtils.java (63%)


[hive] branch master updated (e9dbaf6 -> 4397882)

2021-07-08 Thread lpinter
This is an automated email from the ASF dual-hosted git repository.

lpinter pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git.


from e9dbaf6  HIVE-25310: Fix local test run problems with Iceberg tests: 
Socket closed by peer (reviewed by Adam Szita)
 add 4397882  HIVE-25308: Use new Tez API to get JobID for Iceberg commits 
(#2446) (Marton Bod, reviewed by Marta Kuczora and Laszlo Pinter)

No new revisions were added by this update.

Summary of changes:
 .../hive/HiveIcebergStorageHandlerTestUtils.java   |  6 ---
 .../TestHiveIcebergStorageHandlerWithEngine.java   |  4 --
 .../apache/hadoop/hive/ql/exec/tez/TezTask.java| 59 --
 3 files changed, 22 insertions(+), 47 deletions(-)


[hive] branch master updated (99acfac -> e9dbaf6)

2021-07-08 Thread kuczoram
This is an automated email from the ASF dual-hosted git repository.

kuczoram pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git.


from 99acfac  HIVE-23801. 
TestMiniLlapLocalCliDriver[replication_metrics_ingest] is flaky. (#2443)(Ayush 
Saxena, reviewed by Aasha Medhi)
 add e9dbaf6  HIVE-25310: Fix local test run problems with Iceberg tests: 
Socket closed by peer (reviewed by Adam Szita)

No new revisions were added by this update.

Summary of changes:
 iceberg/iceberg-catalog/pom.xml | 6 ++
 iceberg/iceberg-handler/pom.xml | 5 +
 2 files changed, 11 insertions(+)