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



##########
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:
       Can get databaseLocation and send only `databaseLocation` as parameter

##########
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:
       Can move this method to MV module as it is specific to only mv.

##########
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:
       ```suggestion
     public String getSystemFolderLocationPerDatabase(String databaseLocation) {
   ```




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


Reply via email to