Github user KanakaKumar commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/3059#discussion_r246286475
--- Diff:
processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java
---
@@ -1164,4 +1156,35 @@ private static void deleteFiles(List<String>
filesToBeDeleted) throws IOExceptio
FileFactory.deleteFile(filePath, FileFactory.getFileType(filePath));
}
}
+
+ /**
+ * This method will calculate the average expected size for each node
+ *
+ * @param blockInfos blocks
+ * @param uniqueBlocks unique blocks
+ * @param numOfNodes if number of nodes has to be decided
+ * based on block location information
+ * @param blockAssignmentStrategy strategy used to assign blocks
+ * @return the average expected size for each node
+ */
+ private static long calcAvgLoadSizePerNode(List<Distributable>
blockInfos,
--- End diff --
Please separate the code for identifying the numberOfBlocksPerNode and
dataSizeperNode.
Use the required variable based on the BlockAssignmentStartegy. This way
this function also not required I think.
Using same name for both purposes is confusing.
---