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/07/17 06:52:28 UTC

[GitHub] [carbondata] QiangCai commented on a change in pull request #3826: [CARBONDATA-3889] Cleanup code for carbondata-streaming module

QiangCai commented on a change in pull request #3826:
URL: https://github.com/apache/carbondata/pull/3826#discussion_r456252916



##########
File path: streaming/src/main/java/org/apache/carbondata/streaming/segment/StreamSegment.java
##########
@@ -400,12 +386,7 @@ public static void recoverFileIfRequired(
   public static CarbonFile[] listDataFiles(String segmentDir) {
     CarbonFile carbonDir = FileFactory.getCarbonFile(segmentDir);
     if (carbonDir.exists()) {
-      return carbonDir.listFiles(new CarbonFileFilter() {
-        @Override
-        public boolean accept(CarbonFile file) {
-          return CarbonTablePath.isCarbonDataFile(file.getName());
-        }
-      });
+      return carbonDir.listFiles(file -> CarbonTablePath.isCarbonDataFile(file.getName()));

Review comment:
       For carbon 2.0, the answer is yes, in my opinion.
   
   we already use new featrues of jdk8(lambda, stream API)




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