chinnaraolalam commented on code in PR #4912:
URL: https://github.com/apache/hive/pull/4912#discussion_r1414831164


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java:
##########
@@ -4153,43 +4153,14 @@ public List<Partition> getPartitions(Table tbl) throws 
HiveException {
   }
 
   /**
-   * Get all the partitions; unlike {@link #getPartitions(Table)}, does not 
include auth.
-   * @param tbl table for which partitions are needed
-   * @return list of partition objects
-   */
-  public Set<Partition> getAllPartitions(Table tbl) throws HiveException {
-    if (!tbl.isPartitioned()) {
-      return Sets.newHashSet(new Partition(tbl));
-    }
-
-    List<org.apache.hadoop.hive.metastore.api.Partition> tParts;
-    try {
-      tParts = getMSC().listPartitions(tbl.getDbName(), tbl.getTableName(), 
(short)-1);
-    } catch (Exception e) {
-      LOG.error("Failed getAllPartitionsOf", e);
-      throw new HiveException(e);
-    }
-    Set<Partition> parts = new LinkedHashSet<Partition>(tParts.size());
-    for (org.apache.hadoop.hive.metastore.api.Partition tpart : tParts) {
-      parts.add(new Partition(tbl, tpart));
-    }
-    return parts;
-  }
-
-  /**
-   * Get all the partitions. Do it in batches if batchSize is more than 0 else 
get it in one call.
+   * Get all the partitions in batches. Does not include auth information.
    * @param tbl table for which partitions are needed
    * @return list of partition objects
    */
   public Set<Partition> getAllPartitionsOf(Table tbl) throws HiveException {
-    int batchSize= MetastoreConf.getIntVar(
-            Hive.get().getConf(), MetastoreConf.ConfVars.BATCH_RETRIEVE_MAX);
-    if (batchSize > 0) {
-      return getAllPartitionsInBatches(tbl, batchSize, 
DEFAULT_BATCH_DECAYING_FACTOR, MetastoreConf.getIntVar(

Review Comment:
   Here there is a chance of coming batchSize <=0, as prior to this validation 
is not happening.   RangeValidator will check only if setMetaConf is executed. 



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to