You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/05/05 07:00:32 UTC

[GitHub] [carbondata] akashrn5 commented on a change in pull request #3743: [WIP]Refactor system folder location and removed unwanted property

akashrn5 commented on a change in pull request #3743:
URL: https://github.com/apache/carbondata/pull/3743#discussion_r419901153



##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
##########
@@ -1585,33 +1586,11 @@ public int getInvisibleSegmentPreserveCount() {
   }
 
   /**
-   * Get the configured system folder location.
-   * @return
-   */
-  public String getSystemFolderLocation() {
-    return getSystemFolderLocation(null);
-  }
-
-  /**
-   * Get the configured system folder location.
-   * @return
+   * Get the system folder location based on database location.
    */
-  public String getSystemFolderLocation(String databaseName) {
-    String systemLocation = CarbonProperties.getInstance()
-        .getProperty(CarbonCommonConstants.CARBON_SYSTEM_FOLDER_LOCATION);
-    if (systemLocation == null) {
-      systemLocation = getStorePath();
-    }
-    if (systemLocation != null) {
-      systemLocation = CarbonUtil.checkAndAppendFileSystemURIScheme(systemLocation);
-      systemLocation = FileFactory.getUpdatedFilePath(systemLocation);
-    }
-    if (databaseName == null) {
-      return systemLocation + CarbonCommonConstants.FILE_SEPARATOR + "_system";
-    } else {
-      return systemLocation + CarbonCommonConstants.FILE_SEPARATOR +
-          databaseName + CarbonCommonConstants.FILE_SEPARATOR + "_system";
-    }
+  public String getSystemFolderLocationPerDatabase(String databaseLocaltion) {

Review comment:
       it is being referred by MVProvider and its in core, let it be in core module, cannot move to mv module as reference is before that. So it is ok to keep here

##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
##########
@@ -1585,33 +1586,11 @@ public int getInvisibleSegmentPreserveCount() {
   }
 
   /**
-   * Get the configured system folder location.
-   * @return
-   */
-  public String getSystemFolderLocation() {
-    return getSystemFolderLocation(null);
-  }
-
-  /**
-   * Get the configured system folder location.
-   * @return
+   * Get the system folder location based on database location.
    */
-  public String getSystemFolderLocation(String databaseName) {
-    String systemLocation = CarbonProperties.getInstance()
-        .getProperty(CarbonCommonConstants.CARBON_SYSTEM_FOLDER_LOCATION);
-    if (systemLocation == null) {
-      systemLocation = getStorePath();
-    }
-    if (systemLocation != null) {
-      systemLocation = CarbonUtil.checkAndAppendFileSystemURIScheme(systemLocation);
-      systemLocation = FileFactory.getUpdatedFilePath(systemLocation);
-    }
-    if (databaseName == null) {
-      return systemLocation + CarbonCommonConstants.FILE_SEPARATOR + "_system";
-    } else {
-      return systemLocation + CarbonCommonConstants.FILE_SEPARATOR +
-          databaseName + CarbonCommonConstants.FILE_SEPARATOR + "_system";
-    }
+  public String getSystemFolderLocationPerDatabase(String databaseLocaltion) {

Review comment:
       done

##########
File path: core/src/main/java/org/apache/carbondata/core/view/MVProvider.java
##########
@@ -223,7 +224,7 @@ public void updateStatus(MVManager viewManager, List<MVSchema> schemaList,
 
   private void updateStatus(MVManager viewManager, String databaseName, List<MVSchema> schemaList,
       MVStatus status) throws IOException {
-    ICarbonLock carbonTableStatusLock = getStatusLock(databaseName);
+    ICarbonLock carbonTableStatusLock = getStatusLock(viewManager, databaseName);

Review comment:
       done




----------------------------------------------------------------
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:
users@infra.apache.org