[GitHub] [carbondata] ShreelekhyaG opened a new pull request #3988: [WIP] Clean index files when clean files command executed

classic Classic list List threaded Threaded
171 messages Options
1 ... 6789
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA2 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox

CarbonDataQA2 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-823324527


   Build Failed  with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3469/
   


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akashrn5 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

akashrn5 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-823412993


   retest this please


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA2 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

CarbonDataQA2 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-823480993


   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5219/
   


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA2 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

CarbonDataQA2 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-823481484


   Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3471/
   


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akashrn5 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

akashrn5 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-823752179


   LGTM


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

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



##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonTestUtil.java
##########
@@ -161,6 +166,50 @@ public static Boolean checkForLocalDictionary(
     return isLocalDictionaryGenerated;
   }
 
+  public static int getSegmentFileCount(String tableName) throws IOException {
+    CarbonTable carbonTable = CarbonMetadata.getInstance().getCarbonTable(tableName);
+    CarbonFile segmentsFolder = FileFactory
+        .getCarbonFile(CarbonTablePath.getSegmentFilesLocation(carbonTable.getTablePath()));
+    assert (segmentsFolder.isFileExist());
+    return segmentsFolder.listFiles(true).size();
+  }
+
+  public static int getIndexFileCount(String tableName,
+      String segment, String extension) throws IOException {
+    if (extension == null) {
+      extension = CarbonTablePath.INDEX_FILE_EXT;
+    }
+    CarbonTable table = CarbonMetadata.getInstance().getCarbonTable(tableName);
+    String path = CarbonTablePath
+        .getSegmentPath(table.getAbsoluteTableIdentifier().getTablePath(), segment);
+    CarbonFile[] carbonFiles;

Review comment:
       Can optimize as below:
   ```suggestion
        List<CarbonFile> carbonFiles;
       boolean recursive = false;
       if (table.isHivePartitionTable()) {
         path = table.getAbsoluteTableIdentifier().getTablePath();
         recursive = true;
       }
       carbonFiles = FileFactory.getCarbonFile(path).listFiles(recursive,
           file -> file.getName().endsWith(CarbonTablePath.INDEX_FILE_EXT) || file.getName()
               .endsWith(CarbonTablePath.MERGE_INDEX_FILE_EXT));
       CarbonFile[] validIndexFiles = (CarbonFile[]) SegmentFileStore
           .getValidCarbonIndexFiles(carbonFiles.toArray(new CarbonFile[carbonFiles.size()]));
   ```




--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

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



##########
File path: index/secondary-index/src/test/scala/org/apache/carbondata/spark/testsuite/mergeindex/CarbonIndexFileMergeTestCaseWithSI.scala
##########
@@ -215,52 +238,59 @@ class CarbonIndexFileMergeTestCaseWithSI
         s"'GLOBAL_SORT_PARTITIONS'='20')")
     sql("CREATE INDEX nonindexmerge_index4 on table nonindexmerge (name) AS 'carbondata'")
     val rows = sql("""Select count(*) from nonindexmerge""").collect()
-    assert(getIndexFileCount("default_nonindexmerge", "0") == 20)
-    assert(getIndexFileCount("default_nonindexmerge", "1") == 20)
-    assert(getIndexFileCount("default_nonindexmerge", "2") == 20)
-    assert(getIndexFileCount("default_nonindexmerge", "3") == 20)
-    assert(getIndexFileCount("default_nonindexmerge_index4", "0") == 20)
-    assert(getIndexFileCount("default_nonindexmerge_index4", "1") == 20)
-    assert(getIndexFileCount("default_nonindexmerge_index4", "2") == 20)
-    assert(getIndexFileCount("default_nonindexmerge_index4", "3") == 20)
+    assert(CarbonTestUtil.getIndexFileCount("default_nonindexmerge", "0",

Review comment:
       You can create getIndexFileCount with tablename and segment and call existing getIndexFileCount method, with extension as null for INDEX_FILE_EXT and refactor the testclass




--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA2 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

CarbonDataQA2 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-824225469


   Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12602/job/ApacheCarbon_PR_Builder_2.4.5/3474/
   


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA2 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

CarbonDataQA2 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-824225610


   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12602/job/ApacheCarbonPRBuilder2.3/5222/
   


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] Indhumathi27 commented on pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

Indhumathi27 commented on pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988#issuecomment-824540254


   LGTM


--
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:
[hidden email]


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] asfgit closed pull request #3988: [CARBONDATA-4037] Improve the table status and segment file writing

GitBox
In reply to this post by GitBox

asfgit closed pull request #3988:
URL: https://github.com/apache/carbondata/pull/3988


   


--
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:
[hidden email]


1 ... 6789