carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [14/16] carbondata git commit: [CARBONDATA-1568] Optimize annotation of code
Date Tue, 24 Oct 2017 09:41:27 GMT
[CARBONDATA-1568] Optimize annotation of code

There are some improper places in code annotation by IDEA inspect code
We optimize annotation of code:

Fix an error of Javadoc issues
modify the expression of annotation

This closes #1408


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/9326cfdc
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/9326cfdc
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/9326cfdc

Branch: refs/heads/pre-aggregate
Commit: 9326cfdc07bf741b3516c22fae7362088ce1d7ac
Parents: 6abdd97
Author: xubo245 <601450868@qq.com>
Authored: Tue Oct 10 20:59:46 2017 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Fri Oct 20 08:47:30 2017 +0800

----------------------------------------------------------------------
 .../core/constants/CarbonCommonConstants.java   |  2 +-
 .../SegmentUpdateStatusManager.java             | 17 ++++----
 .../carbondata/core/util/CarbonProperties.java  | 18 +++++----
 .../core/util/path/CarbonStorePath.java         |  4 ++
 .../core/util/path/CarbonTablePath.java         | 12 +++++-
 .../carbondata/presto/server/PrestoServer.scala |  2 +-
 .../presto/util/CarbonDataStoreCreator.scala    |  4 +-
 .../processing/merger/CarbonDataMergerUtil.java | 41 +++++++++++---------
 8 files changed, 59 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
index 0510d7f..4ee3001 100644
--- a/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
+++ b/core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
@@ -1031,7 +1031,7 @@ public final class CarbonCommonConstants {
   public static final String CARBON_DATA_FILE_VERSION = "carbon.data.file.version";
 
   /**
-   * property to set is IS_DRIVER_INSTANCE
+   * Index file name will end with this extension when update.
    */
   public static final String UPDATE_INDEX_FILE_EXT = ".carbonindex";
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
b/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
index 20c7ad7..1218231 100644
--- a/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
+++ b/core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
@@ -333,10 +333,11 @@ public class SegmentUpdateStatusManager {
   }
 
   /**
+   * check the block whether is valid
    *
-   * @param segName
-   * @param blockName
-   * @return
+   * @param segName segment name
+   * @param blockName  block name
+   * @return the status of block whether is valid
    */
   public boolean isBlockValid(String segName, String blockName) {
 
@@ -351,11 +352,11 @@ public class SegmentUpdateStatusManager {
   /**
    * Returns all delta file paths of specified block
    *
-   * @param blockDir
-   * @param blockNameFromTuple
-   * @param listOfSegmentUpdateDetailsArray
-   * @param extension
-   * @return
+   * @param blockDir block directory with CarbonFile format
+   * @param blockNameFromTuple block name from tuple
+   * @param extension the file extension name
+   * @param segment the segment name
+   * @return the list of delete file
    */
   private List<String> getDeltaFiles(CarbonFile blockDir, final String blockNameFromTuple,
       final String extension,

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
index 0ab28e2..cdd6183 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
@@ -615,7 +615,7 @@ public final class CarbonProperties {
   /**
    * gettting the unmerged segment numbers to be merged.
    *
-   * @return
+   * @return corrected value of unmerged segments to be merged
    */
   public int[] getCompactionSegmentLevelCount() {
     String commaSeparatedLevels;
@@ -632,8 +632,10 @@ public final class CarbonProperties {
   }
 
   /**
-   * @param commaSeparatedLevels
-   * @return
+   * Separating the count for Number of segments to be merged in levels by comma
+   *
+   * @param commaSeparatedLevels the string format value before separating
+   * @return the int array format value after separating by comma
    */
   private int[] getIntArray(String commaSeparatedLevels) {
     String[] levels = commaSeparatedLevels.split(",");
@@ -727,11 +729,11 @@ public final class CarbonProperties {
   /**
    * Validate the restrictions
    *
-   * @param actual
-   * @param max
-   * @param min
-   * @param defaultVal
-   * @return
+   * @param actual the actual value for minor compaction
+   * @param max max value for minor compaction
+   * @param min min value for minor compaction
+   * @param defaultVal default value when the actual is improper
+   * @return  corrected Value after validating
    */
   public int validate(int actual, int max, int min, int defaultVal) {
     if (actual <= max && actual >= min) {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
index 3aece69..201e05f 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonStorePath.java
@@ -37,6 +37,10 @@ public class CarbonStorePath extends Path {
 
   /**
    * gets CarbonTablePath object to manage table paths
+   *
+   * @param storePath the store path of the segment
+   * @param tableIdentifier identifier of carbon table that the segment belong to
+   * @return the store location of the segment
    */
   public static CarbonTablePath getCarbonTablePath(String storePath,
       CarbonTableIdentifier tableIdentifier) {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
index 0910afc..7be9c76 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java
@@ -55,9 +55,10 @@ public class CarbonTablePath extends Path {
   protected CarbonTableIdentifier carbonTableIdentifier;
 
   /**
+   * structure CarbonTablePath object to manage table paths
    *
-   * @param carbonTableIdentifier
-   * @param tablePathString
+   * @param carbonTableIdentifier identifier of carbon table that the segment belong to
+   * @param tablePathString the store path of the segment
    */
   public CarbonTablePath(CarbonTableIdentifier carbonTableIdentifier, String tablePathString)
{
     super(tablePathString);
@@ -65,6 +66,13 @@ public class CarbonTablePath extends Path {
     this.tablePath = tablePathString;
   }
 
+  /**
+   * structure CarbonTablePath object to manage table paths
+   *
+   * @param storePath the store path of the segment
+   * @param dbName database name
+   * @param tableName table name
+   */
   public CarbonTablePath(String storePath, String dbName, String tableName) {
     super(storePath + File.separator + dbName + File.separator + tableName);
     this.carbonTableIdentifier = new CarbonTableIdentifier(dbName, tableName, "");

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/integration/presto/src/test/scala/org/apache/carbondata/presto/server/PrestoServer.scala
----------------------------------------------------------------------
diff --git a/integration/presto/src/test/scala/org/apache/carbondata/presto/server/PrestoServer.scala
b/integration/presto/src/test/scala/org/apache/carbondata/presto/server/PrestoServer.scala
index 3497f47..cdf8833 100644
--- a/integration/presto/src/test/scala/org/apache/carbondata/presto/server/PrestoServer.scala
+++ b/integration/presto/src/test/scala/org/apache/carbondata/presto/server/PrestoServer.scala
@@ -50,7 +50,7 @@ object PrestoServer {
   /**
    * start the presto server
    *
-   * @param carbonStorePath
+   * @param carbonStorePath the store path of carbon
    */
   def startServer(carbonStorePath: String) = {
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/integration/presto/src/test/scala/org/apache/carbondata/presto/util/CarbonDataStoreCreator.scala
----------------------------------------------------------------------
diff --git a/integration/presto/src/test/scala/org/apache/carbondata/presto/util/CarbonDataStoreCreator.scala
b/integration/presto/src/test/scala/org/apache/carbondata/presto/util/CarbonDataStoreCreator.scala
index 0a811b7..b8031a2 100644
--- a/integration/presto/src/test/scala/org/apache/carbondata/presto/util/CarbonDataStoreCreator.scala
+++ b/integration/presto/src/test/scala/org/apache/carbondata/presto/util/CarbonDataStoreCreator.scala
@@ -403,8 +403,8 @@ object CarbonDataStoreCreator {
   /**
    * Execute graph which will further load data
    *
-   * @param loadModel
-   * @param storeLocation
+   * @param loadModel Carbon load model
+   * @param storeLocation store location directory
    * @throws Exception
    */
   private def executeGraph(loadModel: CarbonLoadModel, storeLocation: String): Unit = {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/9326cfdc/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
b/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
index 8631e1d..13972c8 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/merger/CarbonDataMergerUtil.java
@@ -570,11 +570,13 @@ public final class CarbonDataMergerUtil {
   /**
    * Identify the segments to be merged based on the Size in case of Major compaction.
    *
-   * @param compactionSize
-   * @param listOfSegmentsAfterPreserve
-   * @param carbonLoadModel
-   * @param storeLocation
-   * @return
+   * @param compactionSize compaction size in MB format
+   * @param listOfSegmentsAfterPreserve  the segments list after
+   *        preserving the configured number of latest loads
+   * @param carbonLoadModel carbon load model
+   * @param storeLocation the store location of the segment
+   * @return the list of segments that need to be merged
+   *         based on the Size in case of Major compaction
    */
   private static List<LoadMetadataDetails> identifySegmentsToBeMergedBasedOnSize(
       long compactionSize, List<LoadMetadataDetails> listOfSegmentsAfterPreserve,
@@ -634,14 +636,14 @@ public final class CarbonDataMergerUtil {
 
   /**
    * For calculating the size of the specified segment
-   * @param storeLocation
-   * @param tableIdentifier
-   * @param segId
-   * @return
+   * @param storePath the store path of the segment
+   * @param tableIdentifier identifier of table that the segment belong to
+   * @param segId segment id
+   * @return the data size of the segment
    */
-  private static long getSizeOfSegment(String storeLocation,
+  private static long getSizeOfSegment(String storePath,
       CarbonTableIdentifier tableIdentifier, String segId) {
-    String loadPath = getStoreLocation(storeLocation, tableIdentifier, segId);
+    String loadPath = getStoreLocation(storePath, tableIdentifier, segId);
     CarbonFile segmentFolder =
         FileFactory.getCarbonFile(loadPath, FileFactory.getFileType(loadPath));
     return getSizeOfFactFileInLoad(segmentFolder);
@@ -650,10 +652,10 @@ public final class CarbonDataMergerUtil {
   /**
    * This method will get the store location for the given path, segemnt id and partition
id
    *
-   * @param storePath
-   * @param carbonTableIdentifier
-   * @param segmentId
-   * @return
+   * @param storePath the store path of the segment
+   * @param carbonTableIdentifier identifier of catbon table that the segment belong to
+   * @param segmentId segment id
+   * @return the store location of the segment
    */
   private static String getStoreLocation(String storePath,
       CarbonTableIdentifier carbonTableIdentifier, String segmentId) {
@@ -666,8 +668,9 @@ public final class CarbonDataMergerUtil {
   /**
    * Identify the segments to be merged based on the segment count
    *
-   * @param listOfSegmentsAfterPreserve
-   * @return
+   * @param listOfSegmentsAfterPreserve the list of segments after
+   *        preserve and before filtering by minor compaction level
+   * @return the list of segments to be merged after filtering by minor compaction level
    */
   private static List<LoadMetadataDetails> identifySegmentsToBeMergedBasedOnSegCount(
       List<LoadMetadataDetails> listOfSegmentsAfterPreserve) {
@@ -730,8 +733,8 @@ public final class CarbonDataMergerUtil {
 
   /**
    * To check if the segment is merged or not.
-   * @param segName
-   * @return
+   * @param segName segment name
+   * @return the status whether the segment has been Merged
    */
   private static boolean isMergedSegment(String segName) {
     if (segName.contains(".")) {


Mime
View raw message