miklosgergely commented on a change in pull request #703: HIVE-21959 Clean up 
Concatenate and Msck DDL commands
URL: https://github.com/apache/hive/pull/703#discussion_r301052561
 
 

 ##########
 File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/Msck.java
 ##########
 @@ -108,15 +108,16 @@ public int repair(MsckInfo msckInfo) {
     boolean success = false;
     long txnId = -1;
     int ret = 0;
+    long partitionExpirySeconds = msckInfo.getPartitionExpirySeconds();
     try {
       Table table = getMsc().getTable(msckInfo.getCatalogName(), 
msckInfo.getDbName(), msckInfo.getTableName());
       qualifiedTableName = Warehouse.getCatalogQualifiedTableName(table);
       if 
(getConf().getBoolean(MetastoreConf.ConfVars.MSCK_REPAIR_ENABLE_PARTITION_RETENTION.getHiveName(),
 false)) {
-        
msckInfo.setPartitionExpirySeconds(PartitionManagementTask.getRetentionPeriodInSeconds(table));
-        LOG.info("{} - Retention period ({}s) for partition is enabled for 
MSCK REPAIR..",
-          qualifiedTableName, msckInfo.getPartitionExpirySeconds());
+        partitionExpirySeconds = 
PartitionManagementTask.getRetentionPeriodInSeconds(table);
 
 Review comment:
   Indeed, but it is not use anywhere else, but here, this is the only place 
where the getter is invoked. The point here was that a request type object 
should not be modified, it should be immutable, the request contained a certain 
value, which is used here like this - may be overwritten by some config value. 
Still the request is not modified.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to